LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clusters and shift registers

Are you using strict Type Defs for your clusters? It makes life much easier if you are not I would highly recommend it.

Tim
GHSP
0 Kudos
Message 11 of 23
(1,015 Views)

Can you provide an example? I have been looking for strict typedefs but cant find any

I may not be perfect, but I'm all I got!
0 Kudos
Message 12 of 23
(1,013 Views)

@VeeJay wrote:

Can you provide an example? I have been looking for strict typedefs but cant find any


Something like this. If you do this then if you need to add something to your cluster then it updates it where ever you have used it in the past. This way you do not have to go and find each one and replace it.

 

All you have to do is right click and open type def. Make changes and apply. Awsome!!!

Tim
GHSP
0 Kudos
Message 13 of 23
(1,009 Views)

Can you attach to Earlier version of LabVIEW like LabVIEW 9.0?

I may not be perfect, but I'm all I got!
0 Kudos
Message 14 of 23
(1,004 Views)

Here you go

Tim
GHSP
0 Kudos
Message 15 of 23
(1,002 Views)

If I get my understanding correct, a strict typedef will help me when passing the cluster from main to a subvi that is nested way inside. So, you mean by changing the saved typedef, I do not go into each subvi front panel to change the control or indicator. Is this correct?

I may not be perfect, but I'm all I got!
0 Kudos
Message 16 of 23
(992 Views)

Correct.  The only thing you might have to do is have a resave of a subVI because it changed, but you don't have to go and manually change the controls/indicators/constants in each subVI to match.

 

By the way, it does not have to be a strict typedef.  A regular typedef works fine.  A strict typedef defines the appearance of the control as well as the datatypes.  A regular typedef only defines the datatypes which is generally all you need when working with complicated data structures such as clusters.

0 Kudos
Message 17 of 23
(988 Views)

Can this typedef be used? Create one typedef like the one I have attached and use it for various channels of the daq both analog and digital, input and output. Would this make sense?

 

For example, the typedef I have attached; can I use it for 5 digital lines? The reason I am asking this is because daqmx write is inside a subvi and the task and error controls (inputs) and indicators(outputs) are combined as a cluster and attached to the pane.

I may not be perfect, but I'm all I got!
0 Kudos
Message 18 of 23
(982 Views)

Thanks Ravens Fan!! I get the concept now.

I may not be perfect, but I'm all I got!
0 Kudos
Message 19 of 23
(981 Views)

@VeeJay wrote:

Can this typedef be used? Create one typedef like the one I have attached and use it for various channels of the daq both analog and digital, input and output. Would this make sense?

 

For example, the typedef I have attached; can I use it for 5 digital lines? The reason I am asking this is because daqmx write is inside a subvi and the task and error controls (inputs) and indicators(outputs) are combined as a cluster and attached to the pane.


Generally there is no reason to place error clusters in a cluster. Error In/Error Out are generally a dedicated connector on the connector pane. You can use your typedef you defined to specify a single channel. When you say you want to define 5 channels than you will either need an array of the clusters or modify the cluster to have an element for each channel. Without seeing more of your code or how you intend to pass the data I can't really recommend which option. All we know so far is that you have you main VI and subVIs and will be passing data. However you have not clarified if the subVI needs the data for all your channals or if it is dealing with a single channal at a time. Answers to these questions would drive how the cluster should be defined and what elements are needed.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 20 of 23
(977 Views)