LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data to labview graph and chart using a numeric control

Solved!
Go to solution

Hello 

I am a beginner in labview . I have created a vi that do manual data logging. i want  help in displaying my data in graph and chart. the vi is attached here. I want to update every element of the vi including graph after a "update value button press" only.  the graph should display plots between H1,D1,Z1, H2,D2,Z2 vs IH, ID,IZ in a single graph. another graph will plot the data of T.PPM, M.PPM vs Time. 

I there any way to store this data set in arrays from a numeric control. so that after each "Update value" press data set should be stored into array and then I can save this data to a excell sheet for further processing. I want it to be completly manualy operated.

0 Kudos
Message 1 of 7
(3,158 Views)
Solution
Accepted by topic author varun_dongre

Hi varun,

 

I am a beginner in labview .

So you took those free beginner courses offered by NI on their website, did you?

 

I have created a vi that do manual data logging.

You created a routine, that reacts on an UI event and shows some data in a graph and a chart. I see no "logging" in your VI nor do I see a loop to have this VI run for multiple data points…

Please don't use RunContinuous except for debugging!

 

I there any way to store this data set in arrays from a numeric control. so that after each "Update value" press data set should be stored into array

Yes, sure: loops with shift registers!

 

then I can save this data to a excell sheet for further processing.

Start with CSV files aka Spreadsheet files, they are much easier to save then "real Excel files"…

 

Btw. uploading huge VIs just because of that background image isn't very nice. After removing the image the file size of your VI goes down to ~100kB…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(3,139 Views)

Hy GerdW

Thanks for your helpful comments. I dont know much about labview so far so i did some foolish mistakes. I have started learining labview as you have suggested but parallely i have to complete this vi on before hand. 

I have edited as suggested by but i dont think it is well memory optimised . The design looks bulky for simple things. Please suggest further. 

0 Kudos
Message 3 of 7
(3,115 Views)

Hi varun,

 

I have edited as suggested

Did you? The Vi is still huge because of the background image…

 

The design looks bulky for simple things.

Why do you think so? If you would replace those local variables by wires it would really look nice…

 

You still need a loop to have your VI run for more than just one datapoint.

And you still need shift registers when you want to collect several datapoints in arrays…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(3,113 Views)

Hy GerdW

 

I ahve removed background image as well as the local variables and connected all data points with wires only but doing this created graph ideal. I suppose local variable are needed to update graph in each data set. Please tell me how to log all these data in to single csv file with appropriate heeders.  which tool I need to use for this? 

0 Kudos
Message 5 of 7
(3,074 Views)

Hyy 

 

modified further to sort out the problem of graph updation. i have remobed the second loop and insert the inside the first loop itself and it worked. block diagram looks goos as well now. 

Now saving these data set in to a csv file is remaining. can you suggest what ttool to use for these? Will update you as  i progress further.

0 Kudos
Message 6 of 7
(3,071 Views)

Hi varun,

 

block diagram looks goos as well now. 

There still is a local variable (saying "RACE CONDITION"!) in your event case.

And you should use the BuildArray function when you want to build arrays. InsertIntoArray is wrong here…

 

Now saving these data set in to a csv file is remaining. can you suggest what ttool to use for these? Will update you as  i progress further.

Use file functions to save data to files. I suggest to use the WriteSpreadsheetFile function…

 

- Your FP is way too big for standard monitors: 2600×1400 pixels…

- Don't fiddle around with FP scaling options when you still work on basic functions of your VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 7
(3,059 Views)