开云体育

Re: LogixNG timer function use #logixng


 

Jerry,

Does this logic work for you?

I am not able to get it working when using simulated sensor changes filling in for MQTT. ?What happens is that after a couple of sequences, an old timer expires and resets ACK and Activate.

Dave Sand



----- Original message -----
From: "JerryG via groups.io" <jerryg2003=[email protected]>
Subject: Re: [jmriusers] LogixNG timer function use #logixng
Date: Saturday, January 18, 2025 9:52 PM

Thanks Dave!? Here is where I ended up:
?
LogixNG: CnctLost: MQTT E32-RFID02
? ? ConditionalNG: Heartbeat stopped ::: Startup
? ? ? ? ! A
? ? ? ? ? ? If Then Else. Execute on change
? ? ? ? ? ? ? ?::: Local variable "Timer", init to Integer "7"
? ? ? ? ? ? ? ? ? If
? ? ? ? ? ? ? ? ? ? And. Evaluate Needed
? ? ? ? ? ? ? ? ? ? ? ? ? E1
? ? ? ? ? ? ? ? ? ? ? ? ? ? Sensor Ack:E32-RFID02 is Active
? ? ? ? ? ? ? ? ? ? ? ? ? E2
? ? ? ? ? ? ? ? ? ? ? ? ? ? Sensor HB:RFID02 is Active
? ? ? ? ? ? ? ? ? ? ? ? ? E3
? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ! Then
? ? ? ? ? ? ? ? ? ? Many
? ? ? ? ? ? ? ? ? ? ? ? ! A2
? ? ? ? ? ? ? ? ? ? ? ? ? ? Execute A after by local variable Timer in unit Seconds. Ignore on repeat. Use individual timers
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! A
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? If Then Else. Always execute
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? If
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? // Heartbeat should have changed...if not, a problem
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Sensor HB:RFID02 is Active ::: No Listen
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! Then
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Many
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! A1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set sensor Ack:E32-RFID02 to state Inactive
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! A2
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set light Activate:RFID02 to state Off
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! Else
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ! Else
? ? ? ? ? ? ? ? ? ? If Then Else. Always execute
? ? ? ? ? ? ? ? ? ? ? ? ? If
? ? ? ? ? ? ? ? ? ? ? ? ? ? Sensor HB:RFID02 is Inactive
? ? ? ? ? ? ? ? ? ? ? ? ! Then
? ? ? ? ? ? ? ? ? ? ? ? ? ? Execute A after by local variable Timer in unit Seconds. Ignore on repeat. Use individual timers
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! A
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? If Then Else. Always execute
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? If
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? // Heartbeat should have changed...if not, a problem
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Sensor HB:RFID02 is Inactive ::: No Listen
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! Then
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Many
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! A1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set sensor Ack:E32-RFID02 to state Inactive
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! A2
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Set light Activate:RFID02 to state Off
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! Else
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ? ! Else
?Jerry
___________________________________
jerryg2003@...

Join [email protected] to automatically receive all group messages.