cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Plot a waveform from a string

¡Resuelto!
Ir a solución

Hi everyone, i've to plot a waverform from a string (like this : +1.328546E-13A,-003.1000,+6.898991E-14A,-003.0000,+4.529815E-14A,-002.9000,...) and then save the data into a file.txt.

The second value(-003.1000,-003.0000,-002.9000....) has to be the X axis and the first one(+1.328546E-13A,+6.898991E-14A,...) the Y axis.

The string comes from a picoammeter and i'm using a serial connection.

I'm working with labview SE 2012.

Does anyone could help me?

0 kudos
Mensaje 1 de 8
6.290 Vistas

Hi francesco,

 

in LabVIEW you would convert your string to an array using SpreadsheetStringToArray function. Afterwards you decimate your array into 2 arrays and use one for X values, the other for Y values.

 

When you use SignalExpress you should post in the SignalExpress forum!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Mensaje 2 de 8
6.277 Vistas

Hi Gerd, thank you for your help.
I think i'm in right forum, i don't use any kind of signal Guiño

Hovever...now the problem is saving the data.
I found Write to Spreadsheet file  and Write to measurement file helpful for me but not for All.
The second one is almost perfect but i'm not able to rename the headers.

Wath i want is somenthing like this (see test2 attached file)

Thank you!! Emoticono feliz

 

Descargar todos
0 kudos
Mensaje 3 de 8
6.222 Vistas

That looks like a simple "write to text file to me". You could just use said function, use the "concatenate strings" with the headers you want, followed by the data separated by tab and carriage return.

0 kudos
Mensaje 4 de 8
6.214 Vistas

Hi Daikataro

thank you for the answer.

The problem in that case is how to format the incoming string. I receive data like this (+1.645710E-14,+000.0000,-4.144607E-15,+000.1000,-2.427935E-17,+000.2000,-1.650574E-14,+000.3000,-5.049865E-14,+000.4000,-3.504731E-14,+000.5000,-9.273024E-14,+000.6000,-1.174499E-13,+000.7000,-8.655032E-14,+000.8000,-8.552034E-14,+000.9000,-5.358891E-14,+001.0000,-1.081800E-13,+001.1000,-1.040601E-...)

and i'm not able to separate the data in two columns..then for the header i understood what to do.

0 kudos
Mensaje 5 de 8
6.209 Vistas
Use SpreadsheetStringToArray to convert your string to an array!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 kudos
Mensaje 6 de 8
6.200 Vistas

@francescof4 wrote:

Hi Daikataro

thank you for the answer.

The problem in that case is how to format the incoming string. I receive data like this (+1.645710E-14,+000.0000,-4.144607E-15,+000.1000,-2.427935E-17,+000.2000,-1.650574E-14,+000.3000,-5.049865E-14,+000.4000,-3.504731E-14,+000.5000,-9.273024E-14,+000.6000,-1.174499E-13,+000.7000,-8.655032E-14,+000.8000,-8.552034E-14,+000.9000,-5.358891E-14,+001.0000,-1.081800E-13,+001.1000,-1.040601E-...)

and i'm not able to separate the data in two columns..then for the header i understood what to do.


Hi find the attached snippet which will log the input into the required format txt file.

 

 

Array to txt.png

 

 

Hope this helps 

 

Kudos Welcome 🙂

 

Certified-LabVIEW-Associate-Dev_rgb (2).jpg

Certified LabVIEW Developer
Best LabVIEW Programmer @NIDAYS 2015
Mensaje 7 de 8
6.170 Vistas
Solución
Aceptado por francescof4

Thank you for the help

Here is my solution maybe someone could need it

 

0 kudos
Mensaje 8 de 8
6.100 Vistas