LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

script file for test automation.

I have a file “HPE3631A configure output.vi” (DC power supply). This file I downloaded from NI web for using control our DC power supply. I would like to use a script file that can automatically process and configure the output voltage, current parameter? I do not have to click mouse for change the voltage and current parameter. We would like use this script file as one of our test automation.

What format file can use as a script? Is any example file I can use as a reference (it does not have to be HPE3631A).

 

0 Kudos
Message 1 of 5
(3,394 Views)
A similar question was asked 1/12 at info-LabVIEW and there was also a mention of a commercial script tool that you might want to look at. You can use a variety of files as your scripting language. Plain comma or tab separated text, databases, Excel, etc. have all been used. If you want to allow a user to create their own text script in seomething like notepad, you'll have to be careful about parsing and establishing some syntax rules. One way to avoid that is to create a GUI in LabVIEW that gives the user the option to build a test sequence from various drop down menus. You might want to try doing a search of the forum for "scripting" to see what you can come up with. Another option is to make use of an existing script language such as TCL. I've only done a few things with TCL scripts in TestStand but I seem to remember some posts here about it. Try searching for that as well.
0 Kudos
Message 2 of 5
(3,384 Views)

Thank you for the email. Please let me know where can I find an example of the script file. I need find an example of the script file that can step by step process the HPE3631A configure output.vi. I have no experience of using TCL.

0 Kudos
Message 3 of 5
(3,368 Views)
Hi Dawn
of course you can investigate /use script filing to solve problem.
Why do that when you can solve just with Labview?
If I can recollect correctly the HPE 3631A has a recall function with  six registers.
So solution 1:
Manual setup power supply-then save configuration to register 1 (for example).
Operator then manually recalls setup each time required.

This solution does not work if system automated!!!

Solution 2:
After saving configuration parameters to register, use Labview to recall register.
Thus you can have six different set ups to be recalled whenever needed.

You can also use labview to verify that the configuration is correct before proceeding with testing.

If you have the manual you should be able to find the GPIB commands to access/control the power supply.
Under NI instrument section you should be able to download the HP3631 library which also has several examples. If you can´t find it
let me know.

chow
xseadog




0 Kudos
Message 4 of 5
(3,363 Views)

I don't have an example. You are free to create a script file in any format that you want. To give you a little help, say you have a comma separated file. The first field could be instrument address. The second field could be a function. This might be Initialize, Configure Voltage,Configure Trigger, etc. The following fields could be parameters that you pass. Some functions would require more parameters than others. Look at the number of functions in the driver and see if you want to duplicate them and how many parameters they require or whether you want to break some of them down into something smaller. When you've decided that, then you can determine how to read the file and parse out the commands. Do you want to do error checking here or someplace else? What I mean is, what if the file contains the word "Initilize" instead of "Initialize". What if a voltage parameter is out of bounds?

Like I mentioned, you could have a LabVIEW VI generate the script. Imagine a front panel text ring in which you have listed all of the various functions. If function b is selected, have logic that displays the correct number (and type) of other parameters required. When the selection is complete, click an OK button to display the new step in a table. A table is nothing more than a 2D string array so saving it to a file is then simple.
0 Kudos
Message 5 of 5
(3,354 Views)