In FC, all the in and in_out parameters are "move" into the stack memory. The logic is then executed in reference to # symbols which we define in the interface (in, out, in_out, temp). After which, in_out and out parameter is "move" out. This stack memory is of random value if it's not initialize. I'm not sure exactly if L or B stack memory is used in FC for this.
In contrast to FC, FB "moved" the parameter into a DB, or which Step7 call it as DI (instance DB). This is why FB is called as "blocks with memory".
Try changing the original code to a FB instead and see if it’s work the way it’s intended to be.
Cheers
In contrast to FC, FB "moved" the parameter into a DB, or which Step7 call it as DI (instance DB). This is why FB is called as "blocks with memory".
Try changing the original code to a FB instead and see if it’s work the way it’s intended to be.
Cheers