mr_electrician Posted April 14, 2020 Report Posted April 14, 2020 Hello forum. I am creating some code for a machine that will have 12 bays doing the exact same thing. For example each bay will have the following: 3 Modes (Empty, Charging, Charged) Timer (SP set from touch screen) I have started to write the code but before I get too far into it I was wondering how more experienced OMRON programmers would go about this. I know there is a better way than duplicating the same code for each bay with the only difference being a register pointer. I have attached my 2 routines for you to see how I have been approaching this. KepServer_Data.cxr Charge_Timers.cxr
chelton Posted April 14, 2020 Report Posted April 14, 2020 Does your processor support function blocks?
mr_electrician Posted April 14, 2020 Author Report Posted April 14, 2020 11 hours ago, chelton said: Does your processor support function blocks? I have a CP1H It is funny you mention this as I was wondering last night while falling asleep if that would be the right approach and how to go about making one.
mr_electrician Posted April 14, 2020 Author Report Posted April 14, 2020 After watching a couple YouTube videos I went ahead and created my first ever FB. Thanks @chelton for the advise!! There is more massaging to do with it but so far it works as I need it to! 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now