Guys(and gals) I'm stumped on this one.
Below is the text of a rung that seems to defy logic. Datatypes for Label_ID and Label_ID_Loaded are string. pallet_label_length is a dint with a value of 3.
The intent is that when a new label_ID is entered, if the length is correct, it increments the counter by 1. the NEQ at the beginning should ensure that the rung only is true for one scan.
The problem is it only functions like this if the ID length is kept the same. I.e. a 3 character ID is replaced with a 3 character ID. If a valid ID is entered it executes once, then if an invalid length ID is entered, it does not execute as you would expect, but when the correct 3 character length ID is entered again, it executes twice. Can anyone explain why this is?
Pulling my hair out just trying to understand what's going on here at this point.
NEQ(Label_ID,Label_ID_Loaded)EQU(Label_ID.LEN,pallet_label_Length)XIC(bit)CPS(Label_ID,Label_ID_Loaded,1)CTU(test_ctr3,?,?);
Below is the text of a rung that seems to defy logic. Datatypes for Label_ID and Label_ID_Loaded are string. pallet_label_length is a dint with a value of 3.
The intent is that when a new label_ID is entered, if the length is correct, it increments the counter by 1. the NEQ at the beginning should ensure that the rung only is true for one scan.
The problem is it only functions like this if the ID length is kept the same. I.e. a 3 character ID is replaced with a 3 character ID. If a valid ID is entered it executes once, then if an invalid length ID is entered, it does not execute as you would expect, but when the correct 3 character length ID is entered again, it executes twice. Can anyone explain why this is?
Pulling my hair out just trying to understand what's going on here at this point.
NEQ(Label_ID,Label_ID_Loaded)EQU(Label_ID.LEN,pallet_label_Length)XIC(bit)CPS(Label_ID,Label_ID_Loaded,1)CTU(test_ctr3,?,?);