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: 

change a stationglobal variable externally from a LV

Solved!
Go to solution

Try SetValVariant

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 11 of 17
(1,542 Views)

That does not work either. Runs with no errors.

 

Note that SetValVariant does not allow for the object to be created. Therefore the objref_FPGA was created in TestStand as an object reference.

0 Kudos
Message 12 of 17
(1,540 Views)

It doesn't work but runs with no errors?

 

So I'm not as familiar with LVOOP but I'm not sure what the object for it looks like.  I don't think it is just a reference like you are thinking.  I think you need to set each subproperty individually.  So basically if your LVOOP cluster is like a container with a string and boolean then you need to access the cluster and set the cluster in TS.

 

Regards,

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

I canot access components of the private class data as if the Object Reference in Test Stand were really a container type. 

 

This help site: http://zone.ni.com/reference/en-XX/help/370052M-01/tsfundamentals/infotopics/object_ref/

says you can set object references in Test Stand from the TestStand API. I have been able to set the Object Reference in TestStand from labVIEW to a reference like 'This VI'. I cannot however set the TestStand variable to be a 'LabVIEW Class object'. As referenced in the article you can set Object References through a code module output. I have done this and it works. So I am able to store LV Class Objects in Test  Stand. NI has yet shown me that the TestStand API is able to write LV Class Objects to TestStand from LabVIEW.

 

Any other thoughts? 

0 Kudos
Message 14 of 17
(1,504 Views)

Here is more info...

 

This manual: http://www.ni.com/pdf/manuals/375070c.pdf under the section 'Using LabVIEW Classes with TestStand' there is no detail about how to change Object References from the Test Stand API. It looks like it is a relatively new change that LabVIEW Class Objects can be stored in Object References. I am using TS 2013 and LV 2013 and the update was made in 2010 as per this article: http://digital.ni.com/public.nsf/allkb/EE3EA0A08FBB6E4A862573A9004C5A07. I may use the workaround listed in that article to move on from this issue if NI does not come up with an answer or I don't see any forum suggestions.

0 Kudos
Message 15 of 17
(1,503 Views)

So LVOOP, as far as I understand, isn't really object reference based.  You are still passing around the data in the wire.  So trying to assign it to a reference doesn't make sense.  So what you need to do is get the cluster or values out of the object and assign them individually to the variable/s in TestStand that correspond.  So for instance-

 

If I have an LVOOP object that has a boolean and string in it then you need some accessor function to get the string and boolean out of the object and then assign them to a string and boolean variable in TestStand.  Or just pass them back through the connector pane.

 

Again, this is going off of my limited understand of LVOOP but that's how I see it.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 16 of 17
(1,485 Views)

Jiggawax,

 I see what you are saying. breaking the Class Object into its individual components and into a TS Container would essentially do the same thing since the data is copied and not really a reference.

 

I have approached the problem differently in order to have a by reference variable in TestStand. I am relying on DVRs which I cannot write directly to a object reference in TestStand. Therefore I convert it to a binary string as a variant. If you see this causing an issue later then please advise.

0 Kudos
Message 17 of 17
(1,481 Views)