07-01-2013 03:32 PM
I am trying to create a LabVIEW program that will load another VI and pass in varient data. The data type itself does not change during execution, but the VI that is loaded I would like to be able to pass in different sets of data each time. Whenever I do this however I sometimes get an error message saying "The data type of the variant is not compatible with the data type wired to the type input." It seems like the times that I did not get the error were when the control already had the data type with actual data passed to it.
So my attempt to fix this problem was to not call the Variant to Data function the first time the VI was run and only call it after, however whenever a call was made to the SubVI and the "Setup" routine wasn't called I would still recieve this error. The only time I would not recieve the error is after the "PostRun" case it called and data is added to the array. I have attached the relevent code for both the way the subVI from the main program, and how the Varient is being handeled in the other cases. What would be a better way to handle the varient data to not generate this error?
Thanks
07-02-2013 02:42 PM
Turns out the inner while loop does not have a shift register... Issue is solved