VJTX Member V Join Date Oct 2007 Location TEXAS Posts 126 Jan 11, 2010 #1 I would like to determine if a counter setpoint is odd or even. This is on a micrologix 1100 plc. Is the best way to do a div/2?
I would like to determine if a counter setpoint is odd or even. This is on a micrologix 1100 plc. Is the best way to do a div/2?
bernie_carlton Lifetime Supporting Member + Moderator Join Date Apr 2002 Location Yakima, Washington Posts 6,413 Jan 11, 2010 #2 If least significant bit is 1 then it is odd, else it is even. e.g. assuming T4:0 If T4:0.PRE/0 is "1" then is odd [Edit - OK, timer/counter - same idea. You want I should actually read the posting carefully?] Last edited: Jan 11, 2010
If least significant bit is 1 then it is odd, else it is even. e.g. assuming T4:0 If T4:0.PRE/0 is "1" then is odd [Edit - OK, timer/counter - same idea. You want I should actually read the posting carefully?]
TConnolly Lifetime Supporting Member Join Date Apr 2005 Location Salt Lake City Posts 6,152 Jan 11, 2010 #3 C5:0.pre/0 odd -----] [-----( )--- c5:0.pre/0 even -----]/[-----( )---
Ranjith Member R Join Date May 2007 Location Melbourne Posts 316 Jan 11, 2010 #4 If you use integer N7:0 as the counter preset. LSB is N7:0/0