Example: Visual Basic
Make M$ Visual Basic Aware of Server
From the Visual Basic IDE's menu, choose "Project/References". If the ActiveX CA Server was been installed correctly, you should see "EpicsCAServer (version-#)" listed in there, so mark it! Now you should be able to look it in the Object Browser as shown in this example:
![]()
Hello Epics
The minimal program might be this one:'--- Create a Process Variable:
Dim PV As New EpicsCAServer.ProcessVariable
'--- Set it's name (required!):
PV.name = "Pi"
'--- Set a value to be served:
PV.SetValue 3.13Test:
Put the above code in Form_load and run the program. Then run the supplied caget.exe:caget.exe -f Pi
... and you should see the served value.
Events
In order to receive events, a PV has to be declared as follows:
Public WithEvents PV As New EpicsCAServer.ProcessVariable
Sub PV_Changed (ByVal value_received As Variant)
' Handle the new value in here:
If I-like-that-value Then PV.SetValue (value_received)
End SubMore...
I hope this gets you started. The server comes with more examples.