NI Home > Community > NI Discussion Forums

Instrument Control (GPIB, Serial, VISA, IVI)

Reply
Member
MikeKuz
Posts: 16
0 Kudos
Accepted Solution

How do I set up serial input module?

I suspect this is a very simple issue, but being a novice, I need some help.  I have RS-232 data strings that look like this:

 

I 00255 -027.7 -00.1 003.9 +0.00 +0.45 -0.88 +0.00 -0.03 -1.00 -41.4 +00.2 +00.2 -000.0
I 00255 -031.3 -00.1 003.9 +0.00 +0.50 -0.85 +0.00 -0.02 -0.99 -23.3 +00.3 +00.1 -000.0
I 00255 -033.8 -00.1 003.9 +0.00 +0.55 -0.83 +0.00 -0.01 -0.99 -05.6 -00.0 -00.1 -000.0
I 00256 -034.9 -00.1 003.9 +0.00 +0.58 -0.81 +0.00 +0.01 -1.00 -00.7 +00.0 +00.1 -000.0
I 00256 -035.1 -00.1 003.9 -0.00 +0.58 -0.82 +0.00 -0.01 -1.01 -11.7 +00.1 -00.1 -000.0
I 00256 -035.7 -00.1 003.9 +0.00 +0.59 -0.80 +0.00 +0.03 -0.99 +23.9 -00.1 +00.1 -000.0

 

How do I  configure the 14 channls of a RS232 input module to grab this data? What "measurement data format" do I need use for each channel?

 

Thanks in advance.

 

Mike

Knight of NI
Dennis_Knutson
Posts: 33,179
0 Kudos

Re: How do I set up serial input module?

First of all, a serial connection has only one 'input'. I think what you are asking, is how to parse the single string you read into 14 separate channels. Second, you have not specified the language you are using. In LabVIEW, you would use the VISA functions to configure and read the data at the serial port. There are a couple of examples that you can look at. For parsing the string, you could use something like Spreadsheet String to Array with a space as a delimiter.