NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can we pass Containers as pointer from one Sequence to another?

I want to create a container of variables (still under development) that is viewable from all sequences without:

  • Having to place it in StationGlobals since it is a project specific list.
  • Copy and pasting the container for parameters for all sequences since the container is still being modified and want to avoid 1000 *.seq file changes when 1 variable is added or removed.

 

Another option would be to have a custom *.ini file similar to globalstations.ini but for a specific project. I don't know how to do this.

 

I'm only using TestStand and LabVIEW.

 

For example if this was in C, we pass a pointer to the massive structure in memory.

 

Thanks

0 Kudos
Message 1 of 9
(4,618 Views)

I would like to avoid having a different StationGlobals.ini file for each project. This can become a hassle to manage when there is multiple projects on a test station.

 

Thanks

0 Kudos
Message 2 of 9
(4,609 Views)

Hi,

 

did you have a look at datavalue references? Those are I think the closest you will get to pointers using LabVIEW.

 

Best Regards

 

Mathis

0 Kudos
Message 3 of 9
(4,590 Views)

I'm not trying to transfer code from LabVIEW to TestStand. Thanks for the information if I ever need to do that in the future.

 

I just want to basically have a project variables viewed by a select group of sequence files.

0 Kudos
Message 4 of 9
(4,583 Views)

Looking into this a bit more it seems to me that your data does not necessarily need to be abstracted by a pointer but could also get abstracted by being cast to a variant or for what that is worth, flattened to a string or XML ... something which is agnostic to what type of data it actually contains.

 

In particular when looking at the case of variants it becomes clear that this is a limitation of Teststand:

 

http://forums.ni.com/t5/NI-TestStand/typecasting-Labview-variant-in-Teststand/td-p/2160452

 

I don't think there is a built in function to dereference a pointer. When dealing with pointers these are usually used to pass them into CVI code modules or activeX/.net calls

 

That said you can obviously create a code module which references/dereferences pointers or DVRs.

 

Best Regards

 

Mathis

0 Kudos
Message 5 of 9
(4,577 Views)
A called sequence can define a parameter to be just a container and the calling sequence can pass anything, if you disabled type checking on that parameter. However, a developer of the called sequence cannot see or build expressions easily, they must just know the structure of the parameter's container. Is that an acceptable limitation?
Scott Richardson
0 Kudos
Message 6 of 9
(4,546 Views)

That might actually work. I will need to test it. Is there any plans in TestStand to add a project ini file?


@Scott_Richardson wrote:
A called sequence can define a parameter to be just a container and the calling sequence can pass anything, if you disabled type checking on that parameter. However, a developer of the called sequence cannot see or build expressions easily, they must just know the structure of the parameter's container. Is that an acceptable limitation?

 

0 Kudos
Message 7 of 9
(4,500 Views)

I do not know what you mean by a "project ini file"?

Scott Richardson
0 Kudos
Message 8 of 9
(4,472 Views)

Hi,

 

Just use a Queue.

That will work great.

I am using that to share stuff over the hole system. Everyone may consume it...

 

Regards

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 9 of 9
(4,461 Views)