FB_SignallingContact
The two inputs tDelayOnTime and tDelayOffTime allow slow operation and slow release delays to be set. If a message signal is to be acknowledged before this time can be ended, this is done by means of the bQuitSignal input. The state of the message contact is communicated to the block via the bContact input.
The state of the message signal is indicated by the nSignalState output. A message signal can adopt one of altogether 6 different states. Corresponding constants are defined in the library:
Constant | Description |
---|---|
TCSIGNAL_INVALID | The message signal still does not have a defined state. |
TCSIGNAL_SIGNALED | The message signal is active. |
TCSIGNAL_RESET | The message signal has been reset. |
TCSIGNAL_CONFIRMED | The message signal is confirmed, but has not yet been reset. |
TCSIGNAL_SIGNALCON | The message signal is active and confirmed. |
TCSIGNAL_RESETCON | The message signal is confirmed and reset. |
VAR_INPUT
tDelayOnTime : TIME := t#100ms;
tDelayOffTime : TIME := t#100ms;
bQuitSignal : BOOL;
bContact : BOOL;
tDelayOnTime: Delay before setting the message signal.
tDelayOffTime: Delay before resetting the message signal.
bQuitSignal: Input to acknowledge message signal.
bContact: Input for the message signal contact.
VAR_OUTPUT
nSignalState : WORD;
nSignalState: State of the message.
Examples
A message signal requiring acknowledgement is implemented in the following example. The variable bGateAlert represents the state of the message signal. If the output nSignalState has the value TCSIGNAL_SIGNALED or TCSIGNAL_RESET, the message is active. A rising edge at the bQuitSignal input acknowledges the message signal.
The following example illustrates the simplest case. A message signal not requiring acknowledgement.
The slow-release delay allows the message signal to remain active for a certain time. The slow operation delay can be used, for example, to suppress contact bounce.