取消
显示结果 
搜索替代 
您的意思是: 

NI Max Logging In Single Precision

I set up an NI-DAQmx Task in NI Max reading voltage, and then use that in a simple vi with a while loop. It works fine, but I'd like to reduce the data to SGL precision (DBL seems to be default). There's no "data" line in it (since it's all taken care of in NI Max). Is there a way to change logging from DBL to SGL? 

0 项奖励
1 条消息(共 8 条)
2,622 次查看

MAX can create a Task for you, but except when you are running Test Panels, MAX doesn't save data for you -- you do that with DAQmx (or, shudder, the Dreaded DAQ Assistant).

 

It is too bad you didn't attach your LabVIEW code showing what you are doing.  Yes, the DAQmx Read gives you Analog Data as a Dbl (either as a Dbl Array, or as a Waveform, which contains a component, Y, that is a Dbl Array).  There are functions on the Numeric "Conversion" sub-Palette that will convert a Dbl to a Sgl, but in the modern PC era when disk I/O is very fast, and disk storage space is relatively plentiful (and, the Chips that handle Floats inside the PC are probably comparable in speed of processing between Sgl and Dbl), why bother with Sgl?

 

Bob Schor

0 项奖励
2 条消息(共 8 条)
2,577 次查看

You could always get the data in RAW format, 16 or 32 bit integers depending on the DAQ card. Once you get the raw data, you could then do the scaling in single precision.

 

mcduff

0 项奖励
3 条消息(共 8 条)
2,557 次查看

If you're using the built-in DAQmx logging, I don't think there's a way to change the data type while it logs. You could do it after the logging is complete though.

 

Mind if I ask why you're worried about it? As others have said, disk space is cheap, and unless you're logging at 1 MS/s for days on end I can't imagine you'd have to worry about disk space.

0 项奖励
4 条消息(共 8 条)
2,547 次查看

Some people asked to see the VI. Attached are two versions. They're both SUPER simple. The 1st the logging is set-up by NI Max. Of course NI Max doesn't log, so here's the bare-bones VI that will work. The 2nd uses NI Max but sets up it's own TDMS data taking (which I can set to SGL). Weirdly the files are larger when I set up the TDMS logging in the VI (even at SGL) than the NI Max (at DBL). No clue why that is. 

 

The reason I want to limit data size I'm taking 40 channels of data at 100 KHz. It will run for 30 minutes continuously. This DAQ CAN handle it, and seems to work fine, but the files get big fairly quickly. 

0 项奖励
5 条消息(共 8 条)
2,539 次查看

Nothing Attached.

 

If you are using the built in TDMS logging feature, then the raw data is saved along scaling factors.

 

I will assume your data is 16 bit, then 40 Channels at 100 kHz is a 8MBy/s data stream. 30 minutes of recording raw data is 14.4 GBytes. You can set up the logging to break up the files such that you don't have one huge file.

0 项奖励
6 条消息(共 8 条)
2,533 次查看

NI Max onlyNI Max onlyTDMS logging in VITDMS logging in VI

0 项奖励
7 条消息(共 8 条)
2,528 次查看

I would not use MAX, something similar to below.

 

Snap34.png

8 条消息(共 8 条)
2,526 次查看