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: 

Sequence Context vs. Parameters

Solved!
Go to solution

Hi,

 

What is the best/most efficient way of communication with a VI and why? Passing down the Sequence Context, or passing parameters directly to the VI controls?

 

Regards,

Chris

0 Kudos
Message 1 of 4
(4,713 Views)

Chris,

 

there are two situations where you might want to use the SequenceContext as parameter (and use get/set property for data exchange) over direct parameter passing:

1) You inherit code from TS 1

2) You want to exchange more than a dozen of parameters, but, for whatever unlogical reaon, you are not willing to create nice data structures (=> clusters) out of those parameters

 

That being said, passing parameters directly is superior in nearly every aspect.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(4,709 Views)

Hi Norbert, 

 

With TS 1 are you referring to a specific version of TestStand?

 

"That being said, passing parameters directly is superior in nearly every aspect."

 

Can you elaborate on this a little?

 

Regards,

Chris

0 Kudos
Message 3 of 4
(4,706 Views)
Solution
Accepted by topic author chris86

Chris,

 

yes, i refer to TS version 1 as in that version, it was the only way to pass parameters to LV code modules (i think in TS 2 as well, but i am not sure which version brought the "generic parameter passing").

Well, what should i elaborate? Direct parameters are faster, more secure, improve modularization and debugging (you can test your VI outside TS, no?) and create much better readable code. There are for sure additional things i forgot about.....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 4
(4,704 Views)