MLX1500 FIFO Modify

PortmanBlue

Member
Join Date
Dec 2010
Location
Australia
Posts
14
Hi, I have an application in which an operator is able to load one of four stations by pressing a load button and can cancel a load call by pressing a cancel button. Once a load button has been pressed that station's number (1, 2, 3 or 4) is loaded into a stack using the FFL instruction. Once the station is complete the station number is removed from the stack using the FFU instruction. If a station which has been loaded is cancelled before or during processing it must be removed from the stack.

My first question is, is using the FFL/FFU instructions an appropriate approach? My second question is how would I go about removing a cancelled station number from the stack when the cancelled station could be positioned anywhere within the stack?
 
The FFU/FFL pair can be useful if you need to make extensive use of the control word (position, length, DN, EM, etc.).

In order to perform the cancel operation, it might be cleaner if you don't FFL the data until it's too late to be cancelled. Perhaps you store it in a "Pending" location so it can be loaded onto the stack later.

Using a different method might serve you better since you have that cancel operation, but it really depends on what you're doing with this information (displaying it on an HMI for example).

If you can zip and post your code, that would be helpful too.

Welcome to the forum.

Paul
 
Ahh, yes, I read:
If a station which has been loaded is cancelled
that thinking of the word loaded, meaning loaded into the FFL, but I suppose it could mean any time, and at any point in the queue. If it is already being loaded with product, I suppose the cancel wouldn't have the same effect as if it finished and should advance the stack to the next position, but if it is somewhere in between, then you gotta figure out where it is in the list and remove it.

I think a different mechanism is called for here, since there are only four stations, and you just need to remember which one is next, perhaps four timers would do the trick.

When a request is made, start timing. When cancelled, reset the timer. When the machine is ready to switch to the next station, simply choose the one with the greatest accumulated value.
 
+1 for OkiePC timer method

Timer for each Station
Timer Starts when Called
Resets when Cancelled
Resets when Station Full

Each scan or feed cycle, the PLC works out which timer is largest and feeds that station

Elegantly simple, easy to code

What PLC are you using?
 
Last edited:
Thanks for the quick and very helpful replies. I will implement the timer method today, though I have a further question. When choosing the timer with the greatest accumulated value will I first need to move the accumulated value of each of the four timers into an array of registers so that the static values can be compared or will the scan time mean this is not an issue? Would a better approach be to continuously monitor the timers and update a register with the station number whose timer has the largest accumulated value, though I'm not sure how to go about this method.

@MichaelG: I'm using a MicroLogix 1500.
 
No need to move the timers.
The Timer ACC is updated when the TON instruction is executed
So if the compare code is located above or below (in scan order) all of the timers then there should not be a problem.

Possible compare Code

---- MOVE T1 Largest ---- MOV 1 Reg
T2 > LARGEST ---- MOV T2 Largest ---- MOV 2 Reg
T3 > LARGEST ---- MOV T3 Largest ---- MOV 3 Reg
T4 > LARGEST ---- MOV T4 Largest ---- MOV 4 Reg


Reg contains the Station to use, Largest is the timer value of the longest waiting station
If you want a Bit for each station then move 1,2,4,8 into Reg so Reg.0 = Station 1 Etc
 
I was thinking exactly the same for the timer compare code, thanks for clarifying the timer operation for me.

Thanks everyone for your help.
 
Thanks for the quick and very helpful replies. I will implement the timer method today, though I have a further question. When choosing the timer with the greatest accumulated value will I first need to move the accumulated value of each of the four timers into an array of registers so that the static values can be compared or will the scan time mean this is not an issue? Would a better approach be to continuously monitor the timers and update a register with the station number whose timer has the largest accumulated value, though I'm not sure how to go about this method.

@MichaelG: I'm using a MicroLogix 1500.

It shouldn't matter that the timers are changing...whichever one has the greatest value should stay in first place.

I would simply use compares directly on the timer.acc values, but carefully select whether to use GEQ and GRT so that you can declare a winner (and only one winner) in the event of a tie. If you are using MOV to put a value in a register, then you can just use GEQ and let the last rung be the winner since it will over write the register.
 

Similar Topics

I got called today by our A-B supplier to see if I could help another customer of his. They have an MLX1500 PLC with a 1769-SDN module and...
Replies
2
Views
998
Hi Gurus, After reading this forum and picking up may useful tips, I'd value some advice for PC to 2 different PLCs data transfer. The operation...
Replies
2
Views
3,693
I am not sure if this is possible but if there is a way, you guys would be the ones to know. I am currently working on a project where we are...
Replies
7
Views
184
Hello all, I'm using a 5069-L330ER in a project and I need to essentially capture some data that will be shown as a trend on a screen. The data...
Replies
9
Views
942
Hello! I have a network of conveyors bringing raw product to 4 machines. A sensor in the hopper of each machine calls for more product. I'm...
Replies
15
Views
5,688
Back
Top Bottom