LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Very slow update of front panel graph when using RT target

I am writing a VI that reads several waveform files and displays them in a waveform graph for the user to check before he continues. This is executing on an RT target just because that's where the analog output hardware is; I don't need any deterministic timing, really. It takes a very long time, upwards of 10 to 15 seconds, for the waveform graph to refresh after the files have been loaded.The VI actually finishes (in the sense that the Run button changes from it's running state to it's stopped state), there's about a 15 second delay, and then the waveform graph updates with the loaded values. Is this expected behavior? I originally thought this was a disk IO bottleneck, but loading from disk is actually quite fast, about 20 ms.  If I run the VI on the host machine, without targeting the RT hardware, it's very fast, so the delay is not inherent in redrawing the graph.

See the attached screenshot. The waveform that is being loaded is 1000 samples in size. I'm using Labview 7.1.1, and the RT hardware is an 8186 controller.

To make matters weirder, I tried using a different computer as the host computer, and it's much faster. That 10 second delay is down to 1 s or less. The only difference in the two hosts is that the one that shows the delay is an Semperon 2800 and the fast one is a P4 2.5 GHz or so. It seems odd to me that the host processor is the problem, since as you can see in the screenshot, the CPU of the RT target is maxed out for several seconds.

Can anyone shed any light on why this is so slow and/or why the two hosts behave differently?

0 Kudos
Message 1 of 8
(4,604 Views)
Hi,
That is quite strange behavior.  From what I understand, the VI is running on the 8186 controller.  If you target the controller from a Semperon-based PC, it takes 10-15 seconds.  But if you target the controller from P4-based PC, its a second or so.  Is that right?
 
If that is the case, then the only differentiating factor may be where the problem lies.  It could be an issue with your ethernet controller/connections on your host PCs.  Can you investigate the differences in the network cards, network setups, etc of the 2 hosts?  Are they both using static IP or dynamic IP (DHCP)?  Is the slower host on a busier network? Can you replicate this behavior in each PC if you use a cross-over cable?
 
These are all I can think of at the moment, until I get more feedback from you.  Can you try these and let me know what you find out?
 
Hope we can figure out this strange behavior.  Have a great weekend!
Anu Saha
Academic Product Marketing Engineer
National Instruments
0 Kudos
Message 2 of 8
(4,600 Views)

@A.S. wrote:
Hi,
That is quite strange behavior.  From what I understand, the VI is running on the 8186 controller.  If you target the controller from a Semperon-based PC, it takes 10-15 seconds.  But if you target the controller from P4-based PC, its a second or so.  Is that right?

Yes, that's correct.

If that is the case, then the only differentiating factor may be where the problem lies.  It could be an issue with your ethernet controller/connections on your host PCs.  Can you investigate the differences in the network cards, network setups, etc of the 2 hosts?  Are they both using static IP or dynamic IP (DHCP)?  Is the slower host on a busier network? Can you replicate this behavior in each PC if you use a cross-over cable?

In both cases, I'm connecting via a crossover cable. The P4 computer has only one network adapter, and the crossover cable is connecting to that. The Semperon has two; one goes to our regular network, the other goes to the PXI controller. The PXI controller has a static IP address on a private intranet (in the 192.168.0.0/16 block). The hosts have IP addresses in the same block, obviously.

I am currently working on finding another computer to swap out with the Semperon. If it behaves as well as the P4, then I'll just chalk it up to something strange with the Semperon and not worry about it any more.

0 Kudos
Message 3 of 8
(4,580 Views)
Hello,
I think the issue maybe that you have 2 NICs in your Semperon PC.  Can you disable the one that connects to the external network using the Control Panel?  You can also try physically removing that board.  Just disconnecting the cable will not be enough.  What could be happening is LV constantly tries to use both NICs to do all communication.  But it has to wait to timeout on the external network connection to ensure no devices are connected there.
 
I think this is the source of the problem.  Can you verify this please?
 
A Saha
National Instruments
Anu Saha
Academic Product Marketing Engineer
National Instruments
0 Kudos
Message 4 of 8
(4,577 Views)
I swapped the hard drive into a different machine entirely, with only one network adapter, and I still notice the problem.  It is an Athlon 64 3200+.  I was worried that the slower Semperon might be contributing to the problem, but that shouldn't be the case anymore. 

One thing I didn't realize before is that the P4 computer is running Windows 2000, and the Semperon/Athlon machines are running Windows XP.  Would that make a difference?  In both cases, it's Labview 7.1.1.

0 Kudos
Message 5 of 8
(4,559 Views)

@A.S. wrote:
Hello,
I think the issue maybe that you have 2 NICs in your Semperon PC. Can you disable the one that connects to the external network using the Control Panel?...
I think this is the source of the problem. Can you verify this please?
A Saha
National Instruments



I think I've solved the problem, even thought I don't know what caused it in the first place. As part of trying to figure out what was wrong, I installed the Labview 7.1.1 Maintenance Release. I didn't realize at first that the Labview RT 7.1.1 Update was separate from that. So, I:

  1. Installed the Labview RT 7.1.1 Update and mass compliled the Labvew directory
  2. Set "SendBufferSize = 65535" in the ni-rt.ini file on the RT target.
  3. Set Ethernet communication on the RT target to half duplex, using MAX.
After all that, updating the front panel seems to be very fast now.

The good news is that I also put the PCI Ethernet card in the host computer and that does not seem to be a problem. That means I can connect the host to our main network, and put the PXI system on it's own private network, so the PXI system doesn't have to be exposed to the rest of the network

0 Kudos
Message 6 of 8
(4,543 Views)
I'm glad you found the source of the problem.  Please let us know if you have any other questions
Anu Saha
Academic Product Marketing Engineer
National Instruments
0 Kudos
Message 7 of 8
(4,536 Views)
2 things solved your problem here: 
 
1.  Using the SendBufferSize token increased your throughput of your ethernet from 2MB/s to probably 9MB/s. 
2.  There is a known full duplex bug in LabVIEW 7.1 on the 817x/818x PXI controllers - if you set the duplex to full the data rate drops off to almost nothing and the packet loss increases sharply.  Setting the duplex to half solves the problem with very little loss in throughput (9MB/s or so).  I hear this might be fixed in LabVIEW 8.0.
 
Good luck!
0 Kudos
Message 8 of 8
(4,488 Views)