DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create a menu or scrollbar in DIAdem?

Hello,
 
my application in DIAdem-VISUAL is becoming too large to be displayed completely on the screen. That's why I want to partition it into several parts. I am thinking about using a menu to switch between different pages or using a scrollbar, but I don't know how I can implement this in DIAdem.
If you have an idea how to split an application into several parts in DIAdem-VISUAL and how I can implement this, please let me know.
 
Thanks a lot in advance.
 
Kind regards,
 
Gerald
0 Kudos
Message 1 of 11
(4,873 Views)

Hi Gerald,

You can add a custom menu to any panel in DIAdem using the commands that start with "MenuItem...()".  You can also look at the below link to download an application which results in custom menus in DIAdem that mirror a certain file directory structure that you set up.

http://zone.ni.com/devzone/cda/epd/p/id/4051

Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 11
(4,865 Views)

Hello Brad,

thank you for your answer. I downloaded the application and tried to run the CreateDirectoryMenu.vbs-file using the command-window, but that resulted in an error. I attached the error message. I think the error occurs because I am using DIAdem-Version 8.1 or do I have to run the file inside DIAdem? Building the application on my own would be quite a big effort, I suppose?

What do you think is the best solution for me?

Kind regards,

Gerald

 

0 Kudos
Message 3 of 11
(4,842 Views)
Hello Gerald,

The example from Brad was created for DIAdem 9.0 or higher. In general the functionality works for DIAdem 8.1 too, but a few commands and variables are new developed for DIAdem 9/10.

I took an example from DIAdem 10.1, modified it and tested it with DIAdem 8.1. I hope this will help you.

Greetings
Walter
0 Kudos
Message 4 of 11
(4,832 Views)
Hello Gerald!
 
You have to run the scripts from Brad and Walter in DIAdem!
 
Matthias

Message Edited by Twigeater on 12-14-2006 10:43 AM

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 5 of 11
(4,830 Views)

Hello Walter,

thanks a lot for your example, although I don't know if it solves my problem. Let me explain me problem once again. At the moment I have 2 DAC-applications and therefore also 2 VISUAL-applications. I don't want to open a new application all the time, that's why I would like to put the 2 applications together and make a single application out of it. The problem is that there is not enough space for all the blocks in the VISUAL-application on the screen. So I would like to use 2 different sheets or scrollbars or something else.

By modifying your example-code I can open the 2 DACs via menue, but I have to start them seperately and that's not what I want. It would only help me, if both applications can run at the same time. I ran my script using the button in DIAdem AUTO. Is there another way to run script-files? Another question is: How can I make DIAdem open files which are not in the library-path? (I am sure there is a function for this).

I hope I have explained my problem clearly now. How would you implement this?

Kind regards,

Gerald

0 Kudos
Message 6 of 11
(4,799 Views)
Hello Gerald,

To make tow in one DAC application you can grouping block diagrams. That means you group both applications and control it with some logic blocks. I attached a small example for that. I hope that's the solution you are looking for.

In general DIAdem starts searching for a file (which should be loaded) on the user folder. If there isn't the file DIAdem looks on the library folder. So you have two possibilities:

modify the variable for the user folder like :

DataDrvUser = "MyPath"
call DataLoad("MyFileName.DAT")

or

use the path name in front of the file name like:

call DataLoad("MyPath\MyFileName.DAT")

I hope this info can help you.

Greetings
Walter
0 Kudos
Message 7 of 11
(4,786 Views)

Hello Walter,

thanks for your example. I thought it would work at first, but there is another problem: I am using DIAdem to control measurement-equipment and with this equipment it is not allowed to just turn off the clock. (that results in an error) I also think that it is not the ideal case for me to switch between the 2 applications via buttons because to start an application always takes quite long.

The ideal solution would be to have both applications running all the time and just switch between 2 different user interfaces or making one big user interface and navigate with scrollbars. How can I implement this?

Kind regards,

Gerald

0 Kudos
Message 8 of 11
(4,778 Views)
Hi Gerald,

then the only choice you have is to control the instruments in VISUAL. Please have a look at the example "FACILIT4.DAC" which shows the principle.

I hope this can help.

Greetings
Walter
0 Kudos
Message 9 of 11
(4,775 Views)

Hello Walter,

thanks a lot for your example, using this example I can realize the functionality I need.

Now I have another problem: In the example you send me, buttons are used for generating the control signals. I would like to use switches (which remain in their position after they were pressed) instead of buttons. I have not found switch-block that generates control-signals (I think there isn't any), that's why I thought about using a signal converter that converts a data-signal into a control-signal. However I have not found information about it in DIAdem-help and I also didn't find such a block.

Do you have another advice for me how to implement this?

Kind regards,

Gerald

0 Kudos
Message 10 of 11
(4,739 Views)