12-20-2017 08:06 AM
Hi,
I have found the NI response and workaround suggestion that I think may work for me:
Use TestStand expressions from within the code module to access the physical device to occur only from the main Test Stand process.
1. Pass a reference to SequenceContext into the code module and create a property object such as a string property
2. Call EvaluateEx on the existing property object and evaluate one of the Switching Expression Functions to invoke the NISE API through Test Stand.
I'm not sure where to start with this, I've got a reference to sequence context but after that I'm lost!
Anybody here done it this way,
Regards,
Steve
Solved! Go to Solution.
12-20-2017 11:01 AM
Kelly:
Here are some example files showing how to call SwitchConnect() in the TestStand process, but from a LabVIEW vi:
Brian
12-20-2017 11:17 AM
Thanks Brian,
I should have mentioned I'm using LW/CVI! I think my issue is I need to run the NISE API in the Test Stand process but from the code module, but the methods I've tried seem so slow.
Many thanks Brian,
Steve
12-20-2017 01:49 PM
Steve:
Here are some files to show how to run SwitchConnect() in the TestStand process, from CVI.
Brian
12-21-2017 07:21 AM
Brian,
That's great thanks, It's got me some way down the road...however...
My next issue, and the code you supplied works great, but only if the CVI module is called the first time. The next time it's called, from another sequence file which is in turn called from the main sequence, it says the resource is locked. I'm assuming NISE has used it's maximum of two handles although I'm not sure where.
The workaround would be to release the handle, but this calls ini_withoptions which resets the switch which is exactly what I can't do. Unfortunately the nature of the project precludes me from pasting code/sequence segments.
Is there anyway to instigate NISE comms without calling withoptions/reset?
Many thanks,
Steve
12-21-2017 07:48 AM
Brian,
That's great thanks, It's got me some way down the road...however...
My next issue, and the code you supplied works great, but only if the CVI module is called the first time. The next time it's called, from another sequence file which is in turn called from the main sequence, it says the resource is locked. I'm assuming NISE has used it's maximum of two handles although I'm not sure where.
The workaround would be to release the handle, but this calls ini_withoptions which resets the switch which is exactly what I can't do. Unfortunately the nature of the project precludes me from pasting code/sequence segments.
Is there anyway to instigate NISE comms without calling withoptions/reset?
Many thanks,
Steve
12-21-2017 08:37 AM
Steve:
Sub-sequences worked fine for me, without error. See attached files.
Which switch devices are you using? Can you post your sequence files to the forum?
Brian
12-21-2017 08:47 AM
Brian,
I use the CVI code you posted...but I'm running an older version of Test Stand (2013) so I can't open the sequence files. I'll try to download an evaluation of the later version.
I very much appreciate your help Brian, but I can't post our sequence files due to their confidentiality.
Steve
12-21-2017 08:53 AM
Here are the sequences saved for TestStand 2013. See attached.
12-21-2017 08:55 AM
You'll need to fix up the subseq call paths in the main seq, to match the 2013 subseq file names.