uptown47
Lifetime Supporting Member
Hi all,
I was messing around with a counter today, using the Set and Preset Value inputs. I would normally post a picture of the code but, as I haven't got S7 on this computer, I'll just describe the 2 lines of ladder and the unusual outcome I experienced to see if anyone has an explaination...
Network 1:
If I0.0 comes on MOVE 8 into MW20
Network 2:
A Counter with I0.1 on the SET input and MW20 on the PRESET VALUE input.
Behaviour:
Switch I0.0 on and MW20 is equal to 8
Switch I0.1 on and 8 goes into the counter
All fine
Change the value to 10 and do the same, PLC goes to STOP mode
Same behaviour with values 11,12,13,14,15 (i.e. all the HEX letters).
When the value is 16, the counter works again
This is something to do with values that are represented with letters in HEX.
I had the same problem with 170 (i.e. AA) but not with 60 (i.e 96)
???
Anyone any ideas why this might be??
I was messing around with a counter today, using the Set and Preset Value inputs. I would normally post a picture of the code but, as I haven't got S7 on this computer, I'll just describe the 2 lines of ladder and the unusual outcome I experienced to see if anyone has an explaination...
Network 1:
If I0.0 comes on MOVE 8 into MW20
Network 2:
A Counter with I0.1 on the SET input and MW20 on the PRESET VALUE input.
Behaviour:
Switch I0.0 on and MW20 is equal to 8
Switch I0.1 on and 8 goes into the counter
All fine
Change the value to 10 and do the same, PLC goes to STOP mode
Same behaviour with values 11,12,13,14,15 (i.e. all the HEX letters).
When the value is 16, the counter works again
This is something to do with values that are represented with letters in HEX.
I had the same problem with 170 (i.e. AA) but not with 60 (i.e 96)
???
Anyone any ideas why this might be??