04-09-2012 04:26 PM
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.
04-10-2012 05:51 PM
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.