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.
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.