LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN I use scripts to execute/command an automatic test with Labview?

Hello,

 

I am novice and I would know if it's possible to program a test with a script (I don't know with what kind on script, I search the best way).

I want that this script execute a test with labview, for example a script (with values in an excel file etc...)  wich will command a motor for automatics tests.

 

I don't know if it's possible and how do this kind of scripts, I want that people (that doesn't know labview)modified a script onl, and the script execute a labview automatic test, with parameters defined in the script.

 

Bye.

 

 

 

0 Kudos
Message 1 of 21
(3,956 Views)

It is certainly possible to write LabVIEW code to run a script - it has been done many times.

 

I recently develop a system of Queued Message Handler Test Blocks that import a .xml to perform a set of tests.  The .xml file is derived from a excel spreadsheet.  The Test Engineer "programs" the test on the excel worksheet(s) then creates a TestStand sequence to call the individual test blocks and associated configuration (Test) files.

 

A note of caution - this is not a trivial programming exercise.  A lot of planning and coding is required before any DUT testing can begin. This can aid the Test Department as the Test Engineers do not have to know LabVIEW to develop a test.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
Message 2 of 21
(3,946 Views)
0 Kudos
Message 3 of 21
(3,938 Views)

I haven't TestSand, it's for an internship, I have all my blocks to generate DC voltage, measurement, CAN communication etc... and I would find a ( simple) mean to enter parameters in an excel file etc (for the basic solution...), and the parameters could be read by labview to execute a test defines with the blocks.

 

I saw that there is some script based on xml but I don't  the possibilities of this kind of scripts, maybe I think it exist script based on C, but I don't know if this script can controled my VI, if it's  if it's the better solution...

 

 

0 Kudos
Message 4 of 21
(3,936 Views)

Hi muks, I saw your link, I think it's a good program, it would be a good solution but ... the scripts will be re use by people that don't know labview... or that they haven't labview necessary on their computer, they just modified the script and send the script to an other person which execute the script with the labview program to launch an automatic test.

 

I don't think that Labview Scripting it's a good solution, what is the language XML ?

0 Kudos
Message 5 of 21
(3,930 Views)

I use a Table to hold the LabVIEW commands.

 

You need to:

1.)  Define the keywords the LabVIEW will execute.

 

2.) Create a Queued Message handler to perform your tests.

 

3.)  Read the Table row-by-row and perform the actions required.

 

for each Row load the Queue with the states needed to perform an action.

 

Here is a very simple example:

 

Keyword     Device      Alias       Action         Value         Result                        States

Setup           DMM      DMM1    Function      DC Volts                                       DMM Config, Idle

Setup           DMM      DMM1    Range          100.0                                          DMM Config, Idle

Read            DMM      DMM1                                         24.01                         Read Dmm, Display, Idle

Log              Result                                                                                         Save Data

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
Message 6 of 21
(3,919 Views)

ok I will try to do that 🙂

 

thank you


 

0 Kudos
Message 7 of 21
(3,910 Views)

Hello VADave,

 

I want to better understand your example, I don't understand why do you use a key word in your row because you have the state, the actio, the value etc...

 

If I want to write a small test that turn on a motor (START), check a voltage (ANALYZE) and then turn off the motor (STOP):

 

keyword           Device           Alias         Action           Value       Result       States

Setup                    ?                 ?           function       DC volt                       START

Setup                    ?                 ?             range          10.0                         START

Read              multimeter          ?                                                10.0        ANALYZE

stop                      ?                 ?                                                               STOP

 

Is it right? I think that I have not well understand how the system pass at an other state...

 

0 Kudos
Message 8 of 21
(3,894 Views)

As pointed out in the new thread you started, what you need to do is to create a state machine to run your script's actions.

 

How you parse the script is completely up to you based on how you define the format of the script. If you choose to use XML, then you have to decide whether to use the LabVIEW XML schema (which is documented in the LabVIEW Help) or your own. If you use your own, then reading the XML file will depend on which version of LabVIEW you have. If you have 8.6 then you can use the XML parser that comes with LabVIEW. If not, then you need to use third-party XML VIs such as LabXML or JKI's Easy XML.

 

 

Message 9 of 21
(3,875 Views)

ok I have a state machine on a paper so I should program my state machine on Labview and give the parameters with XML files? Or Can I create a state machine in the XML file?

 

An other question, what is the advantage to choose the labview schema, I saw it, I understand that he define attributes for structures but I haven't really understand what is the model or how can I use it...

 

Thanks a lot for your previous answers.

0 Kudos
Message 10 of 21
(3,871 Views)