DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Script Commands

I have several channels that I am importing from an output file that are measuring voltage. This output file has no headers, but I want to put headers on my channels after I import the voltages. How do I do this in a script command form?
0 Kudos
Message 1 of 4
(3,607 Views)
Hi jetblack,

By "put headers on my channels after I import the voltages", do you mean you want to populate the channel property fields in DIAdem with the correct info programmatically, or did you mean you want to create a header file (*.DAT, *.TDM) for the existing data file?

Assuming you mean the former, you can use the DIAdem channel property variables (arrays), which all start with "Chn...()" and take a single parameter, either channel number or channel name. Examples are:

ChnName()........... channel name
ChnDim()................. channel unit
ChnComment()......... channel comment

If you instead want to create a header file for your data file, then I'll need to know a bit more about where the data is coming from (binary, ASCII, structure of th
e file, etc.).

Hope that helps,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,607 Views)
Well I'm not sure how to answer that seeing as how this is my first time using DIAdem, so I am very green at all of this. What I have are a bunch of strain gages (44 in this case), which are always in the same channel for this test. The output file for the gages is just raw data which the channel numbers correspond with the column they are in. Channel 1 corresponds to the A column in the Excel file, 2 to B, etc. What I want to do is put a header, I think, so I (and others) can know which gage they are looking at when I convert the voltages to stress. I have attached an example of an output file and the beginnings of my script so you can see what I am doing.
Download All
0 Kudos
Message 3 of 4
(3,607 Views)
Hi jetblack,

I took a look at your Excel file and your VBScript. I still don't see where the channel names are supposed to come from-- they're not in the data file, and I see no indication of them in the VBScript. Do you know what these channel names should be? Will they always be the same? What is the "Voltages" column that you add to the Excel spreadsheet?

I'm also interested that you're sending information back and forth to Excel from DIAdem and vice versa using ActiveX. Could you describe the user experience you'd like to achieve with this application? Perhaps this would work better over the phone, but I'm out of town this week, so a phone call would have to be with one of the support AEs in Austin.

Regards,
Brad Turpin
DIAd
em Product Support Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,607 Views)