From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

PID motor control

Hi ,

I wish to write the variables of actual speed and desired speed to a text or spreadsheet file so that i can plot them against time in MATLAB and do some analysis.

Can i use write to measurement file vi for this task?

0 Kudos
Message 11 of 18
(514 Views)

Yes, you could…

 

But why don't you use "Write Text File" when you want to have text files?

And why don't you use "Write Spreadsheet File" when you want to have spreadsheet files?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 18
(506 Views)

basically i want he values of desired and actual speed to be recored( with timestamps how can I get this )in a excel sheet .so that i can plot the systems transient response.I tried using write to spreadsheet file vi,but somehow its not saving any data,similar is the case with a LVM file.How to do this?

 

0 Kudos
Message 13 of 18
(494 Views)

Please show the code you tried. Did it create the file? Did it write only one line of data, rather than then entire file? Did you check for errors? What did you do to debug it? Have you looked for examples either in the LabVIEW example finder or on this forum?

0 Kudos
Message 14 of 18
(487 Views)

example finder does not have anything related to write to spreadsheet file.Yes it creates the file but what happens is that it stores only the last value of speed.I am not getting how do i write the timestamps.

I aslo tried using MS office report VI but even there I am having a similar problem.
Will be posting the code in sometime.

 

0 Kudos
Message 15 of 18
(471 Views)

Did you read the help for the "Write to Spreadsheet File" function? Why do you think you are writing only a single line instead of all the data?

"If append to file? is TRUE, the VI appends data to an existing file. If append to file? is FALSE (default), the VI replaces data in an existing file. If there is no existing file, the VI creates a new file."

 

What did you try in order to get timestamps? Have you searched this forum? It's a common question to want timestamps with your data.

0 Kudos
Message 16 of 18
(463 Views)

can you share your sub VI?

0 Kudos
Message 17 of 18
(369 Views)

Gaussy hasn't visited the forums in nearly 6 years.  I doubt he'll get your message and have a VI to share.

0 Kudos
Message 18 of 18
(364 Views)