LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert text file to waveform graph

I need to convert text file to a waveform graph or any kind of graph. So, Basically, I have numbers in text file(1,2,3......) and the numbers were generated randomly using 'write text file' and I need to plot these points in the graph.  Any help/suggestion is appreciated.

Thank you

0 Kudos
Message 1 of 8
(4,215 Views)

How did you write the text file? If there are "numbers", there also need to be defined delimiters (space, tab, or comma, etc.) so you know when one number ends and the next starts.

 

"write text file" does not generate random numbers, so please go back and find out how the numbers where generated and formatted into a string. Then just do the reverse when reading the string.

 

(On a side note, please don't color the diagram and front panel background with easter egg colors. Focus on coding and keep it professional. The default colors are just fine.)

0 Kudos
Message 2 of 8
(4,198 Views)

Hi dipaish,

 

Basically, I have numbers in text file(1,2,3......) and the numbers were generated randomly using 'write text file' and I need to plot these points in the graph.

Then use ReadDelimitedSpreadsheet to read your "numbers in text file"!

 

Any help/suggestion is appreciated.

At first you should change the colors of FP/BD back to default - right now it hurts the eyes! 😄

Then you should attach your attempt on solving your requirement - we will not do your homework for you!

(You did notice that "Training" section in the header of the LabVIEW board?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 8
(4,196 Views)

I want to apologize for the Easter egg colors, it won't happen again. 

random numbers were generated by a random number generator and they were plotted in the graph and also those numbers were sent to write text file to create a text file which contains random numbers. Sorry, if I described the problem wrong way. It's my first-time experience of labview and slowly learning how the functions' works in labview. I tried a lot before posting this post. The VI I attached was simple, did create complex VI's so attached the simple one.

Here is the VI attached with this post. I would appreciate any comments/ guidance to go further.

Thank you

 

 

0 Kudos
Message 4 of 8
(4,170 Views)

Hi dipaish,

 

why don't you use those simple Spreadsheet file functions?

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(4,166 Views)

I would have definitely used the simple functions but I want to create two VI's(separate) that is one using write function only and another using read function only. So, using write function I have created a text file and using read function, I want to create a program that would read the text file that I created using write function.

Thank you 

0 Kudos
Message 6 of 8
(4,152 Views)

Nothing prevents you from putting the write and read parts in two different VIs. Have you tried?

0 Kudos
Message 7 of 8
(4,142 Views)

Hi dipaish,

 

two VI's(separate) that is one using write function only and another using read function only.

So you ask for an example - and when you get an example you are not even capable of placing parts of that example into two seperate VIs as per your requirement?

Did you take the Training section in the header of the LabVIEW board to learn those LabVIEW basics?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(4,135 Views)