OMRON
APPENDIX B – CX-Server Communications Control
Revision 2.0
Page 147
Example
Dim arrayOfPLCs
Dim nUbound, nLbound
arrayOfPLCs = CXServer.ListPLCs
nLbound = LBound(arrayOfPLCs)
nUbound = UBound(arrayOfPLCs)
For Count = nLbound To nUbound
MsgBox
arrayOfPLCs(Count)
Next
In this example, the list of PLC names in the project configured stored in ‘
arrayOfPLCs
’ and then
each is displayed in a message box.
ListPoints
Holds a list of all point names configured in the project file or PLC. This property is read only.
Example
Dim arrayOfPoints
Dim nUbound, nLbound
arrayOfPoints = CXServer.ListPoints(sPLC)
nLbound = LBound(arrayOfPoints)
nUbound = UBound(arrayOfPoints)
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.
IsBadQuality
Checks whether a point is currently indicating “Bad Quality”.
Example
Dim bBad
bBad = CXServer.IsBadQuality(“MyPLC”, “MyPoint”)
Note:
IsBadQuality will return True in situations where the quality is unknown, e.g. where no
previous communications with a point has occurred.
ClockRead
Function that reads the PLC clock
Содержание CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Страница 2: ...CX Supervisor Script Language Software Revision 2 0...
Страница 3: ......
Страница 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Страница 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Страница 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Страница 13: ......
Страница 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Страница 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Страница 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Страница 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...