10-22-2008 02:19 PM
Hi, I'm using TestStand 4.0 and Labwindows CVI 8.5.
I was wondering if there is any way to get the CAObjHandle seqContextCVI without having it passed by parameter into the dll call?
My problem is that I have a large project that was originally all CVI code and I'm trying to convert it to code that I can call from TestStand. The project uses an error handling function everywhere that doesn't have the sequence context parameter passed to it. In some cases it's burried under layers of functions and so it would be difficult to pass the sequence context down into it. The reason that I need to have that object handle is so that I can check to see if the sequence execution was terminated without waiting for the dll call to return to TestStand. Ideally, I could just re-write the error handling function to check if the sequence was terminated, but in order to achieve this I would need the sequence context.
Thanks for your help.
10-23-2008 01:18 AM
Hi rreis,
Maybe this thread could be interresting http://forums.ni.com/ni/board/message?board.id=330&thread.id=18696
There is an example which shows how to share an Execution object an "stand-alone" application.
if you have an ExecutionObject you will get the underlaying SequenceContext.
hope this helps
juergen
10-27-2008 09:58 AM
10-27-2008 10:38 AM - edited 10-27-2008 10:39 AM
Hi,
it should be possobile to store the SequnceContext as a global pointer in CVI (i always so do this stuff in c++)
but if you are in a sub subsequnce it will be bad.
So pass the context to cvi with an init call and try to get the execution pointer and save it as a global.
Everytime you need a SequnceContext you will get it via the execution.
hope this helps
Or may there will some better suggestions from your ni guys here
juergen