Boolean IF Statement

Hi,

I am not sure why I am having such a problem with this but I am…

I need the syntax for an IF statement using a boolean tag. What I am attempting to do is create a positive edge trigger that historically logs a tag.

I.e.
ONCHANGE “TagA” Goto CreateLog

CreateLog:
IF TagA = True Then
LOGIO “TagB”
ENDIF

Hi @russellrtsmith,

For the Ewon tags, unless it’s a string tag, the boolean will either be a value of 0 or 1. For your TagA example you should be able to do something like this

Onchange “TagA”, “Goto CreateLog”

CreateLog:
If LogA@ = 1 Then
Logio “TagB”

Endif
End

Or something like this

Onchange “TagA”, “@CreateLog()”

Function CreateLog()

If LogA@ = 1 Then
Logio “TagB”

Endfn