![background image](http://html1.mh-extra.com/html/omron/cx-supervisor-script-reference-rev2-0/cx-supervisor-script-reference-rev2-0_reference-manual_744212165.webp)
APPENDIX B – CX-Server Communications Control
OMRON
Page 152
Revision 2.0
Protect
The Protect function can be used to protect (or remove protection from) PLC program memory. This
function should not be used at the same time as any other PLC communications. The project and PLC
will automatically be opened if required.
This function is for advanced users only
.
Example 1 (sets protection for CS series PLC)
Dim SetProtection
Dim PasswordString
Dim PasswordNumber
EnableProtection = true
PasswordString = “Password”
PasswordNumber = 0
CXServer.Protect “PLC1”, EnableProtection, PasswordString, PasswordNumber
Example 2 (unsets protection for C series PLC)
Dim SetProtection
Dim PasswordString
Dim PasswordNumber
EnableProtection = false
PasswordString = “”
PasswordNumber = 12345678
CXServer.Protect “PLC1”, EnableProtection, PasswordString, PasswordNumber
The parameters of this command are, in order:
PLC – Name of PLC
EnableProtection – true to set password protection, false to unset it
PasswordString – Password as a string. For CS series PLCs this should be a string of up to 8
characters. For CV PLCs this should be a string of up to 8 characters containing a
hexadecimal number, e.g. “12345678”. For C series PLCs this should be a string of up to 4
characters containing a hexadecimal number, e.g. “1234”.
PasswordNumber – currently this is only used for C and CV series PLCs, and only when the
password string is empty. In those circumstances it is simply a number representing the
value of the 4 or 8 digit password. Please note that the password is entered in CX-
Programmer as a hexadecimal string (as with the PasswordString parameter above), and
that, for example, the value 1234 in decimal is the equivalent to “04d2” as a hexadecimal
password string.
Additional C Series PLC notes: For C series the PLC program needs code (the first line of the
application) in the PLC to enable password setting/release, and this fixes the password value.
e.g.
LD AR10.01
FUN49 0 0 #1234 (#1234 – password value in Hex)
Содержание CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Страница 2: ...CX Supervisor Script Language Software Revision 2 0...
Страница 3: ......
Страница 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Страница 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Страница 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Страница 13: ......
Страница 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Страница 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Страница 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Страница 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...