LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run Parallel While loops (Parallel Testing Station in Same Computer ) without delay ?

Hello Community,

 

I am having 10 Parallel  testing fixtures for the relay product testing  in single machine linked with single computer, I am loading 10 testing products in all the location and running my application but testing is not happening with equal cycle time efficiency , I am using pre allocated clone reentrant VI execution for all my sub VI and common libraries ,still i am facing issue with parallel processing, my testing station  performance is not equal when number of DUT are increased 1 to 10 in ATE

JayanthKumarm_0-1690633443876.png

 

 

Problem : Testing single product at a time gives me cycle time of  200 seconds , when i test 10 products cycle time it is getting increased from 200 to 280 seconds for all the 10 units, in my code i have made 10 Parallel while loops Using clone sub VI , when test is started the while loop speed is getting decreased if i run more than1 unit, My each Testing fixture has separate channel and  device addresses to communicate with the product it is not serialized i can run my test individually without dependency , I ensured my VI's are called at same time during start of a test to avoid race condition and it will not wait for completions of the other test unit

JayanthKumarm_1-1690634026662.png


My question is why parallel while loops are getting slow down ? even clone VI's are maintained  - I am using Power full industrial PC ( Core i9,64BGB,SSD Drive) which can handle multiple parallel task) I want to achieve equal cycle time no matter if test is happening for single or 10 units at a time, My PC memory is not even reached 40% during 10 unit test

 

1. I am not using any local variables

2. I am not creating dead lock between each parallel loops ,

3. following Queue loop pattern

4. Not passing any  variable data between parallel loops except stop or quit buttons

JayanthKumarm_2-1690635186316.png

 

 

looking for a example code for parallel processing 

how to use parallel loops concept efficiently ? should i use semaphores? expecting sample code 

how many parallel while loops can LabVIEW will handle without slow down in while loop iteration?
I am not sure am i following all the procedures and rules

0 Kudos
Message 1 of 7
(926 Views)

@JayanthKumarm wrote:

Hello Community,

 

I am having 10 Parallel  testing fixtures for the relay product testing  in single machine linked with single computer, I am loading 10 testing products in all the location and running my application but testing is not happening with equal cycle time efficiency , I am using pre allocated clone reentrant VI execution for all my sub VI and common libraries ,still i am facing issue with parallel processing, my testing station  performance is not equal when number of DUT are increased 1 to 10 in ATE

JayanthKumarm_0-1690633443876.png

 

 

Problem : Testing single product at a time gives me cycle time of  200 seconds , when i test 10 products cycle time it is getting increased from 200 to 280 seconds for all the 10 units, in my code i have made 10 Parallel while loops Using clone sub VI , when test is started the while loop speed is getting decreased if i run more than1 unit, My each Testing fixture has separate channel and  device addresses to communicate with the product it is not serialized i can run my test individually without dependency , I ensured my VI's are called at same time during start of a test to avoid race condition and it will not wait for completions of the other test unit

JayanthKumarm_1-1690634026662.png


My question is why parallel while loops are getting slow down ? even clone VI's are maintained  - I am using Power full industrial PC ( Core i9,64BGB,SSD Drive) which can handle multiple parallel task) I want to achieve equal cycle time no matter if test is happening for single or 10 units at a time, My PC memory is not even reached 40% during 10 unit test

 

1. I am not using any local variables

2. I am not creating dead lock between each parallel loops ,

3. following Queue loop pattern

4. Not passing any  variable data between parallel loops except stop or quit buttons

JayanthKumarm_2-1690635186316.png

 

 

looking for a example code for parallel processing 

how to use parallel loops concept efficiently ? expecting sample code 

how many parallel while loops can LabVIEW will handle without slow down in while loop iteration?
I am not sure am i following all the procedures and rules


First,and most seriously; GET RID OF THE Run VI METHOD calls.  They have become %99.9 obsoleted my the Asynchronous Call By Reference. 

 

Look into the Example Finder for the lvprojs showing how to use the ACBR node!  AND READ the Help file topics about management of the "Clone Pool."

 

You will find that your code would be much faster if you run the "Preallocate Clones" method to bury the time needed to create a Dataspace for each Clone in the startup.  

 

Yes, this is the exact programming problem that the ACBR node was designed to help with. 


"Should be" isn't "Is" -Jay
Message 2 of 7
(901 Views)
  • I don't know what a "queue loop pattern" is, but I don't see any queues.
  • Why do you insert the same VI 20x/second. Wouldn't once be sufficient?
  • What exactly does the subVI do and how does is communicate with the DUT?
  • have you tried opening the references explicitly using option 8?

 

0 Kudos
Message 3 of 7
(893 Views)

If anything in your reentrant subVIs are not reentrant, then each subVI will have to wait for each other anyway (for the amount of time it takes to process each non-reentrant part as they happen in the dataflow).

 

Edit:

I learned this the hard way when I created a wait.vi (back then there was no such thing and everyone rolled their own) but I did not set it to "reentrant" and placed it in a reentrant subVI and wondered why my program waited for a multiple of the wait time... and eventually realized that it waited for "(wait time) x number of clone instances" and from there it was a quick leap of logic to find the culprit...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 7
(877 Views)

@JayanthKumarm wrote:

Hello Community,

 

I am having 10 Parallel  testing fixtures for the relay product testing  in single machine linked with single computer, I am loading 10 testing products in all the location and running my application but testing is not happening with equal cycle time efficiency , I am using pre allocated clone reentrant VI execution for all my sub VI and common libraries ,still i am facing issue with parallel processing, my testing station  performance is not equal when number of DUT are increased 1 to 10 in ATE

JayanthKumarm_0-1690633443876.png

 

 

Problem : Testing single product at a time gives me cycle time of  200 seconds , when i test 10 products cycle time it is getting increased from 200 to 280 seconds for all the 10 units, in my code i have made 10 Parallel while loops Using clone sub VI , when test is started the while loop speed is getting decreased if i run more than1 unit, My each Testing fixture has separate channel and  device addresses to communicate with the product it is not serialized i can run my test individually without dependency , I ensured my VI's are called at same time during start of a test to avoid race condition and it will not wait for completions of the other test unit

JayanthKumarm_1-1690634026662.png


My question is why parallel while loops are getting slow down ? even clone VI's are maintained  - I am using Power full industrial PC ( Core i9,64BGB,SSD Drive) which can handle multiple parallel task) I want to achieve equal cycle time no matter if test is happening for single or 10 units at a time, My PC memory is not even reached 40% during 10 unit test

 

1. I am not using any local variables

2. I am not creating dead lock between each parallel loops ,

3. following Queue loop pattern

4. Not passing any  variable data between parallel loops except stop or quit buttons

JayanthKumarm_2-1690635186316.png

 

 

looking for a example code for parallel processing 

how to use parallel loops concept efficiently ? should i use semaphores? expecting sample code 

how many parallel while loops can LabVIEW will handle without slow down in while loop iteration?
I am not sure am i following all the procedures and rules


Let me answer a part of this question, there is metric called PTE which measures the efficiency of test system in scaling up.

 

The simple reason you don't see the same 200s test time when scaling up is that your architecture is not performant enough and there is additional overhead to manage each addition DUT you try to test in parallel.

 

Based on your code, you are pretty novice as you tried to implement your own parallel test sequencer (which TestStand is great at). Slowly you will learn all the reasons why building a simple application is vastly different from architecting a performant application that scales up very well and everything comes with a compromise.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 5 of 7
(860 Views)

Could you support me with right example code for parallel test system?

0 Kudos
Message 6 of 7
(834 Views)

Thank you so much for your guidance, I am new to Asynchronous Call by Reference method i will explore this

Message 7 of 7
(830 Views)