Using SQO Position

PLC Pie Guy

Member
Join Date
Jun 2013
Location
Halifax
Posts
1,144
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.

Calling_Logic.jpg
 

Attachments

  • Calling.pdf
    39.1 KB · Views: 27
Last edited:
I never cease to amaze myself.
I guess I could have used a simple CTU or even an add instruction.
Thinking way to hard on this one. But that's how one learns, the process of trial, error and self evaluation!
I still am open to other methods of completing the task at hand.

Thanks
 
I am prevented from downloading/ opening these files, it rules.
I do not like sequencers, period. Never will.
Most maintenance guys don't know what they are, how they work, how to debug them, or modify them. A co-worker loved them, that's how he got the job programmed so fast. He left and I had to deal with his mess.
No documentation, no comments, no manual. We had to pay this guy who knows what to help me even understand what was going on.

I would use ladder logic, that's me.

james
 
Hi I would use an integer to control which peeler is in use.


1.Use Peeler 1
2 Use Peeler 2

etc

I would avoid using SQO if your not using it as a proper sequence it will just confuse people
 
I am prevented from downloading/ opening these files, it rules.
I do not like sequencers, period. Never will.
Most maintenance guys don't know what they are, how they work, how to debug them, or modify them. A co-worker loved them, that's how he got the job programmed so fast. He left and I had to deal with his mess.
No documentation, no comments, no manual. We had to pay this guy who knows what to help me even understand what was going on.

I would use ladder logic, that's me.

james

I guess that's the matter of opinion. sequencers were the very first thing I learned in PLC programming, and I will tell you, it took me a while to understand it. It is used widely in CIP systems for the food industry. That's exactly where I started, CIP systems. I find the sequencer quick and easy. However, I do agree that in this case, the SQU is not the best suitor, (simply the result of some messing around today on the test bench) and I am working on changing it. But, you will find sequencers in many other projects that I have done. The fact that the code you were left with was a mess was not the fault of the sequencer but the programmer himself. Usually when I do use one, there is a laminated copy of the bit pattern in binary, laminated and placed in the panel so that if anybody was willing to take the few minutes to read and understand it, they could.

Should also mention, we have no maintenance personnel that even knows what the code is or how to open a program for that matter. Not saying its right or wrong, but that's the case. I would be really reluctant to let somebody at this anyway, unless I'm confident that they could teach ME something. I don't need anymore 2AM calls saying "we messed the code up" when there was simply a photo eye blocked by debris. IT HAPPENS!

cdj1969, I am using your suggestion.

Thanks to all interested readers.
 
Last edited:
I understand how you feel.
It's just that everytime I have had to work with sequencers, there is nothing in the way of documentation.

as I said, I had to clean up after my co-worker and spent 2 months commenting his code and writing documentation on how the machine worked.
getting all sort of calls in the meantime.
since they got the manual and I did my best to train the guys on sequencers,
they have had no problems.

If you document everything, there should be no problems.
If you don't, you get the 2 am calls.

side note, i'm the guy on call 24/7 for the next week or so, I then turn it over to my co-worker for a while.

2 am calls are definitely the pits when you get back to sleep at 4 and the alarm goes off at 5:30.

james
 
I understand how you feel.
It's just that everytime I have had to work with sequencers, there is nothing in the way of documentation.

as I said, I had to clean up after my co-worker and spent 2 months commenting his code and writing documentation on how the machine worked.
getting all sort of calls in the meantime.
since they got the manual and I did my best to train the guys on sequencers,
they have had no problems.

If you document everything, there should be no problems.
If you don't, you get the 2 am calls.

side note, i'm the guy on call 24/7 for the next week or so, I then turn it over to my co-worker for a while.

2 am calls are definitely the pits when you get back to sleep at 4 and the alarm goes off at 5:30.

james


5:30 I wish. I'm at my desk by then. I really must be crazy, half hour drive on top of that.
Good to hear that you have somebody else on call sometimes. I am the 365 days a year call in guy.
We run six days and nights a week, even then I get calls on Saturday if sanitation can't get something to workšŸ˜­šŸ˜­
 

Similar Topics

Hi everybody, I'm new at this and I have a problem. I'm in college trying to learn had to program PLC's and I have to do this lab as follows: It...
Replies
9
Views
3,447
Hi, I'm trying to use the IO Device Library (Product Versions) which is configured to work with the 1756-EN4TR & 1756-EN2TR but my system uses...
Replies
0
Views
26
Hello, As part of our project, we are using an M241 controller. This controller interfaces with an industrial computer and a router via a switch...
Replies
2
Views
54
I'm trying to write a data in Arduino using MODWR function block .I used the code I got from online for both PLC and Arduino. I made the wiring...
Replies
4
Views
71
Hey all, i have a panelview screen (image attached), with 4 items on it. Program 1, Program 2, ...3, ...4. The PLC i am using is a compactlogix...
Replies
5
Views
151
Back
Top Bottom