NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to log parallel test result using Teststand log function to database

Solved!
Go to solution

The problem is not the process model but the resources.

Lets try to implement a pseudo script.

 

System

1. One board pcie-6556 (1 port 24 bits accepts only one dynamic session at a time)

2. UUT1 connected to DIO0 to DIO3 - UUT2 (DIO4-7) - UUT3(DIO8-11) -  UUT4(DIO12-15)    --> 4 lines/UUT

 

Option 1

1. Open one dynamic session

2. Send one command to DIO0 to DIO15

3. 1 thread, 1 test socket --> 4 results (1 result/UUT)

Final Result: 4 UUTs tested in parallel

Drawback: all the results are in one report

 

Option 2

1. Use 1 thread for each UUT

2. The board accept only one dynamic session at a time

3. Send one command to DIO0 to 3

4. Get one report

5. Repeat steps 3 and 4 for the others UUTs.

Final Result: 4 UUTs tested in serial mode - 4 reports

Drawback: Increased test time.

 

Target --> 4 UUTs tested in parallel - 4 reports

 

 

0 Kudos
Message 11 of 24
(3,456 Views)
Solution
Accepted by engfpe
Option 3
Batch model
Send one command to DIO0 to DIO15
4 threads/sockets - 4 tests In parallel
4 results

I still don't understand why you think the batch model does not run multiple sequences in parallel.
Message 12 of 24
(3,453 Views)

My question is:

 

How do I send the results from "Send one command to DIO0 to DIO15" to the others threads/sockets?

This test return a array[0..3] of results. How can I link array[0] --> test socket [0]; array[1] --> test socket[1]....?

 

Currently the results are showed in one report and in the other they are skipped.

0 Kudos
Message 13 of 24
(3,443 Views)

RunState.TestSockets.MyIndex will give you the current threads socket number.

 

Then you can index your array:

Array[RunState.TestSockets.MyIndex]

 

I'm siding with Dennis.  Now that I understand your issue, the Batch model is the definite answer here.  It's time to roll up your sleeves and learn it.  Trust me in the end you will be much happier.  And you have the forums to guide you through any concerns you may have.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 14 of 24
(3,440 Views)

We are almost there.
I understood that I can use the "RunState.TestSockets.MyIndex" to index my results.
What I do not realize is how to make available a value from test socket 0 to test socket 1 - 3.

 

Please see the picture and the file attached

 

Batch

 

 

PS: Thank you very much for your time

Download All
0 Kudos
Message 15 of 24
(3,424 Views)

Using Notification or Queue I am able to pass data between test sockets.

 

Batch with notification

Download All
0 Kudos
Message 16 of 24
(3,418 Views)

Why do you need to pass information to other threads?

 

Another option, and a simpler one, is to go to Edit>>Sequence File Properties and change the Sequence File Globals: setting to All Executions Share the Same File Globals.  This allows all threads to point to the same FileGlobals.  The caveat here is that you can have race conditions if you are not careful.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 17 of 24
(3,412 Views)

I need to share the results to make tests like "Numeric Limit Test" and save the value to a database associated with the respective test socket (UUT serial number)

Each test will use only the corresponding UUT value.

0 Kudos
Message 18 of 24
(3,407 Views)

What you are trying to do is inherently done already in TestStand.  There is no need for the extra passing data around.  The Batch model handles logging to the database for the associated UUT already.

 

Unless I'm missing something there shouldn't be a need to pass data to other threads like that.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 19 of 24
(3,404 Views)

In the step "Simulate 4 test results 1 thread" I use "One Thread Only"

This thread comunicate with one hardware and gets the results for 4 UUTs.

The results are stored in the Locals.result array.

 

If I do not pass this data to the others test sockets how can I associate the result and the corresponding UUT serial number since all data are in the test socket 0? 

 

0 Kudos
Message 20 of 24
(3,392 Views)