Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
23672a06
Commit
23672a06
authored
Jun 03, 2020
by
Claes
Committed by
Esteban Blanc
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plc class DtoI added
parent
92b4c0c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
132 additions
and
0 deletions
+132
-0
src/lib/rt/src/rt_plc_macro_io.h
src/lib/rt/src/rt_plc_macro_io.h
+6
-0
src/wbl/pwrb/src/pwrb_c_dtoi.wb_load
src/wbl/pwrb/src/pwrb_c_dtoi.wb_load
+118
-0
wb/exp/wb/src/pwr_wb_palette.cnf
wb/exp/wb/src/pwr_wb_palette.cnf
+8
-0
No files found.
src/lib/rt/src/rt_plc_macro_io.h
View file @
23672a06
...
...
@@ -410,6 +410,12 @@
if (cond) \
strncpy(obj->ActualValue, in, 80);
/*_*
DtoI
@aref dtoi DtoI
*/
#define DtoI_exec(obj, in) obj->ActVal = in ? 1 : 0;
/*_*
AtoI
@aref atoi AtoI
...
...
src/wbl/pwrb/src/pwrb_c_dtoi.wb_load
0 → 100644
View file @
23672a06
!
! ProviewR Open Source Process Control.
! Copyright (C) 2005-2020 SSAB EMEA AB.
!
! This file is part of ProviewR.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with ProviewR. If not, see <http://www.gnu.org/licenses/>
!
! Linking ProviewR statically or dynamically with other modules is
! making a combined work based on ProviewR. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! ProviewR give you permission to, from the build function in the
! ProviewR Configurator, combine ProviewR with modules generated by the
! ProviewR PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of ProviewR (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_dtoi.wb_load -- Defines the class DtoI.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Code rt_plc_macro_io.h
! @Group Plc,PlcConversion
! @Summary Convert analog value to integer
! Convert analog value to integer.
! @image orm_dtoi_fo.gif
!
! The DtoI object converts a digital value (pwr_tBoolean) to
! an integer (pwr_tInt32) stored in ActVal.
! The analog value is rounded to closest integer value.
!*/
Object DtoI $ClassDef 720
Body SysBody
Attr Editor = pwr_eEditor_PlcEd
Attr Method = pwr_eMethod_Connections
Attr PopEditor = 2
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "DtoI"
EndBody
!/**
! Digital input that will be converted to integer.
!*/
Object In $Input 1
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_RTVIRTUAL
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_NOREMOVE
Attr GraphName = "in"
EndBody
EndObject
!/**
! Output that contains the integer.
!*/
Object ActVal $Output 3
Body SysBody
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_NOEDIT
Attr Flags |= PWR_MASK_REDUTRANSFER
Attr TypeRef = "pwrs:Type-$Int32"
Attr GraphName = "Val"
EndBody
EndObject
EndObject
Object DevBody $ObjBodyDef 2
Object PlcNode $Buffer 1
Body SysBody
Attr Class = pwr_eClass_PlcNode
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
EndObject
Object GraphPlcNode $GraphPlcNode
Body SysBody
Attr object_type = 11
Attr parameters[0] = 1
Attr parameters[1] = 0
Attr parameters[2] = 1
Attr parameters[3] = 0
Attr subwindows = 0
Attr graphmethod = 1
Attr graphindex = 0
Attr default_mask[0] = 1
Attr default_mask[1] = 1
Attr segname_annotation = 1
Attr compmethod = 5
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr executeordermethod = 2
Attr objname = "DtoI"
Attr graphname = "DtoI"
EndBody
EndObject
EndObject
EndSObject
wb/exp/wb/src/pwr_wb_palette.cnf
View file @
23672a06
...
...
@@ -67,6 +67,13 @@ palette NavigatorPalette
class BoFloatArray100
class BoString80
}
menu Light
{
class LightAv
class LightDv
class LightIv
class LightSv
}
}
menu DataStorage
{
...
...
@@ -1076,6 +1083,7 @@ palette PlcEditorPalette
class AtoStr
class BCDDo
class DiBCD
class DtoI
class DtoMask
class DtoEnum
class DtoStr
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment