Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Datalogging in Labview

Hello Everyone,
I made a Pressure calibrator which continously sends data to pc via UART at an interval selected by user, now we are displaying it on hyper terminal, however I want to design a Labview program which will take this data and log it in excel. I was able to send numeric character in labview group them together and display on a Guage, however the Data format now is '+150.10mmWC  ' followed by CR and NL., if the pressure is 150.10 mm of water column.

Can you point me some sources where I will get info to break this string and use the numeric information to display it on guage and also on graph, and also log the entire string along with time stamp in an Excel file.? 

Kindly tell me the names of VI's which will be helpful for string manipulation, logging, converting that numeric string to decimal value, so I can read up on them.
Thank You.

0 Kudos
Message 1 of 5
(5,459 Views)

I would use the Fract/Exp String To Number function  to get the number to  then write to the gauge.

 

I would use Write To Text File to write the data in a tab delimited text file (which Excel can read).  Read up on the other File IO functions before diving in too quickly here.  Also look in the example finder (Help->Find Examples) for some test file logging examples.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(5,453 Views)

Hello Crossrutz,
Thank you so much, I am finally able to extract numbers I receive via serial interface.

Now to write it in the file the FILE I/O functions seems complicated for beginner like me, however a workaround I found was to plot the numeric data in the waveform chart which gives an option to export it in excel.

I also saw this option in invoke node but don't know how to trigger it manually.

So can I make a button which when pressed by user will do that 'export to excel' function?

0 Kudos
Message 3 of 5
(5,407 Views)

Sajid6300shaikh wrote:  So can I make a button which when pressed by user will do that 'export to excel' function?

Why not?  Use an Event Structure for the button press and invoke that export method inside of the button's event case.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 5
(5,368 Views)

Thank you crossrulz,

I am finally able to save the waveform by button press.

Now the only thing that remains is to add time stamp to that data.

I tried to do it using waveform chart but it's not working properly.

I  saw an example which bundles data points and time stamp to put them on xy graph, however in that example waveform appears only after I press stop i.e. xy graph is placed outside the while loop and the tunnel which carries the bundled data converts it into array which is supported by graph.

So do you know how I can have graph being plotted in real time.?

 

0 Kudos
Message 5 of 5
(5,319 Views)