Home AMX User Forum NetLinx Studio

Implementing Aprilaire Viewstats on one TP3 page

I am working a Landmark to Netlinx Conversion where my client has a TPI/3 and Monitor (G3) with 5 zone of HVAC. At to simplify his transition I am using his existing TP3 file which displays all of the 5 zones on one page. I am working with the AprilAire Duet Module. In order to fill the page (strucutre) I am putting a For step routine in the CHANNEL EVENT, DATA EVENT and LEVEL EVENT code to provide feedback to the panel. My questions is where do I put the For Line of Code? Is this correct or does it go before the ON event or belong here?

CHANNEL_EVENT[vdvViewStats,HVAC_OFF_FB] //HVAC_OFF_FB
{
ON:
{
FOR(nCurrentZone=1;nCurrentZone<=KEYPADS_SUPPORTED;nCurrentZone++)
{
ViewStat[CHANNEL.DEVICE.PORT].nHVACState = 4 // off
IF(CHANNEL.DEVICE.PORT==nCurrentZone && ViewStat[nCurrentZone].nControllerType==1)
{
SEND_COMMAND dvTP1, "'@BTON',ITOA(nCurrentZone+30)"
//fnSetButtonTextColor(10,COLOR[ViewStat[nCurrentZone].nHVACState+1])
}
}
}
}

Comments

  • Spire_JeffSpire_Jeff Posts: 1,917
    I'm not sure you need a for loop. Since you are only dealing with one touch panel, you do not need to loop through each touch panel to deal with individual panel settings. You could create a for loop in a function that populates all of the HVAC fields and then call this function when the touch panel comes online (or when the HVAC page is chosen. In the channel event, I would update the structure like you are and then send only the value that changed to the touch panel. This way, you are not sending unnecessary data.

    Jeff
  • DHawthorneDHawthorne Posts: 4,584
    On the other hand, I will often build a FOR loop with only one panel just so it's easier to upgrade when the client buys another panel.
Sign In or Register to comment.