Logix Riddle - Indexing

btaaa

Member
Join Date
May 2012
Location
Metro Detroit
Posts
16
I've been programming for a long time, and for some reason I'm stumped on this. I have an indexing over/under slat conveyor. There are 36 total pallet tops, with 18 operator stations. Obviously, there are always 18 on top, and 18 on the bottom return. When we have a jam up issue that requires us to reverse and reset the system, I have to go in and update each station's pallet value. I've been trying to create logic as so I only have to enter one station's number, and the rest will automatically update. Any ideas?

For example:

If we were to update lets say, station 14, with a pallet ID of 22, then station 15 would automatically update to 21, 16 to 20, etc. . . with the premise that the number starts back over at 36.

Thanks for any help

Logix5000
 
Can't you just trigger logic that makes each station's pallet equal to the previous station's -1.

You might need to tell the logic where to "start", in your example station 14, so the logic doesn't update values it doesn't have to.

Or you might be able to use a FOR loop. I'll have a play....
 
I use a scheme where each station has an "offset" assigned to it. The offset is the number of stations away from a "home" station. All that needs to be kept track of is the current pallet at the home station and then use the "home pallet" number and the offset to calculate the "station pallet" for each station. A function block or modolo calc takes care of this for each station. Makes it easy to reset or commission as you only need to enter the number of the pallet at the home station. Makes short work of a lot of other "pallet location" housekeeping as well.

Cheers

Ken
 
I use a scheme where each station has an "offset" assigned to it. The offset is the number of stations away from a "home" station. All that needs to be kept track of is the current pallet at the home station and then use the "home pallet" number and the offset to calculate the "station pallet" for each station. A function block or modolo calc takes care of this for each station. Makes it easy to reset or commission as you only need to enter the number of the pallet at the home station. Makes short work of a lot of other "pallet location" housekeeping as well.

Cheers

Ken

thanks. Will try this.
 
Can't you just trigger logic that makes each station's pallet equal to the previous station's -1.

You might need to tell the logic where to "start", in your example station 14, so the logic doesn't update values it doesn't have to.

Or you might be able to use a FOR loop. I'll have a play....

How do you handle this with pallet numbers exclusively 1-36? For instance, lets say I enter a value of 2 in station 18. The value in station 15 would be the value of station 18 minus 3, which would then equal -1. I know that with a ton of ladder I can accommodate this, but I'm not seeing anything simple for this.
 
How do you handle this with pallet numbers exclusively 1-36? For instance, lets say I enter a value of 2 in station 18. The value in station 15 would be the value of station 18 minus 3, which would then equal -1. I know that with a ton of ladder I can accommodate this, but I'm not seeing anything simple for this.

Let me requote the problem, and see if I am understanding the issue....

You have 18 operator stations numbered 1 to 18

Each operator station has a pallet on it, pallets are numbered 1 - 32.

So you could have ....

Code:
Station:  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18
Pallet :  6  5  4  3  2  1 32 31 30 29 28 27 26 25 24 23 22 21
Is this correct ?

You want to be able to "Reset" the system by entering just one pallet number into any one station ?

EDIT : Would it be acceptable to always update station 1 with the pallet number on it, and the rest will re-number automatically ?
 
Last edited:
Let me requote the problem, and see if I am understanding the issue....

You have 18 operator stations numbered 1 to 18

Each operator station has a pallet on it, pallets are numbered 1 - 32.

So you could have ....

Code:
Station:  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18
Pallet :  6  5  4  3  2  1 32 31 30 29 28 27 26 25 24 23 22 21
Is this correct ?

You want to be able to "Reset" the system by entering just one pallet number into any one station ?

EDIT : Would it be acceptable to always update station 1 with the pallet number on it, and the rest will re-number automatically ?


Yes, 18 stations, 36 total pallet tops. It's an over/under slat conveyor, so only half the pallets are on top at any given time, while the other half are returning underneath. I don't care whats returning underneath. Example:

Station 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Pallet # 32 33 34 35 36 1 2 3 4 5 6 7 8 9 10 11 12 13
Under# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14

I would like to enter a number into station 18, and then have stations 1-17 update automatically, without a hundred rungs of logic.
 
I would like to enter a number into station 18, and then have stations 1-17 update automatically, without a hundred rungs of logic.

I've written the code so you can update station 1, and the rest will follow - will that help you ?

EDIT : Modified so you can update Station 18 as you requested..... just 2 rungs of code
 
Last edited:
Here is the code - all working....

The rung without the branch triggers the "Update_Pallets" "FOR-NEXT" loop

2018-02-06_142938.jpg 2018-02-06_142958.jpg
 
Here is the code - all working....

The rung without the branch triggers the "Update_Pallets" "FOR-NEXT" loop

The code actually works and updates the data correctly, but I get a Major Fault every time I enter the number.

(Type 4)Program Fault
(Code 20) Array subscript too large, or CONTROL data type POS or LEN invalid
Main Task
Main Program
Update_Pallets
Rung 1 (your CPT and SUB rung)

I have all addresses referenced as DINTs.

I have both rungs in separate ladder files (Putting both rungs in same ladder file Major Faults automatically)

Again, only faults out when I update the pallet number - although the data updates correctly.
 
The code actually works and updates the data correctly, but I get a Major Fault every time I enter the number.

(Type 4)Program Fault
(Code 20) Array subscript too large, or CONTROL data type POS or LEN invalid
Main Task
Main Program
Update_Pallets
Rung 1 (your CPT and SUB rung)

I have all addresses referenced as DINTs.

I have both rungs in separate ladder files (Putting both rungs in same ladder file Major Faults automatically)

Again, only faults out when I update the pallet number - although the data updates correctly.

I have it working here, no problem.... tried it several times and no major faults.

Are you using an 18-element array for your stations ?

Have you modified it to use array indexes 1 to 18 to match the station numbers ?

I suspect you might have put a JSR to the Update_Pallets routine. Not needed, the FOR instruction calls this routine the required number of times...

2018-02-07_125955.jpg 2018-02-07_130016.jpg 2018-02-07_130035.jpg
 
Last edited:
I have it working here, no problem.... tried it several times and no major faults.

Are you using an 18-element array for your stations ?

Have you modified it to use array indexes 1 to 18 to match the station numbers ?

I suspect you might have put a JSR to the Update_Pallets routine. Not needed, the FOR instruction calls this routine the required number of times...

Thanks, it was the JSR. I've never used the FOR command. I've never used a lot of the commands, unfortunately. Thanks for the help. This was a stumper for me. Will integrate and give her a go.
 
Thanks, it was the JSR. I've never used the FOR command. I've never used a lot of the commands, unfortunately. Thanks for the help. This was a stumper for me. Will integrate and give her a go.

It is one that catches many....

The usual complaint that something doesn't work is due to the subroutine not being called (by a JSR).

The FOR instruction is, I think, the only other instruction that calls a subroutine, and people often forget about it, see an "un-called" sub, and slap a JSR in. That's when controllers fault....
 
Last edited:
It is one that catches many....

The usual complaint that something doesn't work is due to the subroutine not being called (by a JSR).

The FOR instruction is, I think, the only instruction that calls a subroutine, and people often forget about it, see an "un-called" sub, and slap a JSR in. That's when controllers fault....

Yea, I'm surprised it lets you save something like that. Pretty significant.
 

Similar Topics

I have been doing logic programming and troubleshooting for about 25 years. I started working for a new company as PLC Application Engineer and I...
Replies
5
Views
113
We are trying to poll data coming from a PLC for remote monitoring we have the IP address of the PLC and the default port number and the path is...
Replies
25
Views
414
I am currently backing a Micro Logix 1100 and no-one seems to have the file for me to upload from. Is there a way for me to upload the project off...
Replies
15
Views
341
Hi everyone i have a customer, who wants to show an alarm on the machine, if the I/O forces are enabled and set, on at ControlLogix L81E with...
Replies
3
Views
138
Does anyone know how to set the background colors of instuction blocks (TON, MOV, etc)?
Replies
1
Views
86
Back
Top Bottom