NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence Context

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.

0 Kudos
Message 1 of 4
(3,243 Views)

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

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 4
(3,228 Views)
I'm not really sure that I understand the example that you posted in that thread.  I don't think that I was able to get it to work right, but correct me if I'm wrong, I think it's supposed to be similar to this example http://zone.ni.com/devzone/cda/epd/p/id/106 where you have a separate executable running that gets the execution handle from TestStand.  If so, it's not exactly what I wanted but that may be useful.  Another way I was thinking to achieve my goal was to pass the sequence context into the dll call from TestStand and then assign it to a global variable in CVI.  Then I should be able to access the execution handle in the error handler function everywhere by using the sequence context global variable.  It means though that I need to pass the sequence context into all of my dll calls and I have to make the global assignment statement at the start of all of my dll functions.  Unfortunately I didn't plan for this so this means a lot of TestStand prototype changes and additional lines of C code.
0 Kudos
Message 3 of 4
(3,207 Views)

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

Message Edited by j_dodek on 10-27-2008 10:39 AM
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 4
(3,204 Views)