LeadLag

Top  Previous  Next

CIRCON~1_img294

The LeadLag block outputs a digital value of True on one of four Out slots when the In slot is set to True. This “rotates” to the next Out slot when the corresponding Feedback input slot transitions to False and remains False for the specified FeedbackDelay when the corresponding Out slot is True, or when the Trigger input slot transitions to True.

This block can be used for example, to rotate between pumps where each pump’s status is connected to each FeedBack slot, and each pump is controlled by the corresponding Out slot. Note that if a pump goes down and remains down causing the corresponding Feedback input slot to be False, the Out slot for that pump will continue to output a value of True until the Feedback slot becomes True (e.g. to allow for troubleshooting of the pump).

The Trigger can be used to force a rotation to the next Out slot when In is True, based on some condition (e.g. a schedule that is used to switch between pumps).

The respective Alarm Slots will be set to True when a Feedback slot has not been set to True within the specified FeedbackDelay (e.g. if a pump goes down).

 

Inputs

 

Slots

Type

Default

Description

 

In

Digital

False

When set to True, the block will turn on the next Out slot when the current Feedback input slot transitions to and remains false for the specified FeedbackDelay, or the Trigger slot is set to True.

When set to False, all Out slots will be set to false.

 

FeedBackA

Digital

False

The first input slot for the block to monitor.

 

FeedBackB

Digital

False

The second input slot for the block to monitor.

 

FeedBackC

Digital

False

The third input slot for the block to monitor.

 

FeedBackD

Digital

False

The fourth input slot for the block to monitor.

 

Trigger

Digital

False

A False to True transition will cause the block to output True on the next Out slot.

 

Outputs

 

Slots

Type

Description

 

OutA

Digital

The first output slot that the block will set the signal on.

 

OutB

Digital

The second output slot that the block will set the signal on.

 

OutC

Digital

The third output slot that the block will set the signal on.

 

OutD

Digital

The fourth output slot that the block will set the signal on.

 

AlarmA

Digital

The alarm that will be set to True when the first Feedback input has not transitioned to True within the specified FeedbackDelay

 

AlarmB

Digital

The alarm that will be set to True when the second Feedback input has not transitioned to True within the specified FeedbackDelay

 

AlarmC

Digital

The alarm that will be set to True when the third Feedback input has not transitioned to True within the specified FeedbackDelay

 

AlarmD

Digital

The alarm that will be set to True when the fourth Feedback input has not transitioned to True within the specified FeedbackDelay

 

CurrentOutput#

Integer

The current Out slot.

 

Properties

 

Slots

Description

 

FeedbackDelay

The time, in seconds, in which the current FeedBack input slot must transition from False to True, otherwise the corresponding Alarm will be set to True.

 

MaxOutputs

The number outputs for which inputs should be monitored and used by the block to set the outputs.

 

Persistent

When set to True, the current “lead” output number is saved across program restarts.