Basic instructions
7.8 Program control operations
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
259
Sample steps for using the RET instruction inside an FC code block:
1. Create a new project and add an FC:
2. Edit the FC:
– Add instructions from the instruction tree.
– Add a RET instruction, including one of the following for the "Return_Value"
parameter:
TRUE, FALSE, or a memory location that specifies the required return value.
– Add more instructions.
3. Call the FC from MAIN [OB1].
The EN input on the FC box in the MAIN code block must be true to begin execution of the
FC.
The value specified by the RET instruction in the FC will be present on the ENO output of the
FC box in the MAIN code block following execution of the FC for which power flow to the
RET instruction is true.
ENDIS_PW (Enable/disable CPU passwords) instruction
Table 7- 101 ENDIS_PW instruction
req:=_bool_in_,
f_pwd:=_bool_in_,
full_pwd:=_bool_in_,
r_pwd:=_bool_in_,
hmi_pwd:=_bool_in_,
f_pwd_on=>_bool_out_,
full_pwd_on=>_bool_out_,
r_pwd_on=>_bool_out_,
hmi_pwd_on=>_bool_out_,
The ENDIS_PW instruction can allow and
disallow client connections to a S7-1200
CPU, even when the client can provide the
correct password.
This instruction does not disallow Web
server passwords.
Table 7- 102 Data types for the parameters
Perform function if REQ=1
Failsafe password: Allow (=1) or disallow (=0)
Full access password: Allow (=1) or disallow (=0) full access password
Read access password: Allow (=1) or disallow (=0)
HMI password: Allow (=1) or disallow (=0)
Failsafe password status: Allowed (=1) or disallowed (=0)
Full access password status: Allowed (=1) or disallowed (=0)