Jump to content

Assigning LabVIEW class object to RunState.Engine.TemporaryGlobals


Recommended Posts

Hello,

I am trying to do the following (LabVIEW2019, TestStand2019, Windows 10)

Create a new sub-property under RunState.Engine.TemporaryGlobals as Measurements.TestName_DateTimeStamp 

My TS expression:

 //get a handle to runstate.engine.temporaryglobals
Locals.tmp_prop_object = RunState.Engine.TemporaryGlobals,
//create a new obj ref type property under this
Locals.tmp_prop_object.AsPropertyObject.NewSubProperty(Locals.name1, PropValType_Reference, False, "",0),

where Locals.name1 is Measurements.TestName_DateTimeStamp (e.g: RunState.Engine.TemporaryGlobals.Measurements.RxGain12_16_58AM)

I now want to assign a LabVIEW class object to this property as:

RunState.Engine.TemporaryGlobals.Measurements.RxGain12_16_58AM = Locals.tmp_obj_ref

where Locals.tmp_obj_ref is the output terminal of a LabVIEW class and tmp_obj_ref is a TestStand variable of type Object Reference

If I do it like this in the expression window, I can see that my RunState.Engine.TemporaryGlobals.RxGain12_16_58AM has been assigned a LabVIEW class object

However, the value RxGain12_16_58AM is known to me only at run-time, so I cannot hard-code the assignment expression as above.

Any pointers on how to achieve this?

Basically if,

Locals.name = "RxGain12_16_58AM" (created at run-time)

then i want to be able to assign, during run-time:

RunState.Engine.TemporaryGlobals.RxGain12_16_58AM = Locals.tmp_obj_ref

image.png.7e8b6c7aad1df0296ebd7eeb18a3bf03.png

image.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.