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!
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!