Hello,
I am using labview 8.2.1 together with RSLinx, to communicate with an Allen Bradley PLC.
I am experiencing the following behaviour.
I am reading/writing OPC variables using the data socket configuration (front panel -> right mouse button, and so on)
most of the time, everything works. I just write the value of the controls and these values are updated. (see file OPC_1.vi)
Sometimes however, the value is not updated in the server: all clients connected to the server does not realize the value has changed. as I am writing the value in a loop, the control is updated every single iteration. nevertheless, the OPC variable is not updated=> it seems labview does not generate an event to the OPC server, as the control has the same value as in previous iteration.
to fix the problem, I have done the following (see OPC_2.vi). I have a second control reading the same OPC variable (configured as read only). if at the beginning of a loop, the two controls have different values (that means, that the write-control has a value, which has not been transmited to OPC server => the read-control still has a not-updated-value), then the write-control is refreshed to the old value, and again to the new value (so that labview registerr a value change and notifies the opc server).
this works. but somehow i have the feeling, i am doing the job which labview should to, taking care of if labview succeeded notifying the OPC server.
I have tested this too: if instead of writing the value of the control, I use a property node to change its value (see OPC_3.vi), then it works too. but the loop takes much longer (it seems Labview creates an event each and every iteration, even if I write always the same value). In this case I can see too that the process RSLINX takes a lot of CPU time, probably because of so many updates...
can it be done in any other way?
thank you in advance