From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write data into file from a wavechart

Hello everyone,

 

I have a problem in writing data from a chart into a text file.

As the pitcher shown, I want to get those two value from both x,y axis in the chart, but I can only get one now.

Can anyone teach me how to do it, please?

 

Thanks

 

 

Download All
0 Kudos
Message 1 of 3
(2,436 Views)

What two values are you talking about?

 

Unfortunately, your .jpg is not a very clear image and doesn't show anything that your VI doesn't already show on its front panel.

0 Kudos
Message 2 of 3
(2,420 Views)

LPH,

 

You've got a couple of problems. The immediate issue  is that you are not reading the 'X Increment' value from the fetch function. This should be used to set the dt on your chart (use a property node) and it should be used to create your Y array. The Y array is created with a for loop that has a shift register and an Add function. Give it a try and see how far you get. You can get a little fancier and also read the 'Initial X' value and use that as a start time.

 

Other issues include the fact that your 'Save' Boolean and case statement is backwards. You do a file write when 'Save' is false. That's really counter-intuitive. I also think that you should look up the definition of Fetch in the instrument manual. In many instruments, a Fetch does not initiate a new acquisition. You may simply be reading the same waveform over and over again. The initiate function might need to be in the loop.

0 Kudos
Message 3 of 3
(2,408 Views)