Newbie in a jam

peterc49

Member
Join Date
Aug 2009
Location
Woodstock, Va
Posts
20
I'm an industrial electrician with Basic program in my past but little current plc programming experience. I ended up in charge of a project to program an Allen Bradley 1400a using RSlogix 500. I'm doing fairly well but have come up against a block. I'm working with a variable speed conveyor which carries items at unevenly spaced intervals and deposits them alternatingly in one of three gates. I have a product detect sensor and a belt pulse generator but I can't think of a way to store the "delivery time" of an individual item as it travels down the belt. I have a subroutine that works if there are no gaps in the product but I'm stuck if there are gaps. If you all can help, I'd really appreciate it. Thanks in advance.
 
Do you need to sort the items or do you need them to just be alternated?

Can you provide a sketch of the system?
-If you can draw it or get an existing drawing in jpeg format, you can add that drawing to a post here so we can better understand your system. Use the Attach Files button at the bottom of the reply window.

-Also, if you can zip the .rss file and add that to your post it would be very helpful as well.

Paul
 
Thanks Okie.
I calcuated the number of belt pulses it takes to get to a gate. Gate 1 is 6, Gate 2 is 23. Then based on the product count in the line, assign it a gate number and a pulse delay. I was storing the delay in an integer (N9:1 - N9:8) but I don't know how to count up from N9:1 to N9:2 when I go from Item 1 to item 2. (You may have noticed by now that I'm a bit confused) Thanks in advance for any help

Conveyor.jpg
 
Thanks Okie.
I calcuated the number of belt pulses it takes to get to a gate. Gate 1 is 6, Gate 2 is 23. Then based on the product count in the line, assign it a gate number and a pulse delay. I was storing the delay in an integer (N9:1 - N9:8) but I don't know how to count up from N9:1 to N9:2 when I go from Item 1 to item 2. (You may have noticed by now that I'm a bit confused) Thanks in advance for any help

not too clear with your question but have you tried using copy/move instruction (also comparison instructions if needed) and the output destination of N:x file in timer or counter?
 
I was storing the delay in an integer (N9:1 - N9:8) but I don't know how to count up from N9:1 to N9:2 when I go from Item 1 to item 2.
I don't have a lot of time here but it looks like you're going to need indirect addressing for this. It's covered in the instruction set reference, but briefly, the word specifier is replaced with a variable.

N9:1 becomes N9:[N7:0]

It doesn't have to be N7:0, just some integer value. It could even be a timer or counter PRE or ACC value. Manipulating this value allows the instruction to access different addresses under program control. A common example is incrementing the variable in order to step through a file.
 
There are several ways to solve this problem.

You could map the contents of the belt in a data table, and use the pulse counter to drive a pointer around the table, populating it when a new item enters and removing the correct ones when items are diverted.

Or, you can keep track of each box in transit, and update the position of all of them every scan, then when the appropriate box's position falls within the range of the diverter, then kick it out.

The first method is slick, efficient, and hard to comprehend.

The second method uses looping, a little more indirect addressing, but is easier to understand.

A third method would be to store a list of gate opening positions for each gate, and populate the lists as soon as an item is identified.

This method would be to create a set of data for each gate such that as soon as a product is detected and assigned, you calculate the pulse count range required for the gate to open.

So, product A goes to lane 2, and the pulse counter is at 200. You know that gate two needs to open at pulse count 200+23. You add those values and store them at the next available position in the list of gate trigger ranges for gate two. You need a list becaue there can be more than one item assigned to gate two in transit at any given time. Since there is a list, then you need a pointer to the next open spot on the list.

Do the same thing for the other gate in the system.

Either method will be very good at controlling the system without the potential for getting out of sequence like some FIFO sorting routines can.

They will also deal quite well with the main conveyor stopping and reversing.

All these methods would use indirect addressing as Doug described above.

So, to go further, you need to know which method to pursue. And, it doesn't have to one of these ideas, because there are still other ways to go about this.

You also need to know how many items can be in transit at any given time.

Hope this helps.

Paul
 
Thanks

Thank you all. I in fact stumbled upon indirect addresing today at work and it looks like it will work well for me. I'll post the subroutine later if anyone is interested.
 

Similar Topics

I had this project thrust upon me when the guy in charge got suspended. It is my first exposure to Rslogix 500 and the 1400a PLC. I know that the...
Replies
5
Views
1,889
I posted a new guy type question in an earlier thread. I have a follow up none related question. Is there a Allen Bradley "address knowledge" for...
Replies
4
Views
1,863
Hello all, I'm a new member here. I've joined as I want to learn about PLC programming. I've got a few questions to begin with. To get me...
Replies
37
Views
4,555
Howdy folks. Been doing PLC programming for like 15 years now in LD and ST, but I'm trying to learn SFC now and have a kind of dumb question... I...
Replies
4
Views
1,393
Hello. New to Unity and had a couple quick questions. Can a Modicon M340 output to a small multiline LCD screen and not a full HMI?
Replies
4
Views
962
Back
Top Bottom