Commit 5dd00141 authored by Claes Sjofors's avatar Claes Sjofors

Plc object IOSimulFlag to fetch sim flag in IOHandler object added

parent a7dacded
......@@ -77,6 +77,14 @@
#define FirstScan_exec(object)\
object->Status = tp->first_scan;
/*_*
@aref iosimulflag IOSimulFlag
*/
#define IOSimulFlag_exec(object)\
if ( tp->pp->IOHandler) \
object->Status = tp->pp->IOHandler->IOSimulFlag;
/*_*
@aref abs Abs
*/
......
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! 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 Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. 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
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview 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 Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_iosimulflag.wb_load -- Defines the class IOSimulFlag.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Code rt_plc_macro_div.h
! @Group Plc,PlcLogic
! @Summary Fetches the value of IOHandler.IOSimulFlag.
! Fetches the value of IOHandler.IOSimulFlag.
!
! IOSimulFlag is set when Proview is running in simulation
! mode without IO. This object makes it possible to fetch
! this flag from function object code.
!
! @image orm_iosimulflag_fo.gif
!*/
Object IOSimulFlag $ClassDef 674
Body SysBody
Attr Editor = pwr_eEditor_PlcEd
Attr Method = pwr_eMethod_Connections
Attr PopEditor = 2
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "IOSimulFlag"
EndBody
Object Status $Output 1
Body SysBody
Attr Flags |= PWR_MASK_INVISIBLE
Attr TypeRef = "pwrs:Type-$Boolean"
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] = 0
Attr parameters[1] = 0
Attr parameters[2] = 1
Attr parameters[3] = 0
Attr subwindows = 0
Attr graphmethod = 4
Attr graphindex = 47
Attr default_mask[0] = 0
Attr default_mask[1] = 1
Attr segname_annotation = 0
Attr devbody_annotation = 0
Attr compmethod = 55
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr connectmethod = 0
Attr executeordermethod = 2
Attr objname = "IOSimulFlag"
Attr graphname = "IOSimulFlag"
EndBody
EndObject
EndObject
EndSObject
......@@ -180,6 +180,8 @@ palette NavigatorPalette
{
class Eurotherm_TC3001
class Eurotherm_TC3001Aggr
class Eurotherm_EPower
class Eurotherm_EPowerAggr
}
menu Impac
{
......@@ -387,10 +389,11 @@ palette NavigatorPalette
menu Devices
{
class PnDevice
class ABB_ACS_PnDevice
class Eurotherm_EPower_PnDevice
class Siemens_ET200S_PnDevice
class Siemens_ET200M_PnDevice
class Sinamics_G120_PnDevice
class ABB_ACS_PnDevice
}
}
menu PSS9000
......@@ -1153,6 +1156,7 @@ palette PlcEditorPalette
class CStoBiFloat32
class CStoBiString80
class CStoIi
class IOSimulFlag
class ResDi
class SetDi
class StoAi
......@@ -1248,6 +1252,8 @@ palette PlcEditorPalette
{
class Eurotherm_TC3001Fo
class Eurotherm_TC3001AggrFo
class Eurotherm_EPowerFo
class Eurotherm_EPowerAggrFo
class SEW_Movidrive_1Fo
class SEW_Movidrive_EPBFo
class Janitza_UMG96S_1Fo
......@@ -1274,6 +1280,8 @@ palette PlcEditorPalette
class BaseValveIncrDecrSim
class Eurotherm_TC3001Sim
class Eurotherm_TC3001AggrSim
class Eurotherm_EPowerSim
class Eurotherm_EPowerAggrSim
class SEW_Movidrive_1Sim
}
menu Miscellaneous
......
......@@ -78,7 +78,8 @@ typedef enum {
goen_eGraphIndex_GetDTgeneric = 43,
goen_eGraphIndex_StoDTgeneric = 44,
goen_eGraphIndex_True = 45,
goen_eGraphIndex_False = 46
goen_eGraphIndex_False = 46,
goen_eGraphIndex_IOSimulFlag = 47
} goen_eGraphIndex;
static float f_pinlength = GOEN_F_PINLENGTH;
......@@ -517,6 +518,7 @@ int goen_create_nodetype_m4(
break;
}
case goen_eGraphIndex_FirstScan:
case goen_eGraphIndex_IOSimulFlag:
case goen_eGraphIndex_True:
case goen_eGraphIndex_False:
{
......@@ -525,6 +527,7 @@ int goen_create_nodetype_m4(
switch ( graph_index) {
case goen_eGraphIndex_FirstScan: w=4; strcpy( text, "FirstScan"); break;
case goen_eGraphIndex_IOSimulFlag: w=4; strcpy( text, "IOSimulFlag"); break;
case goen_eGraphIndex_True: w=2; strcpy( text, "True"); break;
case goen_eGraphIndex_False: w=2; strcpy( text, "False"); break;
default: ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment