DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to select, with a SUD DIALOG, the range and the trace data to import from citadel

Hello,

I use DIAdem to generate reports from Citadel and I would like to create a script which asks the user to select data and it's corresponding range to import it from citadel. The script should display a dialog box (sud dialog), the user will choose the data and the range. 

I would like to know if a function exists because up to now, I have not found anything suitable for this.

In my search i found this (see answer from Brad Turpin) http://forums.ni.com/ni/board/message?board.id=60&message.id=985&requireLogin=False

But I don't know how to automatize it with sud dialog

I am looking for information and examples on the subject.

Thanks

 

0 Kudos
Message 1 of 16
(5,513 Views)

Hi prestj,

 

I'm curious what your use case looks like.  If you open up a Data Store for that Citadel data base in the DIAdem NAVIGATOR, then you can select the traces you want in the tree view built into the NAVIGATOR, and you can select the range you want in the Data Store configuration dialog.  What is the advantage of reprogramming this in a SUDialog?  Do you want to switch back and forth between different data bases?  Do you want to select folders/datasets in the Citadel data base instead of traces?  Do you want to loop over multiple selections and automatically sequence through multiple imports?  What other things do you want the user to do that you haven't mentioned yet, because so far what you've described is well implemented in the standard DIAdem GUI.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 16
(5,498 Views)

Hello,
I know that I can do this with the data store.
The reason why I would use the sud dialog is to create a easy user interface. The future users want the easiest solution to print a report.
For example :
- start the script
- select the traces
- select the begin
- select the end
- print

I'm using LabVIEW to log measure in a database, I want to create a script (DIAdem) wich automatize the procedure to search data in the data base and printing a report. The sud dialog will allow the user to select the range.

Maybe you have an alternative solution to the sud dialog...

Thanks

0 Kudos
Message 3 of 16
(5,484 Views)

---------------------------------------------------------------------------------------------- 

Things will be much easy if u do your sequence like this:

 

- select the traces
- select the begin
- select the end
- start the script
- print
-----------------------------------------------------------------------------------------------

 

otherwise use ADO in VBS to fetch the data.. ADO objects support access to various types of data sources. ADO objects are independent of a specific database i.e. You can use ADO objects for all databases for which an OLE DB driver is available.

 

Then use SUD Dialog for user input required in query processing..

 

Hope it helps

HS

 

 

 

0 Kudos
Message 4 of 16
(5,474 Views)

Hi prestj,

 

I have quite some experience with loading Citadel traces into DIAdem, but there are several things I've never done.  One of them is to programmatically load a selection of traces with a selected time window subset of values.  I've loaded a selection of traces with all their values, and I've loaded all traces over a selected time window, but never both.  It might be possible to do both programmatically, but I don't know how.  I also have never set up a Citadel data base so that it can be queried with normal SQL, though I understand this is very possible.  If someone can help you set up your Citadel data base for SQL queries, then I can help you with the rest in DIAdem.  Or if you're willing to programmatically load all the traces over the specific time window and then delete the traces you didn't have selected, I can help you with that.  Or if you're willing to programmatically load all the data from selected traces and then delete all the values outside the time window, I can help you with that.

 

Which option sounds the best to you? 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

 

0 Kudos
Message 5 of 16
(5,462 Views)

I have to do a mix with your solutions.
Maybe you can send me any exemples or instructions for your 2 solutions.

But maybe the best way is to begin with loading all traces over a selected time window. Then try to select the traces.
Is that a ok for you?

 

 

0 Kudos
Message 6 of 16
(5,435 Views)

Hi prestj,

 

Here's an example that shows how to load selecting time windows from a Citadel db, the one that ships with DIAdem, in fact (though you'll need to edit the name of the computer in the db path in the VBScript).

 

Brad Turpin

DIAdem Product Support Engineer
National Instrumets

0 Kudos
Message 7 of 16
(5,383 Views)

 

 

thanks for the example.

I changed the database path. An error message (see attached file) in the Load_Citadel_functions_VBS is appeared. I don't understand very well what did this script, also i don't understand this error message.

I have seen the word "Lookout", is this script for Lookout?

0 Kudos
Message 8 of 16
(5,369 Views)
Hello,

I changed the data base path, when I run the script an error message appeared (see attached file). When I look the dataportal files, I see that the complet data is charge and not a window (see attached file). have you any idee?
Download All
0 Kudos
Message 9 of 16
(5,361 Views)

Hi prestj,

 

You also need to change the start and end date/time values in the main VBScript.  If the defined window spans the whole range of your data base, then you'll import your whole data base.  Does this mean that you no longer get an error message?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 10 of 16
(5,316 Views)