Indraworks(Codesys) FB non-retentive

dwoodlock

Lifetime Supporting Member
Join Date
Nov 2012
Location
Cincy/nKY
Posts
568
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.

Screenshot 2022-10-13 163906.png Screenshot 2022-10-13 164930.png
 
Last edited:
The FB will retain it's values when it's enable goes false. For that reason, I typically (not always) do not condition the Enable of the FB and just have it always set to true. Instead, I'll have an input on the FB, that if it goes false, reset all the internal variables of the FB to initial values or whatever, which is done internally in the FB. So, the code that you have now that is conditioning the Enable of the FB, have that instead condition an input on the FB and also set the enable of the FB to True.

That's how I do it at least.
 
Thanks for the feedback, the thought had crossed my mind, but I guess I was anticipating there was a more elegant way of which I wasn't aware of.


Again appreciate it!
 

Similar Topics

I'm a very novice user of Bosch-Rexroth IndraWorks, and thus CoDeSys v3, and hit the ground running with the IndraLogic XM22 controller without...
Replies
0
Views
2,349
Hi all, My objective is to send data of type int, bool, string etc from the PLC to PC via TCP sockets. I have used the client/server codes to...
Replies
2
Views
2,253
Hi, I'm trying to configure a new system using IndraWorks Engineering and I can't make any progress with it. I think the problem at the moment...
Replies
0
Views
1,823
I have a destacker that is running 4 Bosch Rexroth sercos servos and the whole system is Bosch Rexroth. i have on of my servo giving me SW limit...
Replies
0
Views
2,560
Ok, I should start off that I inheirted this system from my predecessor. I am attempting to load a program that was written for this and I can't...
Replies
0
Views
1,883
Back
Top Bottom