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.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set up serial input module?

Solved!
Go to solution

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

0 Kudos
Message 1 of 2
(3,545 Views)
Solution
Accepted by topic author MikeKuz
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.
0 Kudos
Message 2 of 2
(3,539 Views)