I have an address called "Alarms_Clear_DAQ" in a PLC. When I view the PLCAddressValue in a basic label it shows as "FALSE". The PLC is programmed to clear an alarm bit in another register when Alarms_Clear_DAQ is momentarily set and then cleared. Everything works as expected if I put a MomentaryButton on to my form, make sure output type is set to "MomentarySet", put "Alarms_Clear_DAQ" for the PLCAddressClick value, and then click the MomentaryButton with the mouse.
However, I want to simulate clearing that value in code and not with a button that has to be clicked. What is the best way to simulate a Momentary button in code? Thanks.
(I've tried using a basiclabel with PLCAddressValue set to "Alarms_Clear_DAQ" and a timer control set to 300 ms. I thought I could just set "basiclable1.value = "True" and then after the timer "ticked", set it back to "False", but that didn't work in my testing.)