11-15-2013 07:05 AM
Hi there!
One the one side I have a LabView VI. In that VI a value is set to a shared network variable. This happs in a while loop with no extra delay.
Thus this should run at maximum speed (and my machine is pretty fast) 😉
On the same machine I have a C++ application using the CVI library functions. This application has registered a simple data-callback for the same shared network variable using "CNVCreateSubscriber".
What I expected was that the callback would be called pretty often (every 1ms or faster).
The strange thing is: the updates come in EXACTLY every 10ms. Even when I change the number of transferred and subscribed variables from 1 to 100 the 10ms don't change. This seems to be somewhat slow...
So I guess there is some kind of bottleneck limiting the transfer rate.
Thanks!
11-22-2013 02:42 PM
"flush shared variable data" is the command to flush the buffer. Otherwise it defaults to either 10ms or until its full.
11-25-2013 12:13 AM
That sounded like a good idea. But sadly it did not work... ![]()
I added a flush-block to my sending loop and made sure it got called by using the LabView debugger.
(BTW: My sending-loop is just a simple while(true)-loop that sets a shared network variable and then calls the flush).
Still the cycle time was "magically" limited to 10ms...
11-25-2013 04:03 AM
Hi Boris,
from my understanding, as i read in this following article, the behaviour you see is expected (scroll down to point 3. Network-Published Shared Variable):
11-25-2013 04:13 AM
Yes, that is correct. But as KB9NVH pointed out, there is a flush-block that should solve the problem.
From the document you referred to:
...you will find a new function in the Shared Variable palette called Flush.vi. Use this VI to force the transmit buffers in LogosXT to be flushed through the shared variable engine and across the network. This will drastically lower latency.
But somehow this seems to have no effect in my case.
11-25-2013 04:19 AM
Hi,
ok, i will do some further research on that. What are the Versions (LabVIEW, CVI, OS) you are using?
11-25-2013 04:22 AM
Thank you!
I'm using LabView 2010 SP1 on Windows 7 x64. The CVI Version seems to be 2013 (?).
11-25-2013 05:07 AM
Hi,
can you check the attached project on your system? Just run both VIs and check if the Benchmark indicator (Y-X) is showing 0,001?
11-25-2013 05:37 AM
Yep, it's showing 0,001.
11-25-2013 05:40 AM
OK, so everything is working as expected. How are you doing it then?