EasyManuals Logo

Omron CX-Supervisor Reference Manual

Omron CX-Supervisor
164 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #134 background imageLoading...
Page #134 background image
WriteArea Appendix B CX-Server Communications Control
133
B.10 WriteArea
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.
B.11 RunMode
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.
B.12 TypeName
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'.
B.13 IsPointValid
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.
B.14 PLC Memory Functions
(A, AR, C, CIO, D, DM, DR, E, EM, G, GR, H, IR, LR, SR, ST, T, TC, TK, W)
vbArray 8192 Array
Constant Value Description

Table of Contents

Other manuals for Omron CX-Supervisor

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-Supervisor and is the answer not in the manual?

Omron CX-Supervisor Specifications

General IconGeneral
BrandOmron
ModelCX-Supervisor
CategorySoftware
LanguageEnglish

Related product manuals