Every Fixed-Point number allocates 64 bits (8 bytes) or 72 bits (9
bytes) if you include an overflow status. Working on a cRIO project
that I need to acquire and save a large amount of data to process later when the RT CPU has free time to do it (is not acquiring more data nor transmitting data).
Since the data is acquired in 12 channels, 51.2 kS/s, with 24 bit each point, the fixed-point
allocates 64 bits but uses only 24, wasting 5 bytes (62,5%) for every single data point acquired.
As a workaround, I developed
two VIs one to compact the data removing the 5 unused bytes of every Fixed-Point, number keeping the 3 bytes with the data. The second VI does the reverse job. With this I reduced the information
to 37,5% of the original, saving space and time to save the information
in non volatile memory. Maybe there's a way to do it directly, but I didn't figure it out.
My idea is to add, in some way, the possibility to use the minimum amount of bytes needed by the data, at least for storage purposes. It would be nice if NI add an option to have fixed point in two memory allocation modes:
- Standard: the current way with 64 or 72 bits (probably faster)
- Packed: the number of bytes allocated will be the minimum to hold all information. For a 16 bits data the each data will use only 2 bytes.
André Manzolli
Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil