From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

chart or file SUD-Dialog

Hello Brad,

No, I don't want a blank SUDialog. I want to save the coordinates that are dispayed in a SUDialog whit a button in a Excel file.

Greetz,

PVH.

0 Kudos
Message 11 of 19
(2,005 Views)

Hi PVH,

Do you mean 1 pair of cartesian (x, y) coordinates?  How will the user be entering those?  Should they be separate text boxes or cells in a table?  Should they be aligned vertically or horizontally in Excel?

What do these coordinates mean?  Why is the user entering them, and how will DIAdem use them in the future?

Brad Turpin
DIAdem Product Support Engineer
National Instruments

 

0 Kudos
Message 12 of 19
(1,986 Views)
Hello Brad,
 
I'am using cartesian coordinates (x, y and z). In the SUDialog I want to creat three separated fields where I can display the x, y and z coordinate of a specific robot arm position. When I move the robot arm with a joystick, I want to see the coordinates changing in the display fields.
 
In the same SUDialog I want to creat four more separated fields and an confirm button. After pressing the confirm button I want DIAdem to copy the x, y and z coordinates, for example "Left". This name (or number) will be entered manually in the fourth field. In excel it would look like this:
 
                   X         Y        Z
Left(1)        24        3        7
Right(2)     50        3         7
 
In addition to "Teaching" I want also enter the coordinates manually into (maybe extra) three x, y and z fields. After teaching a specific application I want to save the excel file unter a name that's corresponding with the application (will be about 40 different applications).
 
To run a program for a certain application I want to enter the Excel file name and Path in DIAdem so DIAdem can use the coordinates that are in the file. After loading the Robot will be able to move "Left"(1), "Right"(2) etc....
 
I hope I'am a little bit clear now, if not please ask
 
Greetz,
 
PVH 
 
0 Kudos
Message 13 of 19
(1,969 Views)

OK PVH,

Here's a good starting application for you, including SUDialog and Excel File state caching.

Let me know if you have questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

 

0 Kudos
Message 14 of 19
(1,950 Views)

Hello Brad,

 

The files you send me are working fine! Now I have another question. Is it possible to realize my project only with DIAdem and not with Excel or any other external program? You mentioned a *.VAS file would be an option.

 

I tried a few things with a *.VAB file for the different applications. Can I save the .*VAB files somewhere else then in the DIAdem program folder?

 

Which is the best and easiest path to take, excel or with VAB and VAS files?

 

Greetz,

 

PVH.

0 Kudos
Message 15 of 19
(1,930 Views)
Hi PVH,
 
The biggest problem with the Excel approach is if someone happens to have that Excel file open when they try to run the DIAdem application.  Excel is a very jealous, controlling application, and it will deny access to other applications trying to read an Excel file which happens to already be open in Excel.  On the other hand, the Excel application is an ideal tool for manually entering a few configuration values on a computer which does not have DIAdem.  It's really up to you.
 
Purely from a DIAdem programming perspective, it would be cleaner to avoid Excel and the added risk.  The VAB file is a nice native approach for DIAdem.  You can use the AutoDrvUser variable to set the default script directory if you find the UserVarLoad() command gives you trouble with a full path.
 
Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
0 Kudos
Message 16 of 19
(1,910 Views)

Hello Brad,

I am pretty busy programming at the moment.

A little question:

How can I display continuous, an analog input signal (DAQCard 6024E) in a SUD-Dialog Editbox?

Thanks,

 


PVH



0 Kudos
Message 17 of 19
(1,813 Views)

Hi PVH,

This is not an ideal way to use DIAdem.  The only way to "continuously" show the values of a file that is being continuously written to, is to create an endless loop in VBScript with a Wait() function and periodically load the data set into DIAdem and display it.  There is no real difference in the "continual" displaying of the results in a SUDialog vs. in DIAdem except that it would be much easier to display any results in DIAdem.

You also have to contend with the possibility that whatever program is updating that data file may not like a different application periodically requesting to read from that file.

Good luck,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

 

0 Kudos
Message 18 of 19
(1,741 Views)

Hello,

I have another question.

How can save a nummeric value displayed in DIAdem-DAC as an variable in a .*VAB file?

Thanks!!

Greetz,

Pvh.

0 Kudos
Message 19 of 19
(1,724 Views)