Functions Appendix B CX-Server Communications Control
129
Appendix B
CX-Server Communications Control
When the Project Settings->Advanced settings option "Allow advanced script
access to PLC via 'CXServer' control" option is selected a CX-Server
Communications Control is automaticalled created to allow script access to
CX-Server functions. This ActiveX control is always named 'CXServer'
(without any hyphen) and can always be used from any script.
This appendix contains a list of the available component properties and
methods on the script interface.
B.1 Functions
Value Function for getting and setting an area of memory in a
PLC. This function allows logical names to be used. If
an array is used, the first element is returned.
Values Function for getting and setting an area of memory in a
PLC. This function allows logical names to be used. If
an array is used then a SAFEARRAY is returned with all
values.
SetDefaultPLC Function for setting the default PLC. This is primarily
used when a project contains multiple PLCs.
OpenPLC Opens the specific PLC for communications.
ClosePLC Closes the specific PLC.
Read Function to read the value of a PLC point
Write Function to write the value of a PLC point
ReadArea Function for reading a block of memory from the PLC.
WriteArea Function for writing a block of memory to the PLC.
RunMode Function for reading / writing the current mode of the
PLC.
TypeName Function for reading the PLC type (e.g. CQM1H).
IsPointValid Checks a point name is valid.
PLC Memory
Functions
A, AR, C, CIO, D, DM, DR, E, EM, G, GR, H, IR, LR, SR,
ST, T, TC, TK, W.
Functions for getting and setting the memory areas in the
PLC.
ListPLCs Property. Holds a list of all PLC names configured in the
project file. This property is read only
ListPoints Property. Holds a list of all point names configured in the
project file. This property is read only.
IsBadQuality Checks whether a point is currently indicating "bad
quality".
ClockRead Reads the PLC Clock
ClockWrite Sets the PLC Clock
RawFINS Function that enables raw FINS commands to be sent to
a specified PLC.