You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will ensure that the user has a consistent interface with => MoveUp.Busy, MoveUp.Done, MoveUp.Error, MoveUp.Aborted
The components implement the commands something like:
IF THIS^.command.moveup.consume THEN
//Start executing the command
END_IF
IF commandIsComplete THEN
THIS^.command.moveup.finished();
ELSIF commandIsError THEN
THIS^.command.moveup.error(ErrorID);
END_IF
There is also a concept that is more OOP that looks like:
IF startMove THEN
startMove := FALSE;
myComponent1.moveUp( position1, velocity, PlcopenStatus);
myComponent2.moveUp( position2, velocity, PlcopenStatus);
END_IF
IF PlcOpenStatus.busy.. done.. error THEN
END_IF
The above method allows for method calls where the status is passed in and all the commands can be treated as a single command when checking the status. This still guarantees that the status follows the PLCOpen function block behavior.
There is a bit more complexity than this, but it give the general concept.
The Twincat version is based on our B&R ATN library but it does have more of an OOP vibe. You can find those docs here for more context:
Hello,
Is there any example of using to TcCommand understand it?
thanks Víctor.
The text was updated successfully, but these errors were encountered: