功能块输入 "Zone "需要一个Mc6DZoneType 类型的区段引用。
区段引用通过MC_BR_AsmGetZone_Acp6D 获取。输出区段引用的地址可直接用于功能块。
也可将此区段引用存储在Mc6DZoneType类型的过程变量中,以便日后使用。
ST file:
IF(MC_BR_AsmGetZone_Acp6D_0.Valid == TRUE) THEN
MC_BR_ZonePowerOff_Acp6D_0.Zone:= ADR(MC_BR_AsmGetZone_Acp6D_0.Zone);
or
Var file:
VAR
ZoneRef: Mc6DZoneType;
END_VAR
ST file:
ZoneRef:= MC_BR_AsmGetZone_Acp6D_0.Zone;
MC_BR_ZonePowerOff_Acp6D_0.Zone:= ADR(ZoneRef);
Function block input "Zone" requires a zone reference of type Mc6DZoneType.
The zone reference is retrieved with MC_BR_AsmGetZone_Acp6D. The address of the output zone reference can be used in the function block directly.
This zone reference can also be stored in a process variable of type Mc6DZoneType and used at a later time.
ST file:
IF(MC_BR_AsmGetZone_Acp6D_0.Valid == TRUE) THEN
MC_BR_ZonePowerOff_Acp6D_0.Zone:= ADR(MC_BR_AsmGetZone_Acp6D_0.Zone);
or
Var file:
VAR
ZoneRef: Mc6DZoneType;
END_VAR
ST file:
ZoneRef:= MC_BR_AsmGetZone_Acp6D_0.Zone;
MC_BR_ZonePowerOff_Acp6D_0.Zone:= ADR(ZoneRef);