From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot configure TS Object parameter in steptype

Solved!
Go to solution

Hi

in TS 2014 (64bit) I am trying to configure a StepType for calling a C++ dll function.

The function expects some TS::PropertyObject parameters. When configuring the call directly, not as a StepType, this works fine. But when I try to set this parameter type in the StepType dialog (regardless of using default module or PostStep>Specifcy Module), the parameter type remains empty.

After selecting the "TS Object" category, I get the list of object types, but when I select TS::PropertyObject (or any other, at that) the Type setting remains empty and the description field simply shows an asterisk.

Am I doing something wrong or is that not possible in a StepType?

Regards

Peter

2017-01-12_22h39_51.png

0 Kudos
Message 1 of 7
(3,554 Views)

Hello pwaszkewitz,

 

For a normal step it works, but in the custom step i also can not select this. I have to test some more, because in the examples normally ThisContext will be transfered as a parameter.

 

 

 

 

best regards
Alexander
0 Kudos
Message 2 of 7
(3,505 Views)

Hello pwaszkewitz,

 

The property appears to be updated on the step, specifically <Step Type>.Substeps.<SubStep>.TS.SData.Call.Parms[x].Type. Can you verify that the substep actually works? If it does, this might just be a cosmetic issue.

 

To workaround this by specifying the parameter to be an Object and type is  ActiveX Automation IDispatch Pointer or ActiveX Automation IUnknown Pointer?

best regards
Alexander
0 Kudos
Message 3 of 7
(3,471 Views)

When I try to run a step created with the StepType showing the empty types where TS:: PropertyObject should be, it fails with the following error:

Error message: -17313: Object interface of argument expression 'Step.HdvpInterface.ControlOutputs' is incompatible with parameter. Expected , found TS::PropertyObject

I can however edit the interface of the step after insertion, change the empty types to TS:: PropertyObject and then execute the step correctly.

So I think it is not cosmetic, it actually does not work (or I am missing some trick), but with an Edit substep that fills in the missing types etc. it should work.

Thanks

Peter

0 Kudos
Message 4 of 7
(3,455 Views)

Peter,

 

reading your reply, i think the easiest short term solution would be to add an OnNewStep substep module which automatically fills in that paramenter type entry. Using this, you can provide a working custom step type immediatly and do not require any rework of the DLL.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 5 of 7
(3,449 Views)
Solution
Accepted by topic author pwaszkewitz

Using OnNewStep is likely not necessary. A simple workaround should be to edit the property of the step type where the object name is stored, specifically the following String value:

    <Type>.Substeps[x].TS.SData.Call.Parms[x]StructType

 

See attached image for reference.

 

Once you do this, the substep dialog shows the proper name. After you make this change, try dropping a new instance of the step in a sequence and running it.

 

 

Scott Richardson
Message 6 of 7
(3,441 Views)

Works perfectly, thank you!

Also thanks to all the others who took the trouble of working on this problem and for their suggestions. I learned a lot and OnNewStep may come in handy again.

Regards,

Peter

0 Kudos
Message 7 of 7
(3,429 Views)