04-18-2018 07:51 AM
Hello guys
I am a totally beginner of labview and need to use myrio for my project this year. My aim is to use myrio to acquire voltage signals from 6 string potentiometers, and translate these voltage signals to displacements. I met two problems during my programming.
The first one is I tried to use a low pass filter for signal processing, what I want is to illustrate all filtered voltage signals in one waveform chart. I tried to use express ->signal analysis -> filter but can only get one filtered signal no matter how many filters created. I need to use all filtered data to do translation and generate figures of corresponding displacements.
The second thing is that I don't know how to design an automatic saving of data files, including time/date stamp, and ability to set path and filename in the GUI. Currently I am using Invoke Nude to export data to excel and after click "stop" button excel files will open automatically but user need to rename and save the file to a certain path.
It would be very helpful if I could receive some advice.
Solved! Go to Solution.
04-19-2018 11:31 AM
Hi Shipu,
For filtering, I would recommend building an array of the channel data and passing it through the Butterworth Filter VI, rather than using the Express VI. If you look in the configuration settings of the Express VI, it's currently configured as butterworth. Without using an express VI you won't have to deal with converting to and from Double data.
Butterworth Filter VI
http://zone.ni.com/reference/en-XX/help/371361P-01/lvanls/butterworth_filter/
For datalogging, please refer to the following documents on how to implement this:
04-20-2018 03:43 AM
Hi Alex
I tried to use "Write to Measurement File" function to export and save data to excel file, but it always comes with an error (shown in figure). Could you please tell me what is the problem?
Thanks for your help
Shipu HAN
04-20-2018 04:50 PM
You're encountering this error because the VI is currently running on the myRIO. To write to a measurement file on the computer, please refer to the following documents:
04-22-2018 02:13 AM
Hi Alex
Sorry for my ignorance. I became even more confused after read the documents. As you said the error happens because the VI is running on myRIO, so if I want to save data, I need to run my VI on the computer, how can I achieve that? Would you mind give me some example?
By the way, I managed to use "Invoke method: export data to excel" to get some excel files with data recorded (attached file namely "savepath.vi"). After I click the stop button, excel files will open but I need to rename and select save path manually. Could I please ask if there is any method I can use to save those excel files automatically based on the "Invoke method export data to excel" function?
I am really grateful for your help
Shipu HAN
04-23-2018 08:39 AM
No, in order to log data to a file on your computer, you need to ensure that the filepath the Write to Measurement File VI is writing to is a filepath to the computer. Please refer to the following video for information on how the myRIO file system works and how to accomplish this using the write to spreadsheet VI:
https://www.youtube.com/watch?v=BuREWnD6Eno
By using the steps described above and using either the Write to Measurement File or Write to Spreadsheet VI, you should be able to automatically create and save data to Excel.