Isbadquality; Clockread; Clockwrite; Rawfins - Omron CX-Supervisor Reference Manual

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

Advertisement

IsBadQuality

B.17 IsBadQuality

Note:

B.18 ClockRead

B.19 ClockWrite

B.20 RawFINS

Appendix B CX-Server Communications Control
For Count = 1 To UBound(arrayOfPoints)
MsgBox arrayOfPoints (Count)
Next
In this example, the list of Points configured for the PLC name specified in text
point sPLC is stored in 'arrayOfPoints' and each displayed in a message box.
Example 2
arrayOfPoints = CXServer.ListPoints
If ListPoints is used without a parameter then points from all PLCs are
returned.
Checks whether a point is currently indicating "Bad Quality".
Example
Dim bBad
bBad = CXServer.IsBadQuality("MyPLC", "MyPoint")
IsBadQuality will return True in situations where the quality is unknown, e.g.
where no previous communications with a point has occurred.
Function that reads the PLC clock
Example
Dim NewDate
NewDate
= CXServer.ClockRead("PLC1")
'
dates
can
methods (FormatDateTime,
TextBox1 = NewDate
Text Box to convert date to string
TextPoint1
= TextBox1 'this writes the date string to
a CX-Supervisor text point
Function that sets the PLC clock. The expected format for the date is "dd/mm/
yyyy hh:mm:ss".
Example
Dim NewDate
'set
time/date
methods (Date, Time, Now, CDate etc.)
NewDate = Now
current PC time
CXServer.ClockWrite "PLC1",
This function enables raw FINS commands to be sent to a specified PLC. This
function is for advanced users familiar with the Omron FINS protocol only.
VBScript Example
Dim sFINS
Dim sResponse
sFINS = "0501"
sResponse = CXServer.RawFINS(sFins, sPLC)
txtFINSResponse = sResponse 'txtFINSResponse is a CX-
Supervisor point.
be
manipulated
DatePart etc.)
' this uses a Microsoft Forms
value
here
using
' This example sets the time to the
NewDate
via
standard
VBScript
standard
VBScript
135

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 3.1

Table of Contents