Showing results for 
Search instead for 
Did you mean: 

Which data type is appropriate? General questions...

Hi all,

here is a quite general question about LabVIEW-DIAdem connectivity:

At the moment I'm building a quite large LabVIEW application with lots of data aquisition.

The amount of data is not cruical, but lots of single values.

In Diadem I want to display both graphs with the captured data and an extensive table which holds mainly single values, temperature on this place, for example.

What data type do you suggest to choose in LabVIEW?
Where should I write the single values to, one channel for every value?

Additional question:
If I have to do calculations within LabVIEW, for example:
-take channel x and mulitply it by y...
-average channel two...

Do I have to use autosequences (we have only
the DIAdemstarter kit...)?
There are VIs in labview to run autosequences ('DIAdem Run Autosequence.vi'), are they functional with the starter kit, too?
Please feel free to post general answers too, as anything could be helpful.

0 Kudos
Message 1 of 6

For floating point numbers you have to options: Single precision (4 bytes)or Double precision(8 bytes). By default, the LabVIEW/DIAdem vi's will store the information in double precision format (R64). If you want to save your data in single precision format you can use the example Write Non R64 data to DIAdem File.vi that comes with the 2.1 version of the DIAdem/LabVIEW connectivity vi's (available on www.ni.com).

I suggest you store all your temperature values in a single channel, since this way its going to be easier to execute operations on all the temperature values at a time. You can use the formula interpreter in DIAdem to multiply two channels, or the CALC functions to average channels (Basic Math -> Average Channels).

You a
re not going to be able to run autosequences from LabVIEW if you have the DIAdem Starter kit, since this package doesn't not include the AUTO module.

Best Regards,

Alejandro del Castillo
Message 2 of 6
Thank you, Alejandro,

I realized that I didn't express well, sorry.

The word I was looking for was "file type", but let me explain the general problem I encounter:

Within my application, several different tests are performed. The amount of data varies from test to test. Each test is quite independent and as mentioned in my original question, lots of stand-alone values are collected (t1 on test1, r4 after test5...).

For report generation I'd like to have:
- one single file for all tests (new file for new device under test)
- not much work to pick out the data automatically for depicting it in DIAdem (which means clearly structured channel table, already edited channel info...)
- DIAdem closed while performing tests.

I think it's handy to fi
ll channel 1..10 with data from test1, channel 11..20 with test2 and 50..80 with the separate values, for example.
DIAdem File Write.vi-help says I could append data to an existing file, but the number and order of channels had to be correct, otherwise the file might be corrupted. Does this mean that I can't subsequently add channels if the file has been saved during a previous test? Are there other commands to add channel info and data to an existing r64 file + header without opening DIAdem itself?

I hope you understand what my needs are...


0 Kudos
Message 3 of 6

The DIAdem storage format (.dat) consists of a header file that describes one or more binary files with the actual information. If you want to add extra channels once that you already closed the file, you can write to another binary file and then recreate the DIAdem header file (.dat) to have it include the extra channels in your second binary file.

To recreate the header file to have it include your new channels, you need to read the current header file, get the channel info data, add the information for your new channels and write to another header file.

I am attaching a vi that reads a header file, appends a channel (the data is in another file) and creates a header file.

Best Regards,

Alejandro del Cast
0 Kudos
Message 4 of 6
Thanks for your help, Alejandro,

one final question:

Let's assume that I use "DIAdem file write" for each test so that I get an equal number of header+binary files and tests.
If I finally want to put all information into a single header file, I will have to import several channels at once. (Because in a single dat+bin file more than one channel will be stored). Then I have to set the "Pointer to first value" to mark the beginning of the second channel, for example.
But I don't understand how to compute it: "byte position of first element divided by the number of bytes per element". I wonder if you could perhaps change the example to append a binary file with two channels?

Thanks a lot and best regards,


P.S.: Would it
be possible to import many separate dat+bin files by running an autosequence which uses "Import via header..." in DIAdem to avoid all the header stuff?
0 Kudos
Message 5 of 6

The Pointer to first value property will tell DIAdem where to start looking for the first data point of the current channel being defined. If the channel data stored on a particular file is from the same type, then, this parameter will be equal to the channel number. The example that I sent you will work with 2 channels if you add the definition to the second one with Pointer to First Value set to 2. The other parameters can remain with the same values as channel 1.

You can use autosequences to create and read header files. Take a look at the functions HdCreate and HdLoad.

Best Regards,

Alejandro del Castillo
0 Kudos
Message 6 of 6