LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Variant Indicator when VI are called from external process

I m using LabVIEW 6.0.2 and Delphi 6 under Win2K. I'm calling a LabVIEW .VI file through Delphi and that VI has 1 input and 1 Output both of type variant on the front panel. My problem is that when the VI finish the return Variant (that is an indicator on the front panel) is always unassigned. If I put any other type of data (an array of strings for exemple) has the return value I can re-read it from Delphi. But if the output is specified to be a variant it will come out unassigned. In my Delphi code I set the parameters needed for the VirtualInstrument.Call function. It need 2 variants one containing an array of string with the controls/indicator names and the other one with a variant arr
ay containing the controls/indicator value. For the inputs everything works OK. But if my output is a variant it's value never changes when the VI returns. I have include an example code that show that behavior. Just unzip everything in the c:\temp directory and run the executable it will show you a VI that works and one that doesn't. I know that in this example I put an array of string in the variant and I could pass this directly, but my goals is that the user could pass anything in tha tvariant.
0 Kudos
Message 1 of 2
(2,574 Views)
Maybe I am mistaken but from my experience for transferring data with ActiveX calls (VBS), you can use numerics and strings and arrays and clusters of numerics and strings that LabVIEW will convert to an ActiveX variant to return to the caller. However, the variant type works for inputs but not for outputs. That is strange enough, LabVIEW won't convert a LabVIEW variant to an ActiveX variant to return values on call.


LabVIEW, C'est LabVIEW

0 Kudos
Message 2 of 2
(2,574 Views)