PLC Pie Guy
Member
Hey there.
I have a question about a small piece of logic that I have just posted.
It looks okay I think but on rung two, with a single toggle of the pgmrs_bit2 why is it that my SUB instruction always decrements by more than 1. Example: I toggle the pgmrs_bit1 on rung 1 and the value of N7:0 goes up by 1, but a single toggle of pgmrs_bit2 always takes it to a minus value. If I toggle the pgmrs_bit1 twelve times, then toggling bit 2 will take me to a minus 12. Any thoughts on this?
Thanks in advance!
I have a question about a small piece of logic that I have just posted.
It looks okay I think but on rung two, with a single toggle of the pgmrs_bit2 why is it that my SUB instruction always decrements by more than 1. Example: I toggle the pgmrs_bit1 on rung 1 and the value of N7:0 goes up by 1, but a single toggle of pgmrs_bit2 always takes it to a minus value. If I toggle the pgmrs_bit1 twelve times, then toggling bit 2 will take me to a minus 12. Any thoughts on this?
Thanks in advance!