05-08-2017 05:08 PM
Hi,
I am a beginner in using Labview. As a part of my project I need to do some measurement of vibrations. I have NI cRIO 9074 control board and module card NI 9239 (2 pieces). On input channels NI 9239 I receive input from acceleration sensors (SILICON DESIGNS). I need to make an application in Labview, which would do the acquisition of data from these sensors (sampling of analog signal from the input) with frequency of minimum 1 kHz, and which would then write this measured data to the disk.
I managed to connect the hardware and start the system. I wrote the whole application for acquisition in RT mode, but the problem occurs in achieving the desired frequency. In order to achieve sampling frequency of 1 kHz I need to have a loop which takes no longer than 1ms to complete each iteration. But due to the complexity of the task and number of operations, my program needs 3-4 ms for one iteration, and therefore my sampling frequency falls to 250-333 Hz. I already analyzed my program, and I have simplified it to the maximum. I concluded that the biggest time loss is in writing the data to the file. I used Shift Registers and writing to an Array (in the link below there is an example, its for logging only 4 channels but the principle is the same). I have also tried writing the data with TDMS but I don’t get better results.
I thought that FPGA programming will make it possible to achieve what I want, so I tried it also. But I didn’t succeed. I used hybrid approach (target to hots), and FPGA provides very fast reading of data from the sensors. But since the data saving operation is done in host, on RT, again it needs too much time to write this data to the disk. I thought about making a FIFO buffer and to log the complete measurements into it, and to write to the disk after the measuring is over. But I don’t know if it’s even possible due to the big amount of data, or if it is possible to do something like that with FIFO...
So if you could please help me, I’m out of ideas?
Has anyone done some similar applications?
Is my approach to the problem good, do you have any suggestions?
Should I use RT or FPGA module?
If you have any example, suggestion, any help is welcome.
Thanks,
s.m.
05-08-2017 05:55 PM
Hi,
I cant open the file you attached, the format is .7z?
Maybe I am missing something?
05-08-2017 06:02 PM
.7z is a compression format http://www.winzip.com/landing/open-7z-file.html
05-08-2017 06:03 PM
@Terry_ALE wrote:
.7z is a compression format http://www.winzip.com/landing/open-7z-file.html
Oh yep, thank you!
05-08-2017
06:10 PM
- last edited on
04-27-2025
04:17 PM
by
Content Cleaner
Are you familiar with NI Example Finder http://www.ni.com/getting-started/labview-basics/examples#NI Example Finder?
I did a search for your AI module and found a number of examples that ship with LabVIEW
05-09-2017 07:45 AM
Yes, I'm familiar with NI Example Finder. I have seen all those examples before, but none of them solve my problem. They all perform readings from high frequency sensors on RT or FPGA, and then they send this data from FPGA to RT (target to host) and similar... That is not a problem, I manage to do that.
But the real problem occurs when I need to write the data with great speed to a file (textual, binary...).
05-09-2017
07:52 AM
- last edited on
04-27-2025
04:20 PM
by
Content Cleaner
Understood. Examples are not meant to be complete solutions but parts of what could be.
TDMS is a format that can give you high speed streaming to disk:
https://www.ni.com/docs/en-US/bundle/labview/page/standard-versus-advanced-tdms-functions.html
Look up TDMS examples and then you may need to combine with these examples.
05-10-2017
02:16 AM
- last edited on
04-27-2025
04:21 PM
by
Content Cleaner
Dear stef.mil,
9239 is a DSA c series module (it has a sigma delta ADC inside that is running at a master clock around 12M-13MHz) and the sampling can go only according to this master clock. So few remarks to what you want to do (if I understood it right):
Hopefully something of this will be helpful. If not, feel free to use google, or similar, you can find things like:
https://forums.ni.com/t5/Real-Time-Measurement-and/Scan-mode-and-FPGA/m-p/1021076
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x0UdCAI&l=en-US
B/R