PLC Pie Guy
Member
Good Morning all.
I want to get a little feedback on a piece of code I wrote. I actually started working on this using a BSL instruction but found it wasn't what I wanted. I tried using this SQO instead. If your interested in looking, be sure to never mind what the source, destination and mask is on the SQO instruction, as none of these are examined anywhere else in the code. I am specifically using the SQO for its position.
My question is this.
What do you think of what I have done here? I have never used a SQO in this manner. It works, and works well in the application. However, I just want to know what you would think about it should you have to come on site someday and open this project. Would it be one of those, "What the ^%&%$ was this guy thinking?"
I am open for suggestions of other approaches to the same solution.
Sorry for this crappy image. Check out the PDF!
Thanks
Just to explain, there are 3 fruit peeling machines sitting in a line up with a return carousel to re-run any fruit not taken on the first pass. Each machine will call for fruit with the instruction tagged #1_Calling and so on.
After one has called for an allotted amount of time, the next is allowed to receive fruit. For a short duration the gate of the previous machine calling is open for a little while the gate of the next peeler in line opens.
If any machines are not calling for fruit, the position simply gets bumped up to the next, if it is not calling, again the position gets incremented. If no peelers are calling the position is continuously incrementing and re-setting waiting for a machine to call.
Thanks to any interested.
I want to get a little feedback on a piece of code I wrote. I actually started working on this using a BSL instruction but found it wasn't what I wanted. I tried using this SQO instead. If your interested in looking, be sure to never mind what the source, destination and mask is on the SQO instruction, as none of these are examined anywhere else in the code. I am specifically using the SQO for its position.
My question is this.
What do you think of what I have done here? I have never used a SQO in this manner. It works, and works well in the application. However, I just want to know what you would think about it should you have to come on site someday and open this project. Would it be one of those, "What the ^%&%$ was this guy thinking?"
I am open for suggestions of other approaches to the same solution.
Sorry for this crappy image. Check out the PDF!
Thanks
Just to explain, there are 3 fruit peeling machines sitting in a line up with a return carousel to re-run any fruit not taken on the first pass. Each machine will call for fruit with the instruction tagged #1_Calling and so on.
After one has called for an allotted amount of time, the next is allowed to receive fruit. For a short duration the gate of the previous machine calling is open for a little while the gate of the next peeler in line opens.
If any machines are not calling for fruit, the position simply gets bumped up to the next, if it is not calling, again the position gets incremented. If no peelers are calling the position is continuously incrementing and re-setting waiting for a machine to call.
Thanks to any interested.
Attachments
Last edited: