Laggy LV code

Post your LabVIEW discussions here
Post Reply
teduk50
Newbie
Posts: 0
Joined: Tue Nov 27, 2012 4:11 pm

Laggy LV code

Post by teduk50 »

Hi all,

I'm running Labview 2012 with the latest version of the USB TC-08 driver, and when I run either the example bundled into the SDK or the one uploaded to the NI website at https://decibel.ni.com/content/docs/DOC-4785 it seems to be incredibly slow. The data capture seems to take around 100ms per thermocouple which we can live with, but the main problem is that when running the TC-08 it seems to affect all labview programs running on that computer, to the point where front panel indicators become unresponsive and the whole thing looks like it's crashed (even though it hasn't). I've even gone so far as to separate the data aquisition and the processing programs and passed the data between the two through a TCP port and it has exactly the same effect. I noticed that the data is in the 'get single sample' format instead of the streaming format and I wondered if you had an example of the faster, streaming format interface for labview. I've tried to implement this and failed (I've been programming with labview for 4 years) so there must be some sort of caveat that I'm missing. I also get crashes when the USB connection is closed. We intend to buy a few more of these units, but we'll be going elsewhere unless we can get this problem resolved.

Thanks,

Ed.

Hitesh

Re: Laggy LV code

Post by Hitesh »

Hi Ed,

The 100ms time interval per thermocouple is expected as that is the settling time for each reading due to the resolution of the device.

With regards to the sluggishness, please try opening the library function call for usb_tc08_get_single in the vi and in the dialog window, select the radio button to 'Run in any thread' in the Thread pane. You can also do this for the other library function calls in the vi.

I'm not sure why the streaming example has not been implemented but I'll take a look and post an update. It could be due to memory allocation for arrays. Have you come across the In Place Element Structure in LabVIEW?

Best wishes,

Hitesh

Re: Laggy LV code

Post by Hitesh »

Hi Ed,

I've had a go at implementing a streaming version but found that the values were not being updated.

Unfortunately, we don't have any LabVIEW certified developers here - we provide examples to demonstrate how the API functions can be called. It might be worth contacting NI Tech Support to find out how to use the In Place Element Structure to extract out a 1-D array for each function call to get a set of readings.

If you're able to post the vi that you have created for taking readings in streaming mode, I can compare it against what I have.

Thanks,

teduk50
Newbie
Posts: 0
Joined: Tue Nov 27, 2012 4:11 pm

Re: Laggy LV code

Post by teduk50 »

Hi Hitesh,

Setting the radio button to 'run in any thread' has solved all my problems. All now working perfectly-thanks very much for all your help. Can't believe I didn't try that before...

Thanks,

Ed.

Post Reply