LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading multiple csv file to Waveform graph

Solved!
Go to solution

Hello,

 

I was trying to implement a linear quadratic tracking controller using LabVIEW. The controller controls the Quanser cube using myRio. I've attached a snippet of the code below. Due to the nature of this controller, it requires me to update the input action each iteration. For this i generated a csv file using MATLAB and then tried to read it off in labview. 

 

For some reason the "read spreadsheet" vi does not work when the program is run on myrio. When it runs on the computer host, the vi delivers the whole array. Is there a way of reading in a vector from a file in the control loop? 

 

P.S. I've tried looking for help but all the questions were either unanswered or no solution was found. 

 

Thanks in advance,

Ashhad 

 

0 Kudos
Message 1 of 4
(2,657 Views)
Solution
Accepted by topic author adios_amego

Hi adios,

 

for some "magic"(*) reasons your myRIO cannot access your PC's harddrive.

To have your myRIO read the CSV file you need to deploy that file to your myRIO!

 

*The myRIO is a computer of its own. You don't want (for security reasons) to allow other computers instant/unlimited access to your own computers file system!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,651 Views)

Thank you for you reply. I didn't know myrio had an operating system inside it. I've got it to work by creating a network mapped drive. So thank you for that.

 

P.S Are there any tutorials regarding running myrio as a state machine for control?

 

Regards

0 Kudos
Message 3 of 4
(2,643 Views)

Hi adios,

 

implement the state machine in your myRIO VI...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,621 Views)