Lasterrorstring; B.30 Lasterrorstring - Omron CX-Supervisor Reference Manual

Script language reference
Hide thumbs Also See for CX-Supervisor:
Table of Contents

Advertisement

LastErrorString

B.30 LastErrorString

Appendix B CX-Server Communications Control
PasswordString = "Password"
PasswordNumber = 0
CXServer.Protect
PasswordString, PasswordNumber
Example 2 (unsets protection for C series PLC)
Dim SetProtection
Dim PasswordString
Dim PasswordNumber
EnableProtection = false
PasswordString = ""
PasswordNumber = 12345678
CXServer.Protect
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
When setting the password this value is used rather than the value passed -
i.e. the password string or number is ignored. The correct password must be
provided, however, when disabling the password protection.
This property, which can be set as well as read, is a textual description of the
last error that occurred. If none have occurred, it is blank.
Example:
txtError = CXServer.LastErrorString
CXServer.LastErrorString = ""
"PLC1",
"PLC1",
(#1234 - password value in Hex)
EnableProtection,
EnableProtection,
139

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 3.1

Table of Contents