11-17-2015 07:22 PM
Hi I'm currently having some issue with a program I wrote in Teststand. The program is running a parallel model, where each station/test socket is initiated by a notifcation in the back ground thread. I use a "start" button and "cancel" button to control each test. I also have a "restart" button to reset any socket should something go wrong. The start button just sets the notification which is waiting in PreUUT callback. The cancel button uses the "Execution.terminate" command to cancel any running test and the "restart" button just uses the "Execution.RestartEx" command. I found that if I started a test, then cancel the test in the middle of postUUT, the test socket will be in a state where I can not start a test(The executionRunState is 3, and ExecutionTerminationStates is 2). ~ So I need to "restart" the socket. After I restart the socket, everything seems to be working fine until I get a run time error right after the "main" sequence gets executed. I've attached the screen print to this post.
My question is where is this error exactly happening, and why is it happening? I can't seem to figure out where the error actually occur because the highlighted code here doesn't seem to appear in my code or the process model. Also I don't understand why it only occurs after I restarted. I've also attached the sequence file. Thanks a lot.
11-18-2015 11:32 AM
Hi,
It seems that this is the same/continuation of the post you created:
http://forums.ni.com/t5/NI-TestStand/teststand-quot-restart-quot-execution/m-p/3218259#M49901
Please keep the same issue in one post.
Thanks,
11-18-2015 02:39 PM
Hi John, thanks a lot for the reply, however I didn't actually know the two were of the same topic, also the reply you had given me was rather generic, i had a look at the National instrument's website for "Restartex" topic before, it just does not explain to me what it really does, I orignally thought it restarts a test. But my co worker later on explained to me that it reinitalises a test socket after something goes wrong. So the National instrument's explaination did not help me. Sorry.
Regarding to the topic I have on this thread, I don't know what happened, and why I always have this run time problem. So, I'm sorry if it's actually the same topic and I started a new thread(as my teststand knoweledge is still limited at this time), but if you can see though the issue please help me understand. Thank you.
11-19-2015 01:32 PM
Hi,
What version of TestStand are you using?
Thanks,
11-19-2015 03:05 PM
I'm using Teststand 2014 64 bits. Thanks.
11-20-2015 01:50 PM
Hello,
Have you seen this knowledgebase?
http://digital.ni.com/public.nsf/allkb/67192F7EC57B5EF986257964007876E6
Thanks,
11-22-2015 04:58 PM
Hi Jonathan, thanks for the reply. Sorry I didn't make myself clear, I understand that indexing an empty array would definitely cause issue. My problem is that I don't know what or where this array is, I didn't actually create this array, I suspect it's part of the process model or something. If you have a look at the picture I attached in this post, you will see that on the top left of the picture the execution is highlighted but I can't figure out even what array it's having trouble indexing with. I looked at the process model file for this sequence but I couldn't dermine where it is, or if it's part of the process model at all. All I do know now is that it could be the array indexing the test sockets, I suspect that somehow terminating test when it's running "PostUUT" will terminate the test socket and make the testsocket index "-1", and somehow running the function "restartex" does not fully restore the testsocket back to normal condition (I might have left out some other procedure to fully reinitalise the testsocket). Could you please tell me what issue can occur if a test is terminated during "PostUUT" and why I can't just call the "restartex" function to reinitialise the test socket so I can start tests on the same station again? Thanks a lot.
11-23-2015 04:57 PM
Hi Iamthedudeman00,
Can you check how many test sockets you have? Instructions on how to do this are found in the following forum post: http://forums.ni.com/t5/NI-TestStand/Get-the-Number-of-test-sockets-by-code/td-p/2702023.
11-23-2015 05:58 PM
Hi Luke, I tried the link you sent me but it did not work. The following message occured:
An invalid set of parameters has been specified in the url.
11-24-2015 03:34 PM
Hi,
Can you tell us how you set the number of test sockets? Did you do this manually?
Thanks,