Files
OpenBK7231T_App/docs/autoexecs/relay_open_delay.bat
2024-02-02 18:07:07 +01:00

13 lines
569 B
Batchfile

// Following sample shows how to turn on relay without delay, but turn it off with a delay
// Assumptions:
// - channel 1 has a relay (one of pins has role Relay and channel set to 0)
// - channel 2 is purely virtual channel used to introduce the relay
alias enable_without_delay backlog cancelRepeatingEvent 123456; setChannel 1 1
alias disable_with_delay backlog cancelRepeatingEvent 123456; addRepeatingEventID 5 1 123456 setChannel 1 0
setChannelType 2 Toggle
addChangeHandler Channel2 == 1 enable_without_delay
addChangeHandler Channel2 == 0 disable_with_delay