dschmiddr
Member
If I have an integer and I want it to increment one value every time a condition becomes true then how can I write that logic in structured text. For example
if MachineState = 0 then
DownCount := DownCount + 1;
But when I run this code the DownCount increments by one every scan. I can't get the logic to work. Surely this is a common scenario and I would appreciate anybody's help. Thank you.
if MachineState = 0 then
DownCount := DownCount + 1;
But when I run this code the DownCount increments by one every scan. I can't get the logic to work. Surely this is a common scenario and I would appreciate anybody's help. Thank you.