Test and Measurement Forum

Encapsulated VIs for USB TC-08

Post your LabVIEW discussions here

Encapsulated VIs for USB TC-08

Postby scls19fr » Fri Mar 13, 2009 1:51 pm

Hello,

I'm looking at your USB TC-08 sample for LabVIEW.
I would like to know if you are planning to make a sample
using much more encapsulated VIs and if you plan to make real instrument driver (not just a sample that call a DLL)

Kind regards
scls19fr
Active User
Active User
 
Posts: 15
Joined: Fri Mar 13, 2009 1:14 pm

Postby Robin » Fri Mar 13, 2009 2:31 pm

Hi

We don't currently have any plans to do this. The Labview example is simply intended to demonstrate how to interface with the driver.

Is it something that you would find useful?

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Postby scls19fr » Fri Mar 13, 2009 4:03 pm

Yes it will be very usefull to have such VIs because my full VI in which I have to insert 10 temperatures acquisitions (so 2 TC-08) is quite big
(I can provide you if you are interessted)

I also use a Labjack U12 board. They provide such VIs (you can download them to be inspired on their website)

I'm beginning a cleaner LabVIEW code for this but it would be much better if you do it yourself. I'm using shift register to do it (see main3 ou main4.vi)

I'm using Labview 7 because this computer is quite old

Kind regards
Attachments
tests_pico_tc_08.zip
(126.81 KiB) Downloaded 222 times
scls19fr
Active User
Active User
 
Posts: 15
Joined: Fri Mar 13, 2009 1:14 pm

Postby scls19fr » Fri Mar 13, 2009 4:10 pm

Sorry I forget to say you something else...

on your usbtc08.vi sometimes (several times) I get the following error message "TC-08 Not Opened"

Even if I unplug, connect the TC-08 it always fails...
The only way to get the labview sample running again is to open PicoLog recorder (which doesn't found the unit), enumerate device, found the device and to close PicoLog.
After doing this, your labview sample works again.

Kind regards
scls19fr
Active User
Active User
 
Posts: 15
Joined: Fri Mar 13, 2009 1:14 pm

Postby Robin » Mon Mar 16, 2009 10:13 am

Are you using the front panel switch to stop the VI running?
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Postby scls19fr » Mon Mar 16, 2009 10:24 am

If I stop using the Labview stop button (instead of the front panel stop button) I know that I won't be able to reconnect to TC-08... This is (in my mind) a problem. The only way to solve it is to use Pico software (which is not a good idea in my case... even deconnecting/reconnecting the device doesn't solve the problem)
Of course, "clean" stopping the device is better.
But clean starting it (in the TC-08 firmware or in the Labview code) could solve this problem

Did you have a look at Labjack U12 LabVIEW drivers ?

Kind regards
scls19fr
Active User
Active User
 
Posts: 15
Joined: Fri Mar 13, 2009 1:14 pm

Postby scls19fr » Tue Mar 17, 2009 2:47 pm

I found some strange informations in your datasheet.

tc_type Specifies what type of thermocouple is connected to this
channel. Set to one of the following characters: 'B', 'E', 'J',
'K', 'N', 'R', 'S', 'T.' Use a space in quotes to disable the
channel. Voltage readings can be obtained by passing 'X' as
the character.

If I have a look at the ASCII table 'K'=75 but 'k'=107 (in decimal)
But in your sample there is 107 not 75.

Can you confirm me that is doesn't mind about using lower case or upper case ?

You should make a sub-vi with 1 input : enum(B, E, J, K, N, R, S, T, Voltage, Disable) and 1 ouput : tc_type value.

I would like to know if you plan to make the "encapsulated" vi I'm looking for because we will consider buying other TC-08 (at least 2 others) if you do it. If you don't we will have a look at something else. But I really think that working hard on it will be the first step to improve all your LabVIEW drivers.

Using your samples can't be done really in production... the only way to do it will be to use a global variable inside your loop and to read the global variable inside our calculate loop.

Kind regards
Attachments
usbtc08_tc_type.vi
(12.46 KiB) Downloaded 208 times
scls19fr
Active User
Active User
 
Posts: 15
Joined: Fri Mar 13, 2009 1:14 pm

Postby Robin » Tue Mar 17, 2009 4:25 pm

Hi

The tc_type argument is case insensitive.

As I mentioned, we currently have no plans to create any more example VIs.

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Postby scls19fr » Tue Mar 24, 2009 8:45 am

Hello,

I'm sorry but you don't reply to one of my questions.
How can I do (using only Labview) if a user click on the LabVIEW stop button instead of the main loop stop button ?

I also have an other question...
How can I do if I have 2 TC-08 ?
Can I give USB TC-08 id to the open function ?

Kind regards
scls19fr
Active User
Active User
 
Posts: 15
Joined: Fri Mar 13, 2009 1:14 pm

Postby Robin » Tue Mar 24, 2009 9:49 am

Hi

Sorry about that.

The user should avoid using the abort button because the device will not be closed. The following is from the LabVIEW documentation:

"The Abort Execution button stops the VI immediately, before the VI finishes the current iteration. Aborting a VI that uses external resources, such as external hardware, might leave the resources in an unknown state by not resetting or releasing them properly. Design VIs with a stop button to avoid this problem"

To use more than one TC-08, all you need to do is call the open function twice. Each call will return a handle to one of the units.

This VI was created by a customer. I haven't looked at it as it was created in LV 8.5. It might be useful though.

Robin
Attachments
Dual-TC-08.vi
(193.4 KiB) Downloaded 221 times
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Postby scls19fr » Tue Mar 24, 2009 10:25 am

Thanks a lot...

This vi is much cleaner than the other one ;-)

But I say again that reusable vi are much better than samples...

you say me to use open function twice... but is there a way to identify the unit because I have to measure 10 temperatures
The 5 first one are measured using the first unit
The 5 others will be measured using the second one.
scls19fr
Active User
Active User
 
Posts: 15
Joined: Fri Mar 13, 2009 1:14 pm

Postby Robin » Tue Mar 24, 2009 11:04 am

Point taken! I'm sure we will update the VI soon, but we're currently working on other products. It's good to have customers' inputs.

To identify the unit, you can use the usb_tc08_get_unit_info function, which will give you the serial number of the unit.

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Postby scls19fr » Sat Apr 04, 2009 9:40 am

If you make an other VI sample you should hide the STOP/Abord general LabVIEW button using this
http://zone.ni.com/reference/en-XX/help ... arance_db/
So user can only use your STOP button that close connection with the hardware.
The customer sample you provide me before use such a trick.

Kind regards
scls19fr
Active User
Active User
 
Posts: 15
Joined: Fri Mar 13, 2009 1:14 pm

Postby scls19fr » Wed Apr 08, 2009 10:35 am

I'm sorry but I'm trying to get info using one of the following function
- usb_get_unit_info
I made a LabVIEW cluster (sort of struct) that could contain a USBTC08_INFO struct.
I call the dll but my cluster still have "0" values

- usb_get_formatted_info
I thought that using this function could easier.
but I get the same result !

Here is a minimal LV 8.5 code

I probably made a mistake since I'm not used to call directly DLL.

Kind regards
Attachments
get_unit_info.vi
(30.38 KiB) Downloaded 180 times
scls19fr
Active User
Active User
 
Posts: 15
Joined: Fri Mar 13, 2009 1:14 pm

Postby Robin » Tue Apr 14, 2009 7:52 am

Hi

Sorry for the delay, I've been away.

Could you save it for LabVIEW 8.2 and re-post it?

Thanks

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Next

Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 0 guests