Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

rs-232 data logging from old thermocouple scanner

I have an old thermocouple scanner that I would like to log data from at regular intervals using LabVIEW. After some searching I was able to find a data logging program that came with the scanner and it displays the data and allows the user to manually save a file of the logged data (I've attached an example output file from that program). With the program I also got a file that gives a description of the serial communication methodology (attached) that says the data is full duplex,1 start bit, 7 data bits, one odd parity bit, one stop bit at 19,200 bits per second, and <XON> or <XOFF> handshaking. So I tried to use that information with a vi that I edited from another forum post (see attachment) but I get the "Error -1073807339 occurred at VISA Read in While loop test.vi, VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed" message. I'm a LabVIEW newbie and any help on why this isn't working would be greatly appreciated.

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

Hello Ryan314

 

I think you might find this knowledge base useful, and its related links.

 

Why Do I Receive Timeout Error -1073807339 on VISA Read or Write?
http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0?OpenDocument

 

Cheers!

Fabián M.
Internal Sales Engineer
National Instruments
0 Kudos
Message 2 of 3
(4,172 Views)

After a quick glance at the specification document, I see several things which might be relevant.

 

1. The device uses carriage return as a termination character. They designate this as <CR>. In LV it is often designated \r. The default serial configuration (which you did not change) uses line feed or \n.  The input is the numeric equivalent of the ASCCI character so wire 13 (0xD) to the termination character input.

 

termination char.png

 

2. The protocol also seems to indicate that the RTS and CTS lines are also used. You may need to be sure those lines are in the correct states.  I did not take the time to try to sort it out. 

 

3. It appears that you may need to send a command or series of commands to the device initially to get it talking. See "Start Up Sequence" on page 4.

 

This appears to be a decent manual and a reasonable communications protocol. It is not, however, a simple wait for the data to show up protocol. It will take some understanding, some talking back and forth between your computer and the device, some error handling, and so on to get the communications working reliably.

 

Lyn

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