LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i program for data acquisition using RS-232 on Labview

Hi guys, been busy lately trying to figure it all out and to know what is the make and model of the instrument.

I could not find any information on what is the instrument but i was told that i do not need to write any data, i would only need to do receive data from the instrument via RS-232(the instrument will be feeding me with data constantly real time), and i am supposed to use labview 8 to capture the data and plot it into a waveform graph, to show speed over distance, lastly plot those information into a excel file.

Have been trying to figure it out, but sad to say, i have never attend any lesson on Labview before, and my group of colleagues are too having problem trying to figure out how to actually program it to work, I have heed some advise from some of your kind replies and i managed to get the Advance Serial Read And Write.vi to work when i use another computer to send data via RS-232. But i have problem trying to plot the graph as i do not have a correct input for my graph.


I need some help on how do i actually recieve multiple data(speed and distance from the same instrument) via just 1 RS-232 and able to differenciate which data belongs where, and how do i output the data to a graph, finally how do i export it to excel automatically in real time.

Thanks,
Simmy
0 Kudos
Message 11 of 12
(1,765 Views)

It's really next to impossible to say how you are going to parse out the response. Serial instruments have no standards to follow. You might get a string like 'A=n.n B=n.n' in which case you would use the Scan From String function to convert to numbers and then wire these to a chart/graph. A different approach would be the readings encoded as x number of hex bytes. Totally different technique to decode.

In my opinion, you would be just wasting a lot of time until you had at least a manual. Whatever you wrote now, you would probably just end up rewriting a large part of it. Is the decision for the instrument still to be made by another group? If it is, tell them to make up their minds, already! What you may able to do though, is when the instrument is finally decided upon, you will probably have some time before it is actually delivered. Request an electronic copy of the manual before you get the instrument and then post that. Then someone can give you some concrete information.

The excel part can be pretty simple. You can use the Write to Spreadsheet File function to create a text file with comma or tab separated data. Excel can import these. There is also a shipping example for writing to Excel using ActiveX.

Message 12 of 12
(1,760 Views)