eWON Skip Bootup Logging

Hey Guys,

What would be a quick and easy way to have an eWon not log values on the first cycle of boot-up?

The customer is historically logging the tags with a deadband of 1. Whenever the eWON reboots, it logs the tags (presumably because the tag values change from 0 back to whatever the Modbus registers are).

I’m thinking the solution would be a small amount of BASIC code that would run once, and would set whatever the trigger logging tag was to the Modbus value. Then once it goes into the rest of the code, there would be no change.

What are your thoughts?

Thanks!

Hi @nickTriPhase1

You could try the following steps:

  1. Create an eWON memory Boolean tag.
  2. In the init section set its value to 0.
  3. Set a timer using TSET for a length of time (like 10 seconds), and at the end of the timer, go to a section where you set the tag to 1 and disable the timer from happening again by setting the timer to 0.

Init Section

BootupTag@ = 0
TSET 1,60
ONTIMER 1, "goto ChangeBootupTag"

ChangeBootupTag Section

ChangeBootupTag:
BootupTag@ = 1
TSET 1,0            //Stops the timer

On any code that you run for an ONCHANGE, you can do an if statement to verify that the tag is set to 1 and not 0.

IF (BootupTag@ = 1) THEN
    (your logging script here)
ENDIF

Does that make sense or help at all? Let us know if you have any other questions!

Best,
Ashley