EngNate
Member
In Easy Builder Pro:
Unexpected results...
I've got a toggle switch set to trigger a macro to write a specified integer or a 0 depending on the state each time it is operated. Sometimes it works (updates correctly) and sometimes it doesn't, it seems random to me.
I've got:
TS_0(LB_0)
LD_0(LW_0)
and
macro_command main()
bool bA=0
short a=0
GetData(bA, "Local HMI",LB,0,1)
if bA==true then
a=0
else
a=1
end if
SetData(a,"Local HMI",LW,0,1)
end macro_command
Please pardon my ignorance, I'm an old dog learning a new trick...
TIA
Unexpected results...
I've got a toggle switch set to trigger a macro to write a specified integer or a 0 depending on the state each time it is operated. Sometimes it works (updates correctly) and sometimes it doesn't, it seems random to me.
I've got:
TS_0(LB_0)
LD_0(LW_0)
and
macro_command main()
bool bA=0
short a=0
GetData(bA, "Local HMI",LB,0,1)
if bA==true then
a=0
else
a=1
end if
SetData(a,"Local HMI",LW,0,1)
end macro_command
Please pardon my ignorance, I'm an old dog learning a new trick...
TIA