NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Paralell sequence basics

Hi all, I'm using  TS to run one instrument and 3 test sockets. The tests will be done in paralell and any UUT must be able to be removed at any given time. 

 

Now for my question, I placed the call to the instrument connection in the PreUUT, I understand this seq runs just the first time.  In the main seq I mainly have the instrument  move some relays arounds. I thought this setup would run if I changed the model to ParalellModel.seq, but keep getting the following error:

 

Type of argument expression 'Parameters.TestSocket.ContinueTesting' is incompatible with parameter 'FailName'. Expected String, found Boolean.

Location :Step 'PreUUT Callback' of sequence 'Test UUTs -- Test Socket Entry Point' in 'ParallelModel.seq'

 

 

FailName is a string I use to store any error messages in my tests. Any ideas what to do?

 

Also, I tried looking this up and mainly got info on "batch mode", which is not what I want (the tests are independent).

 

Thanks

 

0 Kudos
Message 1 of 10
(4,308 Views)

The problem has nothing to do with the type of model you are using.  It looks to me like you are trying to assign a boolean to a string vairable.  Is FailName a String?  If so then you need to typecast ContinueTesting to a string to assign it.  Str(Parameters.TestSocket.ContinueTesting).

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 10
(4,300 Views)

BTW- PreUUT does run once for each socket (thread).  So it will run more than once if you have multiple sockets.

 

You should use locking with your instrument.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 3 of 10
(4,299 Views)

My confusion stems from the fact I was not aware of the parameter testsocket.continue testing, since it belongs to ParalellModel.seq, and never actually tried to assign anything to it. FailName is just there to store the error messages from my dlls. 

 

Looking at ParalellModel, it seems very complex. My own sequence is just PreUUT anda main seq, and less than five variables. Guess I was being naive in assuming it would work off the bat.

 

Any more variables that need to be "carried over" from paralellmodel?

0 Kudos
Message 4 of 10
(4,295 Views)

Very simply can you describe your application?  Maybe I can help you come up with a viable solution.  It sounds like you may be going the wrong way with your application.

 

Here's what I understand so far: You have 3 sockets that share 1 instrument.  MainSequence is where you talk to the instrument.  You tried to initialize the instrument in PreUUT but somehow passed parameters the wrong way?  Do you want each socket ot initalize the instrument?  Do you need to lock the instrument out from the other threads when you talk to to it?

 

Regards,

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

As jiggawax is saying.... 

 

it would be better if you explain more what you are trying to do.

 

running parallel sequences is not complicated but has it's tricks since you need to do some housekeeping stuff if you are sharing instruments.

 

if you have  3 sets of instruments for each dut  then  it will get a little easy.

 

to check which  thread is running and select instruments this  expression is your friend 

RunState.TestSockets.MyIndex

 

 

CLAD, CTD
0 Kudos
Message 6 of 10
(4,274 Views)

It's one 34980A moving relays, since I dont need that many relays one single 34980 can do the job.

 

I have a connect method from a c# dll, which I put in the PreUUT since I understood it to just run once for the 3 sockets ( since it's only 1 PC - 1 agilent, there's no need to connect more than once, I thought). The connect dll has a Parameter.FailName where I can put any error message. This is a standard I follow for all the methods  I've got in my dll. 

 

The connect method accepts the IP from the agilent as an input, and returns a boolean and also a string to be stored in FailName, which will be the error string or simply an "OK".

 

 

The main seq has the methods to switch the relays, and in the future I will also be measuring voltage and current. Since the agilent only has a dmm, I will be using locking. I have implemented this through the visalock methods, though I realize teststand also offers step locking, which might be simpler.

 

I've got this running using a single socket.

 

Thanks!

 

0 Kudos
Message 7 of 10
(4,258 Views)

As I mentioned before.  PreUUT runs once for each socket.  So it will run 3 times for the Parallel Model  if you have 3 sockets.  You should move the initialization to ProcessSetup (which only runs once). 

 

Is everything working now?  What are you seeing now that you've fixed the type conflict?

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

I started a new sequence following the sequential model, and just copy pasted my code there. Why this works for sequential and not parallel I have no idea, since I'm using the same variables.

 

 

0 Kudos
Message 9 of 10
(4,179 Views)

What is not working?  Are you still getting the type conflict error?

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