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.