09-07-2007 08:16 AM
Im using:
VB6
Measurement Studio 7.1
FieldPoint 5.0.1
Max 4.2.1
I have a simple button array to change output states:
Private Sub Slot3Bttn_ValueChanged(Index As Integer, ByVal Value As Boolean)
dim ch as string ch = cstr(index)
frmIOTester.CWDataSocket2.ConnectTo "opc://localhost/National Instruments.OPCFieldPoint/FP\cFP-RLY-425 @3\Channel "+ch, cwdsWriteAutoUpdate frmIOTester.CWDataSocket2.Data.Value = Value
end sub
When I have NI Server Explorer 2.4.1 OPCFieldPoint connected in background, I can switch between each button channel immediately. When I disconnect NI Server Explorer OPCFieldPoint in background, I can still switch (ConnectTo) between button channels, but there is about a 300msec delay in connecting. What is the Server Explorer doing right in connecting that I'm doing wrong in my VB code that it takes longer to connect? I send the message from DataSocket2.update.status to a label and I see a message of "connecting..." before getting a "connected" message. With the Server Explorer running in background I never see the "connecting.." message, which further proves my program runs faster with Server Explorer running in background. I messed around with '?updaterate=", but it didn't make a difference. Could this be a buffering or polling issue that Server Explorer handles that my VB code isn't handling?
Need Help - Thanks |
09-10-2007 05:17 PM