HSC

The HSC instruction applies high presets, low presets, and output source values to the high-speed counter.
Operation details:
  • Programmable Limit Switch (PLS) is enabled by setting the HSCAppData.PLSEnable parameter to True.
  • The PLSPosition parameter is reset after a full cycle completes and the HSCSTS.HP value is reached.
Languages supported: Function block diagram, ladder diagram, structured text.
This instructions applies to the L50E and L70E controllers.
HSC
HSC
HSC parameters
Parameter
Parameter Type
Data Type
Description
EN
Input
BOOL
When set to true, the instruction is enabled.
  • TRUE: Execute the current computation.
  • FALSE: There is no computation.
Applies to ladder diagram programs.
We do not recommend using the EN parameter with the HSC function block because when EN is set to FALSE, the timer continues to increment.
Enable
Input
BOOL
Enable instruction block.
  • TRUE: Execute the HSC operation specified in the HSC command parameter.
  • FALSE: No HSC commands are issued.
HscCmd
Input
USINT
Issues commands to the HSC.
HSCAppData
Input
HSC application configuration, which is usually only needed once.
HSCStsInfo
Input
HSC dynamic status, which is continuously updated during HSC counting.
PlsData
Input
Programmable Limit Switch (PLS) data structure.
Sts
Output
UINT
HSC execution status.
HSC status codes:
  • 0x00 - No action taken (not enabled).
  • 0x01 - HSC execution successful.
  • 0x02 - HSC command invalid.
  • 0x03 - HSC ID out of range.
  • 0x04 - HSC configure error.
ENO
Output
BOOL
Enables output. Applies to ladder diagram programs.

HSC examples

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