HSCSimple_M258: Control a Simple Type Counter for M258
This function block controls a Simple type counter with the following reduced functions:
oone-channel counting
ono threshold
ono event
ono capture
ono reflex
The HSCSimple function block is mandatory when using a Simple counter type.
The function block instance name must match the name defined by configuration. Hardware related information managed by this function block is synchronized with the MAST task cycle.
|
UNINTENDED OUTPUT VALUES |
oOnly use the Function Block instance in the MAST task. oDo not use the same Function Block instance in a different task. |
Failure to follow these instructions can result in death, serious injury, or equipment damage. |
NOTE: Forcing the logical output values of the FB is allowed by EcoStruxure Machine Expert but it will have no impact on hardware related outputs if the function is active (executing).
To see the general representation in IL or ST language, refer to Function and Function Block Representation.
This table describes the input variables:
Inputs |
Type |
Comment |
---|---|---|
Enable |
BOOL |
TRUE = activates counter and takes into account pulses on the counter input. |
Sync |
BOOL |
On rising edge, loads the preset of the counter. |
ACK_Modulo |
BOOL |
Modulo loop mode: On rising edge, resets the modulo flag Modulo_Flag. |
This table describes the output variables:
Outputs |
Type |
Comment |
---|---|---|
HSC_REF |
Reference to the HSC. |
|
HSC_Err |
BOOL |
TRUE = indicates that an error was detected. Use the EXPERTGetDiag function block used to get more information about this detected error. |
Validity |
BOOL |
TRUE = indicates that the output values on the function block are valid. |
Run |
BOOL |
TRUE = counter is activated. In One-shot mode, switches to 0 when CurrentValue reaches 0. A rising edge on Sync is needed to restart the counter. |
Modulo_Flag |
BOOL |
Module loop mode: Set to TRUE when the counter rolls over the modulo value. |
CurrentValue |
DWORD |
The value of the counter. |