02-15-2014 06:15 PM
I am currently building a robot for a school project with the recently released new myrio.
This robot will have numerous sensor's to collect data as it walks around. I have already written the code for the sensor's, but I am kind confused on how to data log /storing data to the onboard rio through charts.
The following is an analog input that is connect to a humidity sensor's with the following adjustments for calibration.
The question is How can I save theses input readings into an excel sheet on board the rio when it's not connected to a home station?
jakes
02-16-2014
08:20 PM
- last edited on
01-08-2025
08:35 AM
by
Content Cleaner
Hi billjake,
First of all, you can write your data in a text file or in the excel
You'll need to convert that DBL numeric data format into string by using Format into String function: https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/functions/format-into-string.html before writing it to the .txt file
You can use string constants like tab constant ((https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/constants/tab-constant.html) and end of line constant to assist you in creating a customized spreadsheet in .txt file.
Once done, you can drag the .txt file (if you create a .txt file) to the excel and you should get a table of data
Just take note of the file path as mentioned in this following links:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YH93CAG&l=en-US
https://forums.ni.com/t5/NIYANTRA-Documents/myRIO-Data-Logger/ta-p/3492852
Warmest regards,
Lennard.C
02-17-2014 03:19 AM
Lennard,
Hey thanks for the response, but i've tried the format to string path and it doesn't work for me. I got nothing can you take a look?
I used the code I had for my BMP sensor that I had on hand and it didn't run, I checked the file path and I got nothing.
Below is the code I ran(i've included it in the attachments as well).
As upon cheching the directory i went to save nothing was there.
As shown I set my file path to new and exhisting and file and forders. I named the file as a .txt(text file)
02-17-2014
03:40 AM
- last edited on
01-08-2025
08:36 AM
by
Content Cleaner
Hi billjake,
Sorry, there are a lot ofn subVIs that are missing and therefore I can't see much from there. I will pressume the upper portion of your VI is correct and thus I'll focus on the writing the data part.
There are a few noticable mistakes I can find in your code and I'm not sure if you have read the links which i have provided in my previous post. Perhaps you can try the following and see if that works. Presuming that you are doing a stand alone application of your myRIO:
When you mentioned that it is not connected to the home station, we usually create 2 different sets of VI. One is the host VI which extract data from myRIO when it is connected to the myRIO. The other is the client.vi which usually does not have front panel user interface if it is to be stand alone, does the datalogging, acquiring data, controlling and sometime analyzing data.
Warmest regards,
Lennard.C