LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Addding dats and create trend graph

Solved!
Go to solution

hello everyone, 

I'm trynig to get the random datas using 10 random numbers and get those datas with loop along with time stamp and save them in excel file and create a trend graph along with time. i had collecetd the datas and stored in the excel file but i couldnt able to add the time stamp for all the datas continuosly, also i couldnt able to build the trend graph {trying to compare all the 10 channels datas in one XY graph along with time using different colors}. it sounds simple but As im still in learning stage and help would be appreciated.

thanks in advance  

0 Kudos
Message 1 of 7
(688 Views)

You (and most "new" LabVIEW users) are running LabVIEW 2025.  I (and most experienced LabVIEW users) can easily run LabVIEW 2019 or 2021, but many of us do not have the latest version installed.

 

     Please open your VI, go to "File", "Save for Previous Version" and choose 2019 or 2021 to allow us to look at your code and suggest how to "improve" it.

 

Bob Schor

0 Kudos
Message 2 of 7
(652 Views)
Solution
Accepted by topic author dtharun

See if this can give you some ideas....

 

  • You should only write the column header once to the file. If you want to change the file during the run, you need more code.
  • You can easily implement the start and reset modes if you expand it into a simple state machine.
  • There is no need for express VIs
  • You don't need an xy graph because the points are spaced equally in time. I recommend a chart, else you'll run out of memory eventually.

 

For those who cannot open your VI, here's the original 2025 diagram:

 

altenbach_0-1749832425225.png

Message 3 of 7
(635 Views)

so here it is what i am working with, i have 4 variables Digital input 1 &2 and Digital ouput 1 &2 , so i need 4 graphs for each in which is Y-T graph, y is data and x is time, time in the sense current time. so if i give input only in the digital input ,the graph should turn on and in terms of digital output if i give any value digital only that corresponding graph should start, and each variable has each corresponding graph. and only when i give print the datas should be written to the excel.so im acquring data in real time i could do this same process in chart but not in xy graph.

0 Kudos
Message 4 of 7
(184 Views)

Hi dtharun,

 

again you failed in downconverting your VI. (I prefer LV2019.)

 

What is your question? You only write about your requirements…

Best regards,
GerdW


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

i apologise for what i did, so the problem is i can able to acquire my data but im unable to store in terms of array to view in the xy graph in real time, my only the first data is read, but when im writing them into excel i could able to see multiple datas, so this is my problem also i had a problem of acquiring real time in xy graph but now i succeeded it. 

thanks in advance and i gave downconereted it

0 Kudos
Message 6 of 7
(154 Views)

HI dtharun,

 


@dtharun wrote:

the problem is i can able to acquire my data but im unable to store in terms of array to view in the xy graph in real time, my only the first data is read,


You already know how to use shift register to build arrays, so I don't understand your problem:

 

What is your problem to build your arrays?

 

On your code:

  • Why do you need to insert the sample array into itself???
  • Why do you "Print" when you actually "Save to file"?
  • Why do you "Home" when your "Exit"/"Stop" the VI?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(151 Views)