Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Explain type defs

I am new to Labview.  I am using the SPI sub-VI's from the SPI digital waveform library to generate a waveform.  One of the inputs to the VI is a cluster called "Bus Configuration" which contains 3 controls (2 booleans and a numeric control).  This cluster has a "type def" associated with it. 

 

I am trying to understand the concept of a "type def".  For my VI, I created a cluster with the same inputs as above plus on additional boolean control.  I then unbundle it to extract the fourth control, and re-bundle the 3 controls in the same order to input to the "Bus Configuration" input of SPI init.vi.  My VI contains the sequence SPI init.vi -> SPI send.vi -> SPI close.vi to create the desired waveform (very similar to the provided SPI example VI).  It should generate 4 waveforms, CS, MISO, MOSI, SCLK.  But when I input the re-bundled cluster into "Bus Configuration" I get an error saying there are only 3 waveforms.  If I use the "Bus Configuration" type def/cluster as a control on my front panel and leave my fourth boolean control separate, then the VI works properly. 

 

Please explain the proper use of "type def" or is there something else I am doing incorrectly.

Thank you.

0 Kudos
Message 1 of 2
(3,175 Views)

Hi hachena,

 

I think the LabVIEW help on type definitions should prove useful on explaining the proper use of them:

 

 http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/custom_cont_ind_type/

 

Also, the “Using Cluster Type Definitions and Cluster Strict Type Definitions” section has information about unbundling them using the “Unbundle By Name” function instead of the “Unbundle” function. Hope this helps.

------------------------------
Bill E. | Applications Engineer | National Instruments
0 Kudos
Message 2 of 2
(3,144 Views)