I have a collection of VIs that I want to execute from Python, so I'm accessing LabVIEW through ActiveX. Generally everything works fine, but there's a thing that puzzles me. The outcome of the VIs seems to vary with how I set the input parameters and also if the VI is pre-opened (manually) or not (where not is desired).
One VI gives the expected result if run like this:
....
inputParams = ["param1"]
inputValues = [value1]
viReference.Call(inputParams, inputValues)
...
Another VI works fine like this:
...
viReference.SetControlValue("param2", value2)
viReference.Call()
...
And a third VI needs this odd setup to work as expected:
...
viReference.SetControlValue("param3", value3)
viReference.Call(["param3"], [value3])
....
I have probably made mistakes elsewhere in the code, but I wonder if there's a "rule-of-thumb" how to pass values to a VI? When to use SetControlValue and when to use Call with arguments?
Thanks,
Ola