Sample program, Sample program -11 – Sensaphone SCADA 3000 Users manual User Manual
Page 243
22-11
Chapter 22: Distributed Control using Visual Basic
Advantages
• Sophisticated control can be attained along with localized control.
• If the PC crashes or the distributed control program must be halted, localized
control can still be performed.
Disadvantages
• Multiple control programs must be written for both the host PC and each indi-
vidual SCADA unit.
• Program maintenance could be difficult.
Sample Program
The following program illustrates simple passing of I/O values from one SCADA unit to
another.
'''''''''''''''''''''''
' Begin User Program
'''''''''''''''''''''''
' Sample program which assumes that a Tank is located at site A and a
' Pump is located at site B. The program passes the tanklevel from
' unit A to unit B where it is stored in a ladder variable. This
' allows unit B to control the pump. The On/Off status of the pump is
' then sent back to unit A where it is also stored in a ladder
' variable.
' Definitions:
' DataPointValue1 is the TankLevel at unit A
' DataPointValue2 is the Pump Status at unit B
' DataPointValue3 is a Ladder Variable in unit A
' DataPointValue4 is a Ladder Variable in unit B
DataPointValue4.Value=DataPointValue1.Value
'Assigns DataPointValue1
'to DataPointValue4
DataPointValue3.Value=DataPointValue2.Value
'Assigns DataPointValue2
'to DataPointValue3
''''''''''''''''''''
' End User Program
''''''''''''''''''''