LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Logger from CRIO to Pc

Hi..i'm working with a National Instruments cRIO - 9012, cRIO-9111 chassis and NI-9201 module. The purpose is to acquire electrical signals from a power electronic setup, then process the acquired data in my laptop.

I've already tried to store the data through usb but the memory of the RT is too small, so i start trying to used network streaming to pass the data directly to my laptop.

I almost get it, thanks to an example code, but now the code running in my laptop show just one or two samples of the signals acquired by the RT.

I wonder if someone can give me a help or if there is a better way to do such thing. My goal is to have all the data (8 channels) sampled at 1kHz in a .txt file with duration of 10 min.

The test code that i'm using at the moment acquires just one signal, and i turn it into a few new signals just to test the capability of the implemented data logger code.

 

Thanks in advance.

Best Regards

Mário Silva

 

0 Kudos
Message 1 of 3
(2,954 Views)

Hi,

 

Thank you for posting your question on National Instruments Forums.

 

Your application seems well built but I am wondering about one or two things. 

 

Are you sure of the way you read your network stream on the host ? Why not let the number of elements default value as a parameter for the read function, as shown in this example.

 

Also, rather than Network Streams you can test a TCP based communication using the STM library. It might prove more flexible and easier to use.

 

Eventually, you can use the CompactRIO Embedded Datalogger Reference Example in order to use a proven framework for developping your application.

 

I hope this information will help you.

 

Best regards,

Mathieu P. | Certified LabVIEW Associate Developer
National Instruments France


Journées techniques : des fondamentaux aux dernières technologies pour la mesure et le contrôle/comm...

0 Kudos
Message 2 of 3
(2,883 Views)

Hi Mathieu,

 

thank you very much for the reply.

After i wrote the post that you replied, i kept searching for solution and i found that STM would be a good solution too. When i started test it i thought it was working good, but somehow i was wrong.

I test it with just two buttons, two controls that i could change and 8 analog channels to acquire data, and the goal was to acquire the 8 channels at 1kHz. When i started to save the data and opened it with my excell i realise that i wasn't savibng all the points that i was acquiring. I started to investigate by putting a 'size' block on host code and the size that i get was much smaller that i expected. Then i put an indicator at '# elements' of the 'RT FIFO READ' block and i found that the numbers of elements to read don't stop increasing, which means that i'm not passing all acquire data from cRIO to host.

I've attached the code that i was using for you to take a look, let me know if have any idea of how to solve this issue.

 

Thanks in advance.

Best Regards

Mario Silva

0 Kudos
Message 3 of 3
(2,869 Views)