SMC_CAMSWITCH_TOGGLE_EVENT (STRUCT)ΒΆ
TYPE SMC_CAMSWITCH_TOGGLE_EVENT : STRUCT
A toggle event as reported by SMC_DigitalCamSwitch_HighPrecision
- InOut:
Name
Type
Comment
SwitchNumber
UDINT
The switch number of the toggle event. Switch numbers are 1-based so the first switch has number 1.
ToggleEventId
UDINT
The identifier of the switch event. Incremented by 1 for each switch event, with a wrap to 0 after 2^32 - 1. This means it is guaranteed that the last 2^32 switch event identifiers are all unique.
IDs are assigned in ascending order of the switch events, i.e. it is guaranteed that a later switch event has a higher ID (except for a possible 32-bit overflow).
Note
An aborting movement or an override can change the order in which switch events occur or even change whether a switch event occurs at all. If this happens, the IDs assigned to the changed events can change, too.
This ID is intended for determining whether a given event of a particular switch has already been processed by the caller of the function block: If events are processed in order, the ID of the last processed event can be used to decide whether a given event has already been processed.
Duration
LREAL
The duration in seconds until the new value should be output. The duration is relative to the start of the current cycle. This duration is shifted by the OnCompensation and OffCompensation of the track. For example, if the track has an OnCompensation is -0.1 s, the duration is measuered until 0.1 seconds before the axis reaches the switch position.
NewValue
BOOL
The new value of the output