NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Expression to cast IUnknown to ISyncManager

Solved!
Go to solution

Hi,

 

I was just playing around trying to access a TestStand queue in an expression, basically trying to recreate the following LabVIEW Code.

Oli_Wachno_0-1661255395235.png

 

So far I have failed to cast the IUnknown Refences returned by GetSyncManager to ISyncManager....

there seems to be no AsISyncManager cast or alike.

 

Anyone's got some advice on how to perform this cast within an expression?

 

Cheers

Oli

0 Kudos
Message 1 of 4
(1,156 Views)
Solution
Accepted by topic author Oli_Wachno

Hello,

 

I just made the same observation. It is like if, in TestStand Sequence Editor, the class ISyncManager is unknown. And that's the same from ActiveX Adapter Steps, I didn't find to specify the class SyncManager.

 

This said, if you consider that TestStand, in the sequence editor context, will handle for us the SyncManager, we don't need to be able to manipulate it from an Expression: you can manipulate Queues, Notifiers, and other synchronization tools without even knowing that the SyncManager is involved nor exists.

 

The only case I had to access the SyncManager was to send a notifier from a LabVIEW application to the TS engine, where the Notifier was initialized by TestStand. In that case (from LabVIEW), it make sense to be able to access to the SyncManager, to allow an application (LabVIEW) to 'use' synchronization tools, from the 'outside' of TestStand.

 

Why do you try to access a queue in an Expression ?

Message 2 of 4
(1,116 Views)
Solution
Accepted by topic author Oli_Wachno

Expressions only expose what's in the NI TestStand API.  The SynchManager is part of the NI TestStand Synchronization.  So you have to use an ActiveX step as Mathieu pointed out.  

 

jiggawax_1-1661522752883.png

 

 

jiggawax_0-1661522634401.png

 

Hope this helps,

 

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

Mathieu, jigg,

 

thanks for your help!

 

in fact I wanted to avoid using an ActiveX step and use an expression instead. I am tinkering with some custom step types, where this would've come in handy.

Yet, it seems, I'll use ActiveX steps instead.

 

Cheers

Oli

 

0 Kudos
Message 4 of 4
(1,060 Views)