LeadLag
LeadLag
The LeadLag block is used to schedule a number of units on/off. The 'units' property should be set to a bundle variable that imports the list units the command from the *unit program*. The unit program must have three variables for each unit: -unit stage number used to determine start order - unit alarm status as true/false (anything not true is considered false) - variable used to command the unit; this variable must be set via 'setExternal' block in the unit program. This block's 'numOn' property is used to command all the units on or off. Each unit in alarm is commanded to off. Any remaining units are commanded on until we reach the desired number on (using unit num ordering).
Using the LeadLag block
In our example of using the leadLag block, we are using Alarm, SF, and Stage points found under our AHUs under City Center.
We also created a point called Current Stage found under Misc under City Center. This point indicates the number of how many things you want on. And we also added miscRefs on the AHUs to the Misc equip. This will allow us to create a bundle of all the AHUs to the MIsc equip.
Now we create a program (AHU Staging) that runs on the AHUs and contains Alarm, SF, and Stage points in it. We also add a block called Set External. On that block we put the name of the point that will be commanded externally. Basically the leadLag block from the next program we will create, actually writes to the command, and requires that block in order for this to work. In this case, we added sf (has to be the exact name of the variable. its case sensitive).
Now we create a program that runs on the Misc equip and contains Current Stage and bundle of the previous program we made (AHU Staging). If you don't see it, its because the AHUs don't have a ref to the Misc equip. In this program we add the leadLag block. The leadLag block connects to the bundle columns using a gridSelectCol block. So what the logic is saying is that if Current Stage is 1, then anything in the bundle (all AHUs) that is stage 1 will turn on. So if AHU-1 is stage 1 and the alarm is on, then it will turn on the next equipment that is stage 2 and so on.