FIFO SFWR and SFRD (FX2N PLC) question

Marcuz

Member
Join Date
Apr 2015
Location
Norway
Posts
2
Hey!

I'm currently in the process of making a simple queuing system for an elevator model, it technically is nothing big, but I'm having an issue, and im not sure how I could work around it.

My issue is as following, I'm trying to use the SFWR and SFRD functions in GX IEC Developer for the FX2N PLC. But here's the issue:

I have an array, 0 to 7, integer(8 lenght) "QueueRegister" that I'm writing the floor number to every time the elevator is called to a floor. The issue is that it seems to write the floor number to every array key apart from the main index where it puts the lenght of the array, and if I call it to a different floor it ignores any input before the value has been read with SFRD causing the floor to jump to the next one, which is exactly what I want

BUT! Since it only writes one value to the FIFO stack is there any way I can write multiple, and when read it just shifts the old value to the right, and the new one to the left? I've tried using WSFR and WSFL but I keep getting a "List File Error H3 D1 H7 H1". Has anyone got any idea how I could make a queue system like this work as I want it to?

Any help or tips are appreciated,
Thanks in advance!
 
Hey!

I'm currently in the process of making a simple queuing system for an elevator model, it technically is nothing big, but I'm having an issue, and im not sure how I could work around it.

My issue is as following, I'm trying to use the SFWR and SFRD functions in GX IEC Developer for the FX2N PLC. But here's the issue:

I have an array, 0 to 7, integer(8 lenght) "QueueRegister" that I'm writing the floor number to every time the elevator is called to a floor. The issue is that it seems to write the floor number to every array key apart from the main index where it puts the lenght of the array, and if I call it to a different floor it ignores any input before the value has been read with SFRD causing the floor to jump to the next one, which is exactly what I want

BUT! Since it only writes one value to the FIFO stack is there any way I can write multiple, and when read it just shifts the old value to the right, and the new one to the left? I've tried using WSFR and WSFL but I keep getting a "List File Error H3 D1 H7 H1". Has anyone got any idea how I could make a queue system like this work as I want it to?

Any help or tips are appreciated,
Thanks in advance!


It sounds like you need to use the pulse form of the instruction, or use a rising edge pulse for the floor call button. Try changing the instruction to SFWRP.

Hope this helps,
Dave
 

Similar Topics

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
216
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
961
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,869
Hello everyone, has anyone out there ever made a FIFO using an FFL and FFU instructions on a Micro800? I have tried setting it up just as I would...
Replies
9
Views
3,116
I have a bottle capper that is using an encoder and FIFO logic to track the free standing bottles passing through a bottle capper. I have checked...
Replies
31
Views
11,673
Back
Top Bottom