Determining if an integer is odd - Micrologix

mike64b

Member
Join Date
Oct 2011
Location
richland
Posts
77
Hey guys, wondering if this simple check is sufficient for determining if an integer is odd. I divide the number by 2 and then do a greater than zero test on S:13. If the remainder in S:13 is greater than zero, it's an odd integer, otherwise its even..

I think this should work but I wasn't positive that I'm using S:13 correctly.. thanks
 
I think my mind is totally gone.
Mine is just plain full. I need to free up some space to learn new stuff. Wish I could add a few gigs of external memory. A place to store the knowledge I don't use everyday... ;)

That thread reminded me of Terry's little 'numbers' puzzle. He'd put a number, surrounded by parenthesis, at the end of each of his posts. Drove me nuts!... :ROFLMAO:

🍻

-Eric

(109)
 

Similar Topics

We are in the process of installing a new DC drive to replace a 1373 series Speedpak drive. There are 8 leads coming out of the motor -- Two for...
Replies
5
Views
842
Good morning! I am looking for a clever method to determine the number of occurrences in a series using ladder logic. What I need to determine is...
Replies
6
Views
1,255
I have my PLC and HMI connected to my local network over DHCP just like my laptop. I can upload and download including VNC to the HMI over wifi...
Replies
2
Views
1,136
We have a DC Drive (ABB DCS800) which is running a load (initially) at a fixed speed. For testing purposes, we want to simulate a different...
Replies
20
Views
6,205
ive been tasked, due to a restructure of our inventory, to find out how big our SLC programs are. specifically, we have several dozen 5/05s at...
Replies
4
Views
1,630
Back
Top Bottom