06-16-2011 11:59 AM
Are you using strict Type Defs for your clusters? It makes life much easier if you are not I would highly recommend it.
06-16-2011 12:01 PM
Can you provide an example? I have been looking for strict typedefs but cant find any
06-16-2011 12:07 PM
@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!!!
06-16-2011 12:13 PM
Can you attach to Earlier version of LabVIEW like LabVIEW 9.0?
06-16-2011 12:18 PM
Here you go
06-16-2011 03:21 PM
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?
06-16-2011 03:42 PM
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.
06-16-2011 04:05 PM
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.
06-16-2011 04:06 PM
Thanks Ravens Fan!! I get the concept now.
06-16-2011 04:26 PM
@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.