LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I store and retrieve data from a PXI8175RT controller?

I am creating a RTOS which has the purpose of collecting and logging data from 6 channels continuously over a period of 6 months. How do I write to and read from a file located on the harddrive of the PXI8175 controller? Note there is no host computer to be connected to the 8175 controller until the 6 month period is up.
0 Kudos
Message 1 of 7
(3,430 Views)
In LabVIEW RT the file I/O functions work the same as they do in LabVIEW for Windows (and other platforms). To perform a file read/write on the 8175, simply use the file I/O functions the same as you would in LabVIEW for Windows (or your preferred LabVIEW platform).

If you're new to the file I/O functions, check out LabVIEW's file I/O examples and run them on the 8175 using LabVIEW RT.
Message 2 of 7
(3,430 Views)
In LabView for windows you might refer to a file path as C:\example.txt. How would you refer to a file located on the harddrive of the PXI controller using LabView RT?
0 Kudos
Message 3 of 7
(3,430 Views)
It's the same - "C:\example.txt". Try out the List Directory function with "C:\" as the path input. You'll see all the files in the root directory.
0 Kudos
Message 4 of 7
(3,430 Views)
You're a genius. This discussion group is proving to be very valuable. Thanks for the help. You'll likely hear more from me as I'm a beginner....
0 Kudos
Message 5 of 7
(3,430 Views)
Something to note: We were saving data to a file every second on a PXI8176 with LabVIEW RT. We were trying to create a new file every minute. We had a problem with the file creation speed. It would take 5-15 seconds for a new file to be created. So we were missing up to 25% of our data. On my slow laptop, I can create ~400 new files a second with LabVIEW for Windows. So I'm assuming it is a LVRT issue. We needed this fixed right away (over a weekend), so we worked around it and never asked NI. (Just in case anyone was wondering, we have limited bandwidth from this RT system to our computer. We only need data when something bad happens, so we wanted to keep the data files as small a possible and transfer only what we needed. If your app doesn't have the same requi
rements, missing 15 seconds of data at the beginning of every file might not be a big deal.)
Message 6 of 7
(3,430 Views)
I have seen this as well!

I wrote an imbedded app that read its operating parameters from disk did a small update and wrote it back to disk.

While the app was starting up, I would enunciate its progress via some leds. The app's start-up would move right along until it was time to write to the disk. On a Windows platform this step would take less than a second. It generaaly takes 15-20 seconds to write this 32K file under LVRT.

Yes the use of the file I/O constructs is the same under RT as other OS's but when it comes time to write a file, I would say that "In LabVIEW RT the file I/O functions DO NOT WRITE AS FAST as they do in LabVIEW for Windows (and other platforms). "

I am not saying that this is a problem that NEEDS fixed in RT. The whole ide
a of RT and asyncronous operations like file I/O, serial I/O, ntworking, etc just do not mix well in general. I am glad that I can do file I/O in RT and would not be happy if faster disk I/O got in the way of my app's determinism.

As Lavezza said "Something to note".

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 7
(3,430 Views)