Implicit Variables for Forcing I/Os
During the commissioning of a plant or a machine, it may be necessary to force I/Os. For this purpose, you can generate special force variables for each I/O channel which is mapped on a variable in the I/O Mapping tab of the device editor.
As a precondition the setting Generate force variables for IO mapping has to be activated in the PLC settings tab. Then, at each build run of the application, for each mapped I/O channel, two variables are generated according to the following syntax. Any empty spaces in the channel name are replaced by underscores.
<devicename>_<channelname>_<IECaddress>_Force of type BOOL, for activating and deactivating the forcing
<devicename>_<channelname>_<ECaddress>_Value of datatype of the channel, for defining the value to be forced on the channel
These variables will be available in the input assistant in category Variables > IoConfig_Globals_Force_Variables. They can be used in any programming objects, in visualizations, symbol configuration, and so on, within the programming system.
A rising edge at the force variable activates the forcing of the respective I/O with the value define by the value variable. A falling edge deactivates the forcing. Deactivating by setting the force variable back to FALSE is necessary before a new value can be forced.
Consider the restrictions listed below.
If the mapping is completed as shown in figure I/O Mapping tab of the device editor, then at a build (F11) of the application, the following variables will be generated and be available in the input assistant:
oDigitax_ST_Control_word_QW0_Force : BOOL;
oDigitax_ST_Control_word_QW0_Value : UINT;
oDigitax_ST_Target_position_QD1_Force : BOOL;
oDigitax_ST_Target_position_QD1_Value : DINT;
oDigitax_ST_Status_word_IW0_Force : BOOL;
oDigitax_ST_Status_word_IW0_Value : UINT;
oDigitax_ST_Position_actual_value_ID1_Force : BOOL;
oDigitax_ST_Position_actual_value ID1_Value : DINT;
oOnly channels which are mapped on a variable in the I/O Mapping tab (i.e., a variable has to be defined in the Variable column, no matter whether it is a new or an existing) can be forced by the above described implicit variables.
oUnused inputs / outputs as well as those which are mapped via AT declaration in an application program cannot be forced.
oThe respective I/O channels have to be used in at least one task.
oForced I/Os are not indicated in the monitoring (watch view, I/O mapping dialog). The value is only used implicitly in the I/O driver for writing onto the device.
oForced inputs are displayed correctly by the red force symbol (F), not however, forced inputs/outputs.