NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pause/Resume for individual sockets

Hi,
I have a one requirement to Pause and Resume the test sequence with the help of GUI(CVI platform)  which is having a multiple sockets in test stand

 if i press pause in socket 1 it should pause the socket1 and if i press resume it should reume from the same where it get pause in socket1

if i press pause in socket2 it should pause the socket2 and if i press resume it should resume form the same  where it get pause in 2nd socket

can any one help me to Pause/Resume the sockets independently?

 

0 Kudos
Message 1 of 7
(3,815 Views)

The trick here is knowing what the execution for each socket is.  So what I recommend doing is at the beginning of main send a UIMessage with either the SequenceContext or the Execution and which socket it is in.  Then in LabVIEW collect those and store them a functional global somewhere.  Now when the user clicks pause you can just look at which socket they were standing on when they clicked it and call the API functions for Execution.Break() and Execution.Resume().

 

BTW- the easier method would be to change which ExecutionView is the active one and then just do a break on that one.

 

I'm not sure how your UI is coded so I can't really say which is the best for your situation.

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

Hi  jigg,

Thanks for the replay,i am using Execution.Break() and Execution.Resume() API funtion calls but the issue is

1) lets assume i am executing 2 threads(sockets) are running in batch mode i would like to stop only 1 out of 2 form UI.what happening is,if i try to pause the thread1(socket1) it pausing the thread in which the control is there.

2)  it executing few setps in first 1st thread(socket1),  and few steps in 2ndThread(socket2)  and it again coming to 1st thread(socket1) and again 2nd ........1st..2nd....

 in the that case i would like to pause the 2nd thread the control is in 1st thread it pausing the 1st one.

3)if the control is in 2nd threads it pauses the 2nd one,if not i am facing the issue.......

 

 

0 Kudos
Message 3 of 7
(3,784 Views)

Although sockets are indeed threads.  They are attached to different executions however.  Because of this they each have a different execution reference.  So basically what I am saying is that you need to be breaking the correct execution when you break.  (BTW- there is no such thing as a pause.  It is called a break.  Symantics though)

 

In a UI you have an execution view manager.  You connect executions to it.  Unless you have multiple execution view managers you cannot have more than one "active" execution.  By active I mean attached to the execution view manager as the active exeuction.  If you have multiple execution view managers then the answer to you question becomes even easier.  Just attach each Break button to the correct execution view manager.  Otherwise you have to make the correct execution "active" and then break the active execution.

 

Hope I'm making sense here.  Let me know if you have questions. 

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

Hi jigg,

here i have few more question can you please answer it,
-Do you know any CVI API to activate particular socket execution? if any  example can you please share with me.

-How to connect execution to execution view manager?
if you have any examples can you please share with me.

 

Thanks ,

imran.

0 Kudos
Message 5 of 7
(3,467 Views)

You have the source code for the CVI UI that ships with TestStand.  I don't know off the top of my head but it's in there somewhere.  Have you looked at it?

It's located in <TestStand>\UserIntefaces\Full-Featured\CVI

 

Hope this helps,

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

HI JIGG,

Thanks you for the reply once again,

i have only one execution manager and i tried to link the ActiveX control button to execution manager and i am able to pause /break to that linked Execution manager .(Pause and Break is happening to both the sockets).

 

what i am trying to do is  pause/break should happen to only one socket either 1st socket(Thread1) or 2nd socket(Thread2) using single execution manager.

 

can you please suggest any other ways to do it.

0 Kudos
Message 7 of 7
(3,434 Views)