We are moving! We are currently migrating our community to the new Bosch Connected Industry Online Portal. The community will be available latest in the new year again, until then it will be in read-only mode. Click here for more information.
06-15-2022 02:34 PM
In current project there is a safety light grid controlling valve terminal ouputs voltage. One part of the machine is loading mechanism, which runs all the time and loads components when it is necessary. During this operation about 6 mechanical movements are executed in one sequence.
During the cycle, operator puts some parts into the machine and iterrupts signal from safety light grid which producess error mesages from BasMove objects because of missing air pressure at valve terminal.
I would like to suppress these messages when the light grid is interrupted, but I do not how to do that correctly. Is it possible to pause chain or object execution when the grid inactive?
Solved! Go to Solution.
06-17-2022 10:56 AM - edited 06-17-2022 04:18 PM
You can pause a chain with _env.ChainControl:=OpconChainControl.PAUSE (and implement OnChainPause with return value OK to continue chain).
But once an object command is started, it cannot be paused. Therefore the chain pause doesn't help you.
The only solution that comes into my mind: if the light grid is interrupted, the BasMoves must be canceled (e.g. implement the method CmdHandlerUnit._manageLightGrid). I would suggest to use BasMove.Unit.Execute:=FALSE to cancel only the BasMoves that are already running. BasMove.Unit.Cancel:=TRUE would cancel also the ones that are currently not running.
Very important is the waiting step in your chains: You cannot use the default implemention with CheckUnitDone or ExecuteUnit. You must explicitly check for ExecState=CANCEL (or ExecState=READY which will be reached after cancel) and then jump back to the start step (or just set Execute again to repeat the command).
When repeating the command, you could get a PreStartCheck error if the cylinder is not in a defined end position. You can prevent this error with one of these settings:
06-17-2022 03:22 PM
Steffen, thank you for sharing your ideas 👍! I will try to implement it and later I will post there some result or example.