Been a long time since I've posted, but here we go.
Started a new role in august and progressively learning about Codesys programming in indraworks v14. I have no training on Codesys, but in the past I've worked mostly with Siemens and AB. In the recent couple years I've learned Java, and also tinkered with an arduino, so the concepts are familiar.
Have run into an issue which has been a little elusive in figuring out, so I figured I'd see if there was anyone here who may know.
I have a program in which I have 4 different automatic sequences, which are similar, only different from each other in the order in which the operations take place. I have created a function block for each sequence, and I call them when specified by the recipe we will run.
The issue here is that if I run into an error and need to leave automatic mode my expectation would have been that the FB would be reinitialized when I went back into automatic and the FB was again enabled. What I have found is that the FB seems to retain the sequence information thus, if I exited the sequence during step 20, when I re-enter the FB in automatic mode instead of the block going back to its initial state it picks up where it left off.
My expectation would have been that when the block is reenabled all values within go back to their initial values. Example: in my variable declaration "iSequenceStep" is assigned a value of 0;
Image attached for reference.
Thanks in advance.
Started a new role in august and progressively learning about Codesys programming in indraworks v14. I have no training on Codesys, but in the past I've worked mostly with Siemens and AB. In the recent couple years I've learned Java, and also tinkered with an arduino, so the concepts are familiar.
Have run into an issue which has been a little elusive in figuring out, so I figured I'd see if there was anyone here who may know.
I have a program in which I have 4 different automatic sequences, which are similar, only different from each other in the order in which the operations take place. I have created a function block for each sequence, and I call them when specified by the recipe we will run.
The issue here is that if I run into an error and need to leave automatic mode my expectation would have been that the FB would be reinitialized when I went back into automatic and the FB was again enabled. What I have found is that the FB seems to retain the sequence information thus, if I exited the sequence during step 20, when I re-enter the FB in automatic mode instead of the block going back to its initial state it picks up where it left off.
My expectation would have been that when the block is reenabled all values within go back to their initial values. Example: in my variable declaration "iSequenceStep" is assigned a value of 0;
Image attached for reference.
Thanks in advance.
Last edited: