LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best OPC reading method

Hello,
 
I am working with a WinCC OPC server i would like to read out the tags in Labview 8.5. This works fine, but i get some errors when my logging of the wincc opc tags is to fast . Whats the best way to read out as fast as possible and without errors about 50 tags? Some example code?
 
at the moment i use the open read and close commands in a loop for 50 iterations with different opc addresses. Maybe i can do the reading parallel instead of serial.
 
Thanks in adavnce,
 
B Bakels
Labview CLD , Engineer/Manager

Promedes and DSM
using LV 7.1, 8.0, 8.2, 8.5 and 2009 SP1
http://www.promedes.nl
0 Kudos
Message 1 of 6
(3,274 Views)
I have a few dozen opc addresses to open and read/write. What I have done is to use an action engine to open the addresses, then store them all in a cluster an unitalised shift register. I call a 'use' action which reads the cluster, and a destroy case which closes all the references. In doing this I am saving computation as I do not need to open and close references every iteration. I can post a pic if you like?

Can you just confirm that I read your post correctly - The server is faster than you can read from it, so you need faster a reading algorithm?
_____________________________
- Cheers, Ed
0 Kudos
Message 2 of 6
(3,268 Views)
hello thanks for your reply, yes a picture will be great. Im not sure if my server is fast enough but i sometimes i get a undefined error.
 
Thanks
 
B Bakels
Labview CLD , Engineer/Manager

Promedes and DSM
using LV 7.1, 8.0, 8.2, 8.5 and 2009 SP1
http://www.promedes.nl
0 Kudos
Message 3 of 6
(3,257 Views)
I think these VIs should demonstrate what I mean. Essintially whay what I have done is to take the open and close outside the main reading loop. This will massively speed up the reading, as you are not opening / closing a lot of references every iteration.

A thought I've just had, is that the undefined error may be if you are trying to write to a read-only process variable? I've done this a couple of times 😛


Message Edited by yenknip on 06-19-2008 12:01 PM
_____________________________
- Cheers, Ed
Download All
Message 4 of 6
(3,242 Views)
Another thought - You say the error does not always happen, have you got the 'wait for updated value' set to false? It may cuse a timeout error if left to true.





Message Edited by yenknip on 06-19-2008 01:12 PM
_____________________________
- Cheers, Ed
0 Kudos
Message 5 of 6
(3,224 Views)
Nope, that wasnt the problem but thanks for the solution. You way of opening the opc items was much faster the creating the ref each time i want to read out al items.
 
Thnx,
 
B Bakels
Labview CLD , Engineer/Manager

Promedes and DSM
using LV 7.1, 8.0, 8.2, 8.5 and 2009 SP1
http://www.promedes.nl
0 Kudos
Message 6 of 6
(3,216 Views)