10-24-2014 01:18 AM
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
Solved! Go to Solution.
10-24-2014 02:04 AM
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
10-24-2014 02:07 AM
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
10-24-2014 02:12 AM
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