99BProgramming concepts
6.6 Protection
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
153
Effect of Ret_Val or Status parameters on ENO
Some instructions, such as the communication instructions or the string conversion
instructions, provide an output parameter that contains information about the processing of
the instruction. For example, some instructions provide a Ret_Val (return value) parameter,
which is typically an Int data type that contains status information in a range from -32768 to
+32767. Other instructions provide a Status parameter, which is typically a Word data type
that stores status information in a range of hexadecimal values from 16#0000 to 16#FFFF.
The numerical value stored in a Ret_Val or a Status parameter determines the state of ENO
for that instruction.
●
Ret_Val: A value from 0 to 32767 typically sets ENO = 1 (or TRUE). A value from -32768
to -1 typically sets ENO = 0 (or FALSE). To evaluate Ret_Val, change the representation
to hexadecimal.
●
Status: A value from 16#0000 16#7FFF typically sets ENO = 1 (or TRUE). A value from
16#8000 to 16#FFFF typically sets ENO = 0 (or FALSE).
Instructions that take more than one scan to execute often provide a Busy parameter (Bool)
to signal that the instruction is active but has not completed execution. These instructions
often also provide a Done parameter (Bool) and an Error parameter (Bool). Done signals that
the instruction was completed without error, and Error signals that the instruction was
completed with an error condition.
●
When Busy = 1 (or TRUE), ENO = 1 (or TRUE).
●
When Done = 1 (or TRUE), ENO = 1 (or TRUE).
●
When Error = 1 (or TRUE), ENO = 0 (or FALSE).
6.6
Protection
6.6.1
Access protection for the CPU
The CPU provides 3 levels of security for restricting access to specific functions. When you
configure the security level and password for a CPU, you limit the functions and memory
areas that can be accessed without entering a password.
The password is case-sensitive.
To configure the password,
follow these steps:
1.
In the "Device configuration",
select the CPU.
2.
In the inspector window,
select the "Properties" tab.
3.
Select the "Protection"
property to select the
protection level and to enter a
password.