NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed sending a UI activex reference back to teststand

Ah spotted it, thanks again will try!

0 Kudos
Message 11 of 20
(985 Views)

Hi again

 

Am I able to test if this works while opening the GUI in the background and running the script from the Teststand sequence editor?

 

I am not at the stage of being able to put the script into the GUI system as that's a production process, but want to test the message and retrieving of the reference before hand if possible?

 

Thanks!

0 Kudos
Message 12 of 20
(968 Views)

The only way to do UI Messages is to have the Application Manager so that you can create the events.  I haven't tried it out but you could get the application manager from the sequence editor and pass it into a VI and then register for the UI Message like you are doing in your UI.  Then try to fire the UI Message.  This may throw an error though as you can only register for the same event once and they may already be doing this in the sequence editor (maybe not though).

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 13 of 20
(958 Views)

Everything is in place, but when I run the GUI I now get the following message when running the sequence file.

0 Kudos
Message 14 of 20
(921 Views)

Ummmm I think the error pretty much says it all.

 

You cannot use that property option with the SetValVariant method.  The TestStand help points this out: https://zone.ni.com/reference/en-XX/help/370052W-01/tsapiref/reftopics/propertyoptions/

 

Hope this helps,

 

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 15 of 20
(905 Views)

So how does one find a method of getting the reference needed from the GUI into Teststand? I'm a little lost at this point Smiley Indifferent

0 Kudos
Message 16 of 20
(891 Views)

Trying to see where I've gone wrong here but can't see how.

0 Kudos
Message 17 of 20
(884 Views)

Is that one still throwing the error?  It looks right for the property options.  Does Locals.X3_Ref exist for sure?

 

Which error are you seeing now?

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 18 of 20
(869 Views)

Hi yes the error in the screenshot was while using that bit of code, and the expression

 

"RunState.Thread.PostUIMessageEx(UIMsg_UserMessageBase + 010, 0, "" , Nothing, True)"

 

Locals.X3_Ref exists as an object.

 

One thing to note is the GUI already has a bunch of other TestStand set properties for other things in the same event code, do I need to set this up in a separate event code? See attached.

 

Thanks!

0 Kudos
Message 19 of 20
(860 Views)

Okay I got past this error by setting up a new UI code and setting the property option to 0.

 

Now the script runs and pulls the reference into the variable. But as soon as I call the labview DB driver using that reference I get the following error:

 

Failed to convert a TestStand type to a LabVIEW type or vice versa. Error attached.

 

I also tried converting the reference to a string which allowed the VI to open but the converted result did not locate the active reference.

 

What can I do now?

 

Thank you!

0 Kudos
Message 20 of 20
(838 Views)