Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Write skips using cRIO 9012 and USB-port

Hi all,
I am hoping somebody can help me out.
I am writing a project in LabView to perform measurements on a motion platform. I am using a compact RIO 9012 for these measurements.
I am using two (2) (main/) seperate VIs. One (1) to sample Analogue data (FPGA) and generate the UDP signal to the motion server (RT) and one (1) to save all data, needed for the calculations afterwards, to a USB flash drive on the cRIO itself. I am using (single) shared variables to communicate the values between both VIs.
My question is about this second VI.

Each time a new run starts, I want to write the data to a new file. I am losing the first couple of seconds, but that is all right, because it is only pre-measurement data. The problem is that I am loosing datapoints in between. It's simply not being written continuously.
I was hoping somebody could tell me if there is a way to program a buffer where I can put the measurement data in and write from. This way I could compensate for some delays.
I have made a seperate VI (attached) which has my logging scheme (shared variables are replaced with local variables) and some random data (except for time...).

I use a seperate (third) VI to convert the binary datafiles to text files, so I can load them into e.g. Matlab. This is run on a normal computer (not on the cRIO).

Hopefully someone can help me out, because the only buffers I have found so far aren't for cRIO or use network published variables (everything is run on the cRIO).

With Kind Regards,
Joep
0 Kudos
Message 1 of 5
(5,764 Views)
Sorry, attachment wasn't actually attached...


0 Kudos
Message 2 of 5
(5,760 Views)
Smiley Surprised
I also forgot to say that I am using LabView 8 with RT 7...

Joep

Message Edited by jbont on 03-30-2007 08:47 AM

0 Kudos
Message 3 of 5
(5,754 Views)
Hello!

Here are the informations about FIFO you can use on a cRIO-System:

FPGA-RT:
http://zone.ni.com/devzone/cda/tut/p/id/4534

RT:
http://zone.ni.com/devzone/cda/tut/p/id/4534

Best regards
Ken
0 Kudos
Message 4 of 5
(5,653 Views)
Hello kenT,

Thanks for the reply.

I am already using FIFO between my FPGA and RT VIs. Also, the shared variables I use to 'communicate' between the two RT VIs (one (#1) sending a signal and reading the AI data and one (#2) writing to file), have the FIFO-option selected.
I was hoping someone could possibly explain me why the write to file is showing this deterministic behaviour I described before, when I use it to write a binary file to an USB flash drive connected to the cRIO. To get around this I was hoping someone could mabey show me some example code on how to put the data I want to write into some kind of buffer. This way, when the write to file 'lags' again, the data wouldn't be lost.

Hopefully you can help.
Greetings,
Joep
0 Kudos
Message 5 of 5
(5,648 Views)