236
Rockwell Automation Publication 2080-UM002L-EN-E - November 2021
Appendix C Quickstarts
Figure 21 - Range of Values
MyAppData.OutputMask
along with
MyAppData.HPOutput
and
MyAppData.LPOutput
allows the user to specify which embedded outputs can
be turned on when a High Preset or Low Preset is reached. These variables use
a combination of decimals and binary numbers to specify the embedded
outputs that are able to turn on/off.
Thus, in our example, we first set the Output Mask to a decimal value of 3
which, when converted to binary, is equal to 0011. This means that now outputs
O0 and O1 can be turned On/Off.
We have set the HPOutput to a decimal value of 1, which, when converted to
binary, is equal to 0001. This means that when a High Preset is reached, output
O0 will turn on and stay on until the HSC is reset or the counter counts back
down to a Low Preset. The LPOutput works same way as the HPOutput except
an output will be turned on when a Low Preset is reached.
Assign Variables to the Function Block
1. Go back to the ladder diagram and assign the variables you have just
configured to the corresponding elements of the HSC function block.
The HSC function block should appear as shown:
To assign a variable to a particular element in your function block,
double-click the empty variable block. On the Variable selector that
appears, choose the variable you have just created. For example, for the
input element HSCAppData, select the variable MyAppData.
+2,147,483,647 maximum
-2,147,483,648 minimum
Overflow
High Preset
0
Low Preset
Underflow
HscAppData.OFSetting
HscAppData.HPSetting
HscAppData.LPSetting
HscAppData.UFSetting
Variable