Hi all,
I am playing around with omron at the moment. I have a CJ1M CPU22 plc and cx programmer version 9.4 to test with. Currently i am working with the simulator only.
I have successfully created an encoder based product tracking / reject detection with system using multiple fifo stacks and i have the code working just how i like it. However now i want to package it up into a function block as i have multiple conveyors using the same identical logic. Problem is i cant get the fifo instruction to work inside the function block? All i done was copy all the logic i wanted and pasted straight into a new function block and tidied up some of the operands that didnt map how i liked into internal fb memory.
Normally the fifo is set using sset instruction and one of the operands determines the head address of the stack and the other operand is the stack depth. But inside the function block the memory is allocated differently so i created an array of type word and supplied the array[0] as the head address and correctly set the depth to match the fifo stack depth. But alas it is not working.
I am unconditionally calling the function block from the first program section.
If someone wouldn't mind quickily letting me know that i have missed something please fill me in...
I am playing around with omron at the moment. I have a CJ1M CPU22 plc and cx programmer version 9.4 to test with. Currently i am working with the simulator only.
I have successfully created an encoder based product tracking / reject detection with system using multiple fifo stacks and i have the code working just how i like it. However now i want to package it up into a function block as i have multiple conveyors using the same identical logic. Problem is i cant get the fifo instruction to work inside the function block? All i done was copy all the logic i wanted and pasted straight into a new function block and tidied up some of the operands that didnt map how i liked into internal fb memory.
Normally the fifo is set using sset instruction and one of the operands determines the head address of the stack and the other operand is the stack depth. But inside the function block the memory is allocated differently so i created an array of type word and supplied the array[0] as the head address and correctly set the depth to match the fifo stack depth. But alas it is not working.
I am unconditionally calling the function block from the first program section.
If someone wouldn't mind quickily letting me know that i have missed something please fill me in...