LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC Datasocket server too slow

I am using datasocket read with an IFM Octavis server to bring data into Labview. The read update takes 15 seconds. This is not a timing issue. The instruction really takes that long to execute. IFM says the update time is a function of the client. In other words the problem is in the Labview.

Any Suggestions?
0 Kudos
Message 1 of 8
(3,901 Views)

Hi Fred,

What version of LabVIEW are you using? What type of data are you reading and how often are you trying to read it? How often is the data being updated? This KnowledgeBase entry contains a few things for you to try - let me know the results. Thanks!

Stephanie

0 Kudos
Message 2 of 8
(3,883 Views)
Stephanie:

I am using 5 Data Socket Reads using variant data type. The reads are in a run while loop without a timer, working as fast as possible. Every update takes 15 seconds. The Data Socket Reads work normally using the Labview Demo Server instead of the Octavis Server. (Very Fast)
0 Kudos
Message 3 of 8
(3,876 Views)
And my Labview Verson is 8.2
0 Kudos
Message 4 of 8
(3,872 Views)
Hi fred,

Correct me if I am wrong, but it seems to me, after your comment, that the Octavis Server is holding up your data from being sent to LabVIEW.   Since it runs quite fast using the LabVIEW server, it seems like it has to do more with how the Octavis server is sending data.  One thing that got me concerned as well is that you do not have any timing in your while loop- this is extremely bad, as it could cause your processor to use all of its cycles on your processes, thus cripling it from doing other tasks.  Have you tried adding some timing?  Have you tried just using one datasocket read and testing the speed with that?

I hope this helps,

Regards,

Nadim
Applications Engineering
National Instruments
0 Kudos
Message 5 of 8
(3,857 Views)
Using a OCP Client Demo software it is possible to get one second updates.  Not fast, but better results. Yes, it does appear the fault is with the Octavis Server but they deny this and there is nothing I can do about it. I can only try to fix from my end, with the Labview.

I am aware that while loops usually require a timer to limit processor use, but the loop takes 15 seconds to execute, so this is hardly a problem. If you use a 1 second timer it won't work at all because it's not enough time to finish.

I don't know any other approach for reading from the Octavis OPC server other than using DataSocket Read. Is there some other way it could be done, some other method?
0 Kudos
Message 6 of 8
(3,850 Views)
The reason that loops need a small delay is to prevent race conditions. 
 
1 second is not the minimum value try 1ms
 
this is a delay of the loop NOT an elapsed timer that will move on to the next iteration after the time expires
 
The wait(ms) or time delay VIs will finish the loop iteration before moving on to the next iteration
 
use the wait(ms) with a value of 1 or if you need flow control use the time delay express vi with a value of .001

Message Edited by James R on 08-14-2007 10:46 AM

- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 7 of 8
(3,846 Views)
Just to be perfectly clear here, the loop is taking 15 seconds to execute. Four per minute as incredibly slow as that sounds.
0 Kudos
Message 8 of 8
(3,835 Views)