From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Programmatically Insert ActiveX/COM Step Using LabVIEW

Solved!
Go to solution

Hi,

 

I would like to be able to create sequences like the one attached, using LabVIEW.

 

This sequence has only 2 steps, a LabVIEW VI call, and an ActiveX/COM Adapter Call.

 

I have been able to do this using an adaptation of the code here: https://decibel.ni.com/content/docs/DOC-36337

 

However, I am struggling to add the ActiveX/COM step.

 

Any help would be gratefully received.

 

Thanks,

 

Dan
CLD
0 Kudos
Message 1 of 5
(4,653 Views)

Hi,

 

Take a look at the attached example, it will do the job for you by creating the 3 different steps in 3 separate sequence groups. Check the output located at C:\NewSeq.seq.

 

Good luck:)

------------------------------------------
CLA, CTD, CLED @ Test & Measurements Solutions Poland
Message 2 of 5
(4,636 Views)

Thanks for that Folon - I think I'm half way there.

 

Is there a way to populate the Module Settings fields, as in my attachments.  "No Settings.png" is what your code currently generates, and "Settings.png" is what I want.

 

Thanks,

 

 

Dan
CLD
Download All
0 Kudos
Message 3 of 5
(4,615 Views)
Solution
Accepted by topic author DanB1983

Obviously there is a way if you look for it:)

 

Since you have an existing object of the "Step" class you can also get a "Module" object for it. Afterwards you have to specify that this is an ActiveX module. If you do not know that - probably you need to get it from the "Adapter" object somehow... Our case is simplier, so you just cast it to the ActiveX module and ... set some properties like ServerId, ActiveXReferenceExpr and so on.

 

I have attached an example for you. Interesting thing is the ServerId - I have just read this chain from the TS for similar step and reused it here so don't ask me how to obtain it automatically:)

 

You still have to fill your "Properties" like "file" - but I will graciously leave this job for you =:)

 

Best Regards,

 

 

------------------------------------------
CLA, CTD, CLED @ Test & Measurements Solutions Poland
Message 4 of 5
(4,596 Views)

Thanks very much!

Dan
CLD
0 Kudos
Message 5 of 5
(4,589 Views)