Hello fellow B&R programmers.
I am using AS 6.3 and have configured PackML synchronized unit with 8 synchronized modules.
Problem I have is it behaves not really as an synchronized unit to me. Modules are automatically switching from Resetting to Idle without waiting till all other modules + Main unit sets State complete. Same happens with the Starting and probably all other states.
Main unit switches to the next state not when State complete comes from all child modules, but when all child modules are switched to the next state.
Is it how it is meant to be in B&R or is it a bug?
As I studied the documentation, parent module should allways wait till all State complete bits are set and then switch to next state. Please correct me if I am wrong here.
I will be glad for any info about this.
Communication between the modules is explained here: Communication between Modules
In general it depens on the type of state change. When changing from a waiting state (e.g. IDLE
to Starting
), first the root module will switch to Starting
, then the command is passed through the hierarchy. Then, once all modules are done with their Starting
logic, the child-modules will have to switch to Execute
first (using the StateComplete
, “parent” modules can only switch once all their children are in Execute
.
The same applies to all other state changes as well. If a command (Reset, Start, …) is required, the parents switch first, otherwise the children switch first, and the parent waits for them.
I hope this can clear it up a bit.
Please note that mapp PackML also allows changing the configuration so that modules do not necessarily have to follow their parent / children…