DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to import a string array from labview into DIAdem Spreadsheet/table

Solved!
Go to solution

 

 

How to set up a diadem template so when using labview diadem express, the values are imported into a table.

 

I have values such as gain, corner frequency, and pass/fail that exist in arrays generated from collecting information from a 7 electrode EEG system.  I want to create a table/spreadsheet in DIAdem that imports the data when using the LabVIEW DIAdem express function, into a table or spread sheet?

 

Any takers?

 

 

 

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 1 of 13
(5,963 Views)
Solution
Accepted by topic author eximo

Hi eximo,

 

The DIAdem Report express block makes it easy to populate text boxes and 2D graphs in DIAdem from variables (wires) in LabVIEW.  Unfortunately neither 2D tables nor 3D graphs are implemented in the DIAdem Rerpot express block.  So you've got 2 options.

 

Option 1:  if you don't have too many strings that you want to display, you can arrange that many text boxes into the shape of a 2D table and use the DIAdem Report express block as it was intended (sending data to it from LabVIEW wires).

 

Option 2:  at some point as you continue to add elements to your report, you'll probably end up here.  The DIAdem Report express block was designed to connect LabVIEW wires with simple DIAdem reports.  But there is a hook you can use in the DIAdem Report express block to run a VBScript instead of loading a REPORT template *.TDR file.  With a DIAdem VBScript you can accomplish anything in DIAdem.  In addition to wiring up a VBScript path instead of a REPORT template path, you'll also need to send all the data you want to report on to a TDMS file and have DIAdem read the data from that file, instead of receiving the data directly from the LabVIEW wire at the express block's input terminal.  This is a little more complicated, but it will allow you to do absolutely anything you want to in DIAdem and start that report from LabVIEW.

 

I'm attaching an example of Option 2, but I'd be willing to help you adapt it to your data and reporting needs if you'll post or email (brad.turpin@ni.com) your data set and a rough *.TDR file of what you want in REPORT.  It's pretty slow here at the office over Christmas, so I've got time....

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

Message 2 of 13
(5,948 Views)

If I create a  2d spread sheet and input channels that contain a string (instead of the default numeric) is there a way to input the values as string into the spread sheet?  (using report of course, I don't want to mess with scripts right now, maybe in the future)

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 3 of 13
(5,923 Views)

Eximo,

 

Unfortunately you cannot insert text using the express vi in LabVIEW into a 2D table. The 2D table objects only accept numeric values with the express vi. Instead, you must create a table using the Text values and then use the Text Values input in the express vi. Make sure to not confuse the Text values objects with Text Objects in DIAdem.

 

Check out this forum post that shows how to do this:

Diadem report templates problem

National Instruments
0 Kudos
Message 4 of 13
(5,897 Views)

Hi eximo,

 

If you're using the "DIAdem Report File.vi" approach that I sent you, you can just change the REPORT layout file (*.TDR) to include a table that references the channels (string or date/time or numeric) that you want to display.  In the attached updated version of this example I added a 2D table at the bottom of the REPORT layout file that references the Ch0, Ch1, Ch2 channels in the first Group:

 

[1]/Ch0

[1]/Ch1

[1]/Ch2

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 5 of 13
(5,876 Views)

I am so clueless.....sorry, but I've not used tdms before.  I've got 3 years of using labview now, but I can't figure out how the data is being populated to fit into the tdr file.  the script has only 2 lines?  can I call you and talk to you about this?  You made this look really easy, if it's this easy then I should be def using this method.

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 6 of 13
(5,854 Views)

Hi eximo,

 

Well, in a way it's easy and in a way it's convoluted.  The method I sent you to call the DIAdem VBScript from LabVIEW is definitely convoluted, because it saves parameters into a temporary TDMS file, then invokes DIAdem to run the same short generic VBScript every time which then loads that temporary TDMS file, reads off the parameters, then loads the actual data file and runs the actual analysis and reporting VBScript (which both could be different every time).  So, definitely not obvious.

 

On the other hand, the only thing I changed from the first version I sent you was this, and it was quite easy and involved no programming:

1)  Load the "My DIAdem Report Layout.TDR" file into DIAdem REPORT

2)  Delete the text boxes at the top with your mouse

3)  Resize and reposition the graph at the top half of your screen with your mouse

4)  Add a table object to the lower half of the screen with your mouse

5)  Drag&Drop the channel(s) you want from the Data Portal onto the table object

6)  Save the edits to the "My DIAdem Report Layout.TDR" file.

 

So the references to display channels "Ch0, Ch1, Ch2" from group "My DIAdem Data File" in the Data Portal as the first 3 columns in the bottom table object-- these are stored into the "My DIAdem Report Layout.TDR" file that gets loaded by the VBScript.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 7 of 13
(5,849 Views)

I couldnt import my string array into diadem. Could you please help me?

I have a string array like this..

array.jpg

 

I want to import this string array into diadem table. But I can send only numeric values into signal part.

diadem.jpg

I designed my template but  couldnt find how to import these string array into diadem table.

table.png

Could you please tell me how to import string array..


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 8 of 13
(5,245 Views)

Hi No_RegreTs,

 

There are several options open to you, but my recommendation would be to use the TDMS VIs to create a TDMS file with 3 string channels in them, then tell DIAdem to load that TDMS file and load the REPORT template *.TDR file that defines the table display you want.

 

If you look further up this post, the "DIAdem Report File.zip" solution I posted for the original author of this thread will do this for you.  You just need to change the part where the TDMS file is being written from writing numeric channels to writing your 3 string channels, and then you need to change the TDR file to have a table instead of a graph.

 

Ask as you have further questions,

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 9 of 13
(5,221 Views)

I've tried to do this but why couldnt I solve this problem 😕 

When using VBScript how could I load channels from TDMS and import it into my diadem table?

Maybe I wrong about my code.. Because I've just learnt this language.


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 10 of 13
(5,217 Views)