I plan to using following code structure:
Before while loop: use a open file function to open a file for write
Within loop: I acquire current time, current DAQmx force, and current motor position, all are scalar values. I will add / append them to a text data file
After loop: close the file
I hope the data inside the text file to be arranged as following:
time force position
--------------------------------
t0 f0 p0
t1 f1 p1
t2 f2 p2
... ... ...
... ... ...
... ... ...
tn fn pn
the end of the file
My question is:
(1) what write function can accept scalar values for appendage within each iteration, similar as wavwform chart (not wavwform graph). I don't want to assemble all data to an array and then send to a file, since I have lots of data which may cause crash when assenmling large array.
(2) what's the way to make data inside the file arranged as I require?
Thanks a lot.