LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cannot connect VISA constant to input of VI

Getting the following error:

 

These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is VISA session of class.
The type of the sink is VISA session of class.

 

Trying to connect a COM port VISA constant to a serial VI. This used to work and works for many other similar VIs.

 

Thanks,

 

Bob

 

0 Kudos
Message 1 of 5
(2,668 Views)

Either the subVI or the parent VI has a VISA reference control/constant that is set to a more specific I/O session class. Normally when you place a VISA resource control on the front panel or contant on the block diagram the I/O session class is set to the generic "Instr" class. You, or someone else, changed it on either the source and/or sink to be of a more specific class. Hence the broken wire. You set the class by right-clicking on the control/constant and selecting the Select VISA Class -> I/O Session menu item. Unless you have a good reason to do so, you should leave it as Instr.

 

When to restrict the class? One example would be if you want to make absolutely sure that nobody ever tries to communicate with a device with any other interface than the one you specify. Can't think of an example of when this would be the case, though.

Message 2 of 5
(2,655 Views)

Both are set to Instr. Like I mentioned, this used to work and works for several other sub VIs within the same main VI.

 

Bob

 

0 Kudos
Message 3 of 5
(2,650 Views)

Please post your VIs.

Message 4 of 5
(2,648 Views)

I got around the problem by going back to LV 8.5. If I get time I will try to simplify the problem VIs and if the problem dowesn't go away I will post those.

 

Thanks,

 

Bob

 

0 Kudos
Message 5 of 5
(2,619 Views)