LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Code Interface Nodes and "type for output"

My question is about "type for output" in Code Interface Nodes.

 

Is this understanding of working with Code Interface Nodes correct?

 

I'm using CINs that were inside vi's supplied with a DAQ hardware maker (not NI), and of course I have to mess with them, because the vi's are all funny with seemingly random data types and terminal assignments and names and so forth, including error code values that step on LabVIEW's error codes.

 

Each CIN has a height that depends on how many inputs and outputs there are (and is resizeable). It looks like each terminal on the left is an input, each terminal on the right is an output, and the terminals in each row are paired.

 

Sometimes the terminal on the right has a label for a data type, say I32. It may be connected to an indicator. But if I unwire the indicator from that terminal, the data type label on the terminal disappears, as if the data typing information is swimming upstream along the wire. If I put the CIN inside a case structure with the indicator outside the structure, wiring them together through the border of the structure does NOT let the information go upstream, and the wire from the CIN terminal to the inner terminal on the Case structure is broken, saying the source type is "void".

 

Wiring a constant or anything else with the right type to the CIN's input terminal to the left of this output terminal seems to fix this.

The Help system doesn't describe these terminals as left-right paired, but says you can use "type for output" in what sounds like this manner by right clicking the node and selecting Output Only from the menu. however, that isn't one of the options. There is an Input-Output option, and if I click on that it changes to Output. If I click on Output, it changes to Input-Output.

 

Experiments so far seem to show that the Input-Output and Output choice does not matter, and the output terminal on the right will have whatever data type is wired to the corresponding input terminal on the left, but if that is unwired will have whatever data type is downstream of the output terminal, but if there is nothing downstream or anything downstream is on the far side of a structure boundary it will have data type "void".

 

Is all this correct?

 

If the right click menu choice Output matches the Help system reference to OutputOnly, and if it matters, how do you tell how it is set? If you right click on a terminal and look at the popup menu, can you assume the current setting is Output if you see Input-Output, and is Input-Output if you see Output? In other words, is this menu item an offer to toggle the state to the value shown in the menu, away from its opposite?

 

Thanks!!!

0 Kudos
Message 1 of 4
(2,566 Views)
Hello cebailey,

Here is a KnowledgeBase that mentions your issue with case structures. Also, it is up to you to match the datatype when using CINs. You should look through the LabVIEW Help for this node.
Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 2 of 4
(2,524 Views)

Jon, thanks for the reply. Unfortunately I didn't get anywhere with it.

 

The KnowledgeBase link gives me the following error:

 

Network Error (dns_unresolved_hostname)

Your requested host "nicentral.natinst.com" could not be resolved by DNS. 

 

Is there another way of reaching the same content?

I know about the LabVIEW Help article on CINs. That page is what I was quoting and describing.

 

Thanks!

0 Kudos
Message 3 of 4
(2,508 Views)

cebailey,

 

 Sorry about the broken link.  I copied the wrong URL into the hyperlink.  Here is the correct link.

 

http://digital.ni.com/public.nsf/allkb/2DEA2E4D7F736D8886256C1400752F74?OpenDocument

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 4 of 4
(2,502 Views)