LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot get data from variant (callback VI - activeX)

I register a callback VI with an activeX module. This activex is used to communicate with another device. Whenever I send a command through this activeX to another device, there will be a respond from that device. But I cannot receive it. The data in the variant presents that the data return is an array, but I cannot get anything.
Could you please tell me how to get this data?
Thang Nguyen
0 Kudos
Message 1 of 4
(2,864 Views)
Did you try the Variant to Data function (Programming->Cluster & Variant palette)? You need to provide the type of data to convert to, which is just wiring an array constant of the right datatype.




Message Edited by smercurio_fc on 02-01-2008 12:47 PM
0 Kudos
Message 2 of 4
(2,849 Views)
Hi,
I did try with Variant to Data VI and Variant to Flattened String VI. When I use Variant to Data VI, I received this error:
The data type of the variant is not compatible with the data type wired to the type input.
I tried with type string or array of unsign integer 8-bit.
 
0 Kudos
Message 3 of 4
(2,845 Views)
Well, you have to know the type of data that's in the array. This should be documented. Otherwise, you can just keep changing the datatype until you get it.
0 Kudos
Message 4 of 4
(2,843 Views)