limeyfellow
Member
Hi,
I'm pretty new to PLCs (about 2 weeks experience) and still learning all the commands but I had a problem and after spending a long time with the manual am no further along the way of figuring this out.
I am using an Allen-Bradley SLC 500 and been designing a program for a vending machine, and yes I didn't come up with this idea.
Anyway, I am at the stage of getting the machine to release the change, after coming up with a total in an f8 word. So I thought to myself, okay I'll just divide that amount by the first coin value.
When I do this I get a quotient saved in another f8 word, but I don't know how to save the carried remainder value to a third word so I can then divide that amount with the lesser value coin. I'm I just doing this all wrong or is there an easier way of doing this I haven't considered? For the live of me I just can't figure out how to save that remainder to use elsewhere.
Thank you for any help.
I'm pretty new to PLCs (about 2 weeks experience) and still learning all the commands but I had a problem and after spending a long time with the manual am no further along the way of figuring this out.
I am using an Allen-Bradley SLC 500 and been designing a program for a vending machine, and yes I didn't come up with this idea.
Anyway, I am at the stage of getting the machine to release the change, after coming up with a total in an f8 word. So I thought to myself, okay I'll just divide that amount by the first coin value.
When I do this I get a quotient saved in another f8 word, but I don't know how to save the carried remainder value to a third word so I can then divide that amount with the lesser value coin. I'm I just doing this all wrong or is there an easier way of doing this I haven't considered? For the live of me I just can't figure out how to save that remainder to use elsewhere.
Thank you for any help.
Last edited: