Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

string acquisition via RS232

I'm attempting to implement an NI driver for a museum-piece spectrometer controller, a Spex CD2A. The CD2A accepts commands via a serial port in the form of strings, such as "\03 ST 3400 \02"; in which the ascii "002" and "003" are the start and stop characters, and the two letter code and following number set the parameter "ST" with the value "3400".

The CD2A responds to each input string with an affirmative (two bytes) or negative (three, including an error code) string. In Labview, this string pops up as an appropriate number of empty box characters rather than numbers.

Why does LabView interpret the repsonse string differently than a simple terminal utility? How can I view the incoming bytes as numbers so that I can debug based on the error code?

Thanks for your time,

Joe
0 Kudos
Message 1 of 2
(2,770 Views)
The \02 and \03 are the STX and ETX characters. You send these in LabVIEW by turning on '\' codes in your string control. When you receive the data, turn '\' Codes on or hex display on. The data should make sense then.
Message 2 of 2
(2,765 Views)