Is there something like 'SP' for Relay or IO ports?
travis
Posts: 180
Trying to avoid SET_PULSE_TIME all over the place.
0
Comments
It does require a few lines of code, but it should be easy enough to change the "pulse" time on a per device basis.
Jeff
or setup a timeline and all the necessary bits inside a the function... more accurate?
You could do the timeline thing and have it trigger every .1 seconds and count down to the OFF command if you think you need to change pulse times on the fly for the relays. If you need the pulse time for each relay is constant, then the timeline approach seems like too much work for no real gain (that I can think of ). I would opt for the KISS method
Jeff
I was about to go the wait route - but realized, if you had 10 REL10s . . . you'd need 100 different cases for a switch I was going to propose (10 for the device, 10 for each relay.) Timelines are terribly inefficient (as far as creating them - you have to code in three different places just to create them), so I wouldn't go that route at all.
for testing I just put this in define program and toggle the nBtnTest var in debug to make it run. Just put the Do_Push_Timed that I have in DEF_PROG where you need it, adjust the vars in it as needed for your various relays and you're good to go.