If I call ReadPLC2 every 200 ms I get results like this
gd200 36288
gd200 36007
gd200 36007
gd200 36007
gd200 36007
gd200 36277
gd200 36007
gd200 36007
gd200 36007
gd200 36007
gd200 36267
gd200 36007
gd200 36007
gd200 36007
gd200 36007
gd200 36257
The real value of gd200 is only changing on every 5th read , otherwise the value that was first read by the control is retrieved.
If I call readPLC2 every second I get results like this
gd200 40537
gd200 40527
gd200 40517
gd200 40506
gd200 40496
gd200 40485
gd200 40475
The value retrieved is updated correctly
It seems that the client is only updating values every 1000ms
The server is updating every 50ms and if I use the quick client that comes with the server I can see that the results update as expected.
Could you provide a VB6 example of how to change the update rate?
Thank you
Code is below
Public E As OpcLabs_EasyOpcClassic.DAGroupParameters
Public gClient As EasyDAClient
Public Sub Init()
Set gClient = New EasyDAClient
Set E = New OpcLabs_EasyOpcClassic.DAGroupParameters
ReDim gPLCRead(0)
End Sub
Public Sub ReadPLC2()
Dim vVal As Variant
Static bOSR As Boolean
If Not bOSR Then
E.requestedUpdateRate = 100
bOSR = True
End If
vVal = gClient.ReadItemValue("", "SWToolbox.TOPServer.V6", "OM_NJ.PLC.gd200")
gPLCRead(0).lVal = CLng(vVal)
gPLCRead(0).sAddress = "gd200"
End Sub
gd200 36288
gd200 36007
gd200 36007
gd200 36007
gd200 36007
gd200 36277
gd200 36007
gd200 36007
gd200 36007
gd200 36007
gd200 36267
gd200 36007
gd200 36007
gd200 36007
gd200 36007
gd200 36257
The real value of gd200 is only changing on every 5th read , otherwise the value that was first read by the control is retrieved.
If I call readPLC2 every second I get results like this
gd200 40537
gd200 40527
gd200 40517
gd200 40506
gd200 40496
gd200 40485
gd200 40475
The value retrieved is updated correctly
It seems that the client is only updating values every 1000ms
The server is updating every 50ms and if I use the quick client that comes with the server I can see that the results update as expected.
Could you provide a VB6 example of how to change the update rate?
Thank you
Code is below
Public E As OpcLabs_EasyOpcClassic.DAGroupParameters
Public gClient As EasyDAClient
Public Sub Init()
Set gClient = New EasyDAClient
Set E = New OpcLabs_EasyOpcClassic.DAGroupParameters
ReDim gPLCRead(0)
End Sub
Public Sub ReadPLC2()
Dim vVal As Variant
Static bOSR As Boolean
If Not bOSR Then
E.requestedUpdateRate = 100
bOSR = True
End If
vVal = gClient.ReadItemValue("", "SWToolbox.TOPServer.V6", "OM_NJ.PLC.gd200")
gPLCRead(0).lVal = CLng(vVal)
gPLCRead(0).sAddress = "gd200"
End Sub