TO statements that occur outside PUSH...
vegastech
Posts: 369
I am turning on a channel (button channel) on a touchpanel for feedback purposes, within a hold button, and get the following warning on compile:
WARNING: RSB, Rev2.axs(1290): C10608: TO statements that occur outside the data flow of PUSH events/statements may not work
WARNING: RSB, Rev2.axs(1290): C10608: TO statements that occur outside the data flow of PUSH events/statements may not work
HOLD[2,REPEAT]: { IF (nLightVal[get_last(dcLightsUpBtns)]<100) { //feedback on button press TO[dcLightsUpBtns[get_last(dcLightsUpBtns)]] //start incrementing variable for that zone nLightVal[get_last(dcLightsUpBtns)]++ //Update the Level on the Touchpanel SEND_LEVEL dvTPLight,(GET_LAST(dcLightsUpBtns)+9),(nLightVal[get_last(dcLightsUpBtns)]*255/100) } ELSE { //Set value to 100% nLightVal[get_last(dcLightsUpBtns)] = 255 }The idea here is to program a button to show pressed while it is being held. The button itself is not set up in the touchpanel as momentary feedback, which is why I programmed it this way. Is there a better way to do this so as not to get the aforementioned error? BTW, every time I press the button(s) associated with this code, it works fine. Possibly a variable or channel going high (or set to 1) during a push, and then to 0 on the release, with feedback in define_program?
0
Comments
That said though, in your case, it's easy enough just to take it out of your HOLD and put in in the PUSH handler ... even if you have to add a PUSH just for that purpose. There is no need at all to put it in a HOLD; it kind of creates its own HOLD internally.