Writearea; Runmode; Typename; Ispointvalid - Omron CX-Supervisor Reference Manual

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

Advertisement

WriteArea

B.10 WriteArea

B.11 RunMode

B.12 TypeName

B.13 IsPointValid

B.14 PLC Memory Functions

Appendix B CX-Server Communications Control
Constant
Value
vbArray
8192
Writes a block of memory to a specified area in a PLC.
Examples of synchronous write:
MyString = "TestString"
CXServer.WriteArea "MyPLC/DM50", 10, MyString
Dim newValue(2)
newValue(1) = 0
newValue(2) = 1
CXServer.WriteArea "BoilerTemp",2,newValue
In the first example, the contents of 'MyString' will be written into DM50 to
DM54. Any additional data in 'MyString' will be ignored (i.e. if 'MyString' is 15
characters in length then the first 10 characters will be written to DM50 to
DM54 and the remaining 5 characters will be ignored - {Note: each PLC
address holds 2 characters}). The second example shows that a logical name
can be used. The script will wait for the write operation to complete before
continuing to execute the next line.
Reads the current operating mode of a PLC (Stop/Program, Debug, Monitor,
Run), where 0=Stop/Program mode, 1=Debug mode, 2=Monitor mode and
4=Run mode.
Example
intMode = CXServer.RunMode("MyPLC")
In this example, the operating mode would be read from 'MyPLC' and stored in
'intMode'. If 'MyPLC' was in 'Monitor' mode then 'intMode' would be set to the
value 2.
Reads the PLC model name of a PLC (e.g. C200H, CQM1H, CVM1 etc).
Example
strPLCType = CXServer.TypeName("MyPLC")
In this example, the PLC model type will be read from 'MyPLC' and will be
stored in 'strPLCType'.
Checks if a Point name has been defined in the CX-Server project file.
Examples
bValid = CXServer.IsPointValid("MyPoint")
bValid = CXServer.IsPointValid("MyPoint", "MyPLC")
In both examples, the boolean variable bValid is set True if the point "MyPoint"
has been defined.
(A, AR, C, CIO, D, DM, DR, E, EM, G, GR, H, IR, LR, SR, ST, T, TC, TK, W)
Description
Array
133

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 3.1

Table of Contents