HSCE

The HSCE instruction is used for controlling and reading the HSC counter.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the L20E, L50E, and L70E controllers.
HSCE
HSCE
HSCE parameters
Parameter
Parameter Type
Data Type
Description
Enable
Input
BOOL
  • TRUE: The HSCE initiates the function block and the plug-in HSC module. Accumulator = InitAcc. Status of HSCE will be reset. Rate1 = 0, Rate2 = 0.
  • FALSE: The Accumulator is updated by reading from the plug-in module. Done, Active, Error = FALSE while ErrorID = 0, Rate1, Rate2 = 0.
Channel
Input
HSCE_CHANNEL
The HSCE channel.
Run
Input
BOOL
For HSCE to count the operational state.
  • TRUE: HSCE counts the pulses.
  • FALSE: HSCE stops the counting.
Reset
Input
BOOL
TRUE: All outputs are cleared and accumulator. Rate1 and Rate2 are also cleared to 0. Plug-in HSC module status clear. The priority of Reset input is higher than the input of Run.
Done
Output
BOOL
  • TRUE: When HSCE Enable is TRUE and no error is detected.
  • FALSE: When HSCE Enable is TRUE but Run is FALSE.
Active
Output
BOOL
  • TRUE: When HSCE Enable is TRUE, Done is TRUE and Run is FALSE.
  • FALSE: When HSCE Enable is TRUE but Run is FALSE.
Rate1
Output
REAL
Current Pulse Rate in user unit per second (Per Pulse method).
Rate2
Output
REAL
Current Pulse Rate in user unit per second (Cyclic method).
TPValue
Output
LINT
Accumulator Value capture when touch probe is triggered.
OutputSts
Output
UINT
HSC plug-in Physical and Virtual Output status and is only applicable for HSC counter 0.
Bit 0: Output 0 (Physical Output Status)
Bit 1 to 15: Output 1 to Output 15 (Virtual Output Status)
Status
Output
UINT
HSC status information.
Error
Output
BOOL
Indicates an error occurred.
ErrorID
Output
UINT
When an error occurs, ErrorID contains the error codes.

HSCE examples

HSCE function block diagram example
HSCE function block diagram example
HSCE ladder diagram example
HSCE ladder diagram example
HSCE text structure example
HSCE text structure example
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal