From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use Excel to Communicate with TC01

I would like to be able to only utilize Excel to obtain data from my TC01.  I am OK if I have to let LabVIEW run in the background, but I would like to know if I can use an activeX or radio button within Excel to pull data from the TC01.  For instance, I open my Excel program.  My TC01 is running in the background.  There is a button to push in my Excel sheet and whatever cell I am currently in will be filled with the data being obtained from the TC01.  Please advise.

0 Kudos
Message 1 of 11
(3,443 Views)

I wrote a dll (a while ago) in LabVIEW to communicate with the TC01 and called it in VB.  This is an Excel 2007 workbook that calls that dll.  You might want to make your own as mine is very basic.  The spreadsheet and dll are in the attached zip file, the original work is in this thread.

 

The VBA code is as follows.  Change the path in the library declaration to match where you store my llb.


Declare Sub KiddeTC Lib "C:\Temp\KiddeTC.dll" Alias "ReadOnce" (ByRef CurrentTemp As Double)

Sub GetTemp()
    Call KiddeTC(myTemp)
    ActiveCell.Value = myTemp
End Sub

excel.jpg

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 11
(3,425 Views)

I truly thank you for the reply.  Spent yesterday troubleshooting and determined I didn't have the latest runtime driver installed.  So got it to working this morning with no errors, but I only get zeros for my readings.  I opened the program that came with the device and it is reading a correct temperature.  Any ideas why your vi isn't reporting the data from the TC01?

0 Kudos
Message 3 of 11
(3,397 Views)

I can't think of with anything.  Did you open the LabVIEW project (from the link in my first post)?  Are you able to read the TC01 that way?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 11
(3,378 Views)
I figured out my issue late yesterday. I had to install a USB patch from NI for my DAQmx. My current challenge is figuring out how to write your vi file to run on our 8.6 LabVIEW versions. We don't have the latest version and I need to tweak your file. I installed an evaluation from NI so I can see you used DAQ assist to create the vi, but I can't get my .dll to build correctly I keep getting function errors. I have never built a .dll from vi code before. Maybe I am missing a step.
0 Kudos
Message 5 of 11
(3,374 Views)

Antnyh,

 

You might find this useful:

 

http://zone.ni.com/devzone/cda/tut/p/id/3303

National Instruments
0 Kudos
Message 6 of 11
(3,362 Views)

I was out of the office for the last day and a half.  Here's an 8.6 version (without an express VI).

 

ReadOnce_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 7 of 11
(3,332 Views)

Hi,

 

I had same problem to use my TC01, and thanks to you I can read my Dev1/ai0 from USB TC 01.

I'm using your dll, but I'm developping with Delphi.

It stay one problem of scale, the read temperature is 3 times the current value (69.03°C for 23.01° under MAX).

Maybe a problem of thermpocouple settings, I don't know!

 

I got a second problem, and maybe you'll have the solution!

I have to use a second USB TC 01, on Dev2, and I don't have the last labview version to make a new dll.

Could you help me?

 

Thanks in advance for your support.

0 Kudos
Message 8 of 11
(3,219 Views)

Hi Yann,

 

You may want to re-post this as a new thread in (either in the LabVIEW forum we're currently in, or in the Signal Conditioning forum) .  I think the issues you are seeing here are different than importing TC-01 data into Excel, so another post which clarifies what you're trying to do may help you get to your solution.  Let me know if I'm wrong about this, and you actually are trying to do something in Excel.

 

I'll try to answer your question, but as I said, re-posting as a new thread may help get you a clearer answer more quickly.

 

There are no configuration settings in the TC-01 driver which would cause a thermocouple input to be multiplied by a scalar factor, such as 3* 23.01 = 69.03.  You may have a Task set up in MAX with an associated Scale which multiplies the value by three.  You can see How to Make a Custom Scale in MAX for more information about how a Scale is set up with a Task, so you can check if this is the case.

 

Also, your second question that pertains to how to make a DLL may be easier answered on the LabVIEW forum.

 

I hope this helps,

Andrew

National Instruments
0 Kudos
Message 9 of 11
(3,194 Views)

Hi Andrew,

 

Thanks for your advise.

You're maybe right, this question should have posted on a new thread, order to get clearer and precis answer.

 

But this topic was the closest item to my question that I found.

 

I tried to do new .dll, from the source of Jim.

 

And after multiples trials i got succes. Scale problem should come from a setting of thermocouple type.

 

I attached solution to use 2 USB TC 01 in position 'Dev1/ai0' and 'Dev2/ai0' with Thermocouple type J.

Used ReadOnce with myAdddllTC01Dev1.dll

and ReadOnce2 with myAdddllTC01Dev2.dll

 

Maybe you could post them into the right thread order to help other guys.

 

I ahave a last request, please support Delphi, or make a

 

Thanks for all and keep helping.

0 Kudos
Message 10 of 11
(3,172 Views)