From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving datas to CompactRIO's memory

Solved!
Go to solution

Hi everyone,

 

Soon, I will have to use CompactRIO 9025 without computer. The CompactRIO will be put in test car and sent. During the test, the CompactRIO will acquire sensor datas from its modules and save these measurument datas on its memory to be analyzed later.

 

So I have no experience on CompactRIO without a computer. According to the my researches, I guess I have to create a VI at Target side on project. This VI should be set as start up. So when the CompactRIO is powered on, the VI will start to run automatically.

 

If all of these is true, at saving datas part, what should I do?? Should I save datas as doubles or strings or bits?? How can I save datas on CompactRIO's memory?? Is it possible?

 

Please explain it with a simple example. 

0 Kudos
Message 1 of 11
(3,783 Views)

Sounds like you could do with reading this introductory tutorial on reading measurements and saving them to disk: http://www.ni.com/tutorial/11198/en/

 

Make sure you don't run out of disk space on the RIO by perhaps deleting old logs if the space is too low.

0 Kudos
Message 2 of 11
(3,762 Views)

Some of what I am looking for is located in what you sent me, sir. But there is an interface that controls program. In my project, there will be no interface controls. When CompactRIO is powered on, it should start to log datas and when the condition that I will write occurs, it should stop logging and save all datas on CompactRIO's memory.

 

According to the CompactRIO 9025 manual,  DRAM is 512 MB whereas Nonvolatile is 4 GB. So my memory calculation should rely on to which one of these?? I do not know what is nonvolatile.

 

Lets assume that I have 20 sensors. And my sample rate is 0.2 second and the data type is double. So what is the maximum sample number I will save for each sensor to the CompactRIO's memory??

0 Kudos
Message 3 of 11
(3,758 Views)

Nonvolatile means that it is retentive on power off/on, just like a PC hard disk. Since you are logging data for later retrieval you will want to store your logs there. You can use the TDMS functions to do this, which periodically flush the data to the log files on the disk.

 

In terms of how large your log files will be - you are saving 20 senors 5 times a second. So in order to get an idea of how large your log files are you will also need to have an idea of how long you will be logging for.

0 Kudos
Message 4 of 11
(3,754 Views)

So there will be 100 sensor datas in 1 second. If I know how large of these will place on memory, I execute my while loop for example 50 second and then abort it to stop.

 

That is why I first need to know what will be size of 100 sensor datas in 1 second on CompactRIO's memory. And then I will set my while loop's run time.

 

In this calculation, I will stand for Nonvolatile memory which is 4 GB, am I right?? 

0 Kudos
Message 5 of 11
(3,749 Views)

This sounds like something you can try out on you own PC; the logs will use roughly the same space on your cRIO.

0 Kudos
Message 6 of 11
(3,746 Views)

I get it. What about the question? I will make my calculation according to the Nonvolatile memory which is 4 GB??

 

And my startup VI idea makes sense?? I mean if I create a VI at Target side on project and set it as startup, when CompactRIO is powered on, it will start to run automatically?? 

 

These are important questions for me. If you help, I will be glad of you, sir.

0 Kudos
Message 7 of 11
(3,744 Views)

If you create a Real-time Application Build Specification and specify a VI as your top-level VI then you can build a real-time executable. If you then set it as Startup then LabVIEW will transfer your built executable to the cRIO and the RTOS will run it automatically on startup. Try this for further details, or check the LabVIEW help manual.

0 Kudos
Message 8 of 11
(3,738 Views)

@sefaa wrote:

I get it. What about the question? I will make my calculation according to the Nonvolatile memory which is 4 GB??


I also recommend just writing your data straight to a TMDS file on disk (the nonvolatile memory).  Do note that you do not have that full 4GB to log data with.  Some is taken up by the OS and your application.  If you look in MAX, you can get an idea of how much is available.

 

Now your 100 samples per second will give you roughly 800Bytes/second (when saved as a DBL in a TDMS file).  We can just go ahead an round this up to 1kB/s to make the math simple.  And let's say that you have 3GB available on your disk.  That would give you 3Mseconds = 833.3 hours = 34.72 days.  So it looks like you can store a full month's worth of data.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 11
(3,725 Views)

Amazing! I get it, sir. Memory part is ok.

 

What about my startup idea?? Is it correct?? I mean I did not use CompactRIO without computer, so I do not know what to do. The solution is to make the VI at Target side as startup and deploy it so that when the CompactRIO is powered on, it will start to log datas automatically??

 

I just ask this question again and again to make clear since I can not understand the answer, I am sorry for this

0 Kudos
Message 10 of 11
(3,722 Views)