Examples of writing and
reading RS 120
Activating the software protection in the start-up blocks:
(If you activate the protection in the program, it is best to activate it
in a start-up OB (OB 20, OB 21, OB 22, OB 38).)
:
:L KH C0AF KH = bit pattern "specify password"
: (password = 00AFH)
:T RS 120
:
Evaluate result in RS 120:
Using the following sequence of STEP 5 operations in OB 1 or OB 39, you can
react to an error occurring when specifying the password by evaluating the
result.
Note that the result can only be evaluated after certain actions of the
system program (see page 8 - 35).
:
:L RS 120
:L KB 0
:><F
:JC FB yyy call function block for error processing
NAME : PW-ERROR
:
Delete and modify the password on the PG using the OUTPUT
ADDRESS function:
Initial status: The CPU is in the RUN or STOP mode.
Go through the following procedure on the PG:
1. Output the address E F078H.
2. Delete the old password by overwriting the content with 80AFH in
hexadecimal ("00AFH" = old password).
3. Wait at least as long as the cycle time of OB 39 or OB 1.
4. Output the address E F078H again.
5. Enter the new password "1234H" by overwriting the content with the
hexadecimal number D234H.
Bit Assignment of the System Data Words
CPU 948 Programming Guide
C79000-G8576-C848-04
8 - 39