托盘块需要一个托盘引用(功能块输入 "Shuttle")。该托盘引用的类型为Mc6DShuttleType。
通过MC_BR_AsmGetShuttle_Acp6D 可以获取穿梭参考。输出的托盘参考的地址可直接用于功能块。
也可以将此托盘引用存储在Mc6DShuttleType类型的过程变量中,并在以后使用。
ST code:
IF(MC_BR_AsmGetShuttle_Acp6D_0.Valid == TRUE) THEN
MC_BR_MoveInPlane_Acp6D_0.Shuttle := ADR(MC_BR_AsmGetShuttle_Acp6D_0.Shuttle);
或
Var file:
VAR
ShRef : Mc6DShuttleType;
END_VAR
ST code:
ShRef:= MC_BR_AsmGetShuttle_Acp6D_0.Shuttle;
MC_BR_MoveInPlane_Acp6D_0.Shuttle := ADR(ShRef);
The shuttle blocks require a shuttle reference (function block input "Shuttle"). This shuttle reference is of type Mc6DShuttleType.
The shuttle reference is retrieved with MC_BR_AsmGetShuttle_Acp6D. The address of the output shuttle reference can be used in the function block directly.
This shuttle reference can also be stored in a process variable of type Mc6DShuttleType and used at a later time.
ST code:
IF(MC_BR_AsmGetShuttle_Acp6D_0.Valid == TRUE) THEN
MC_BR_MoveInPlane_Acp6D_0.Shuttle := ADR(MC_BR_AsmGetShuttle_Acp6D_0.Shuttle);
or
Var file:
VAR
ShRef : Mc6DShuttleType;
END_VAR
ST code:
ShRef:= MC_BR_AsmGetShuttle_Acp6D_0.Shuttle;
MC_BR_MoveInPlane_Acp6D_0.Shuttle := ADR(ShRef);