Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB Thermometer works in Hyperterminal & MAX, but not in my VI

Solved!
Go to solution

I have USB thermometer (Omega TJ-USB).  I've communicated with it successfully in Hyperterminal.  When i go to try it with MAX, it usually starts working after the second attempt at write/read.  But even though i set the termchar to 0xD and termchar_en to True, i still have to type my write as 'C\r' for it to return '20.2 C\r' (20.2 C being the temperature)  Any idea as to why this happens?

 

Also, i go ahead and make my VI, very similar to the one found in this labview tutorial - image shown here:  http://zone.ni.com/cms/images/devzone/tut/a/e09bfd41228.gif  I set it for baud:38400, 8n1.  and i also write 'c\r', but i get the 1073807339 error.  I tried changing the buffer with no change in results.

 

I thought this would be a fairly straight-forward task, but it seems like I am wrong, or overlooking something simple.  

0 Kudos
Message 1 of 4
(3,211 Views)

Setting the term character with the VISA Configure Serial Port has nothing to do with a write. It determines what character will terminate a read.

 

Post your VI. Are you sure you right clicked on the string control and selected '\' Code Display?

0 Kudos
Message 2 of 4
(3,207 Views)
Solution
Accepted by topic author Chknrckd

Hi Chknrckd,

 

Also what could be the issue is the way hyperterminal sends out characters (when you type that is). LabVIEW will send out a string at a time, while hyperterminal sends out individual characters at a time.

 

More information could be found here:

 

Why Does My Serial Instrument Work in Hyperterminal But Not in LabVIEW or VISA Test Panels in MAX?

http://digital.ni.com/public.nsf/allkb/171D2D70CFB66E74862571390062D12B

 

Hope this helps!

Chris T.
0 Kudos
Message 3 of 4
(3,184 Views)

yep. that was the problem. thanks Chris!

0 Kudos
Message 4 of 4
(3,172 Views)