LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you recommend a bettery way to unbundle this cluster?


Broken Arrow wrote:

Mathan wrote:

Broken Arrow wrote:

I like Darren's solution (kudos Smiley Happy)


Oh Darin is none other than Darren ?

Message Edited by Mathan on 11-16-2009 01:08 PM

Ooops. Smiley Surprised Sorry 'bout that Darin.


No worries, I am sure the phrase 'I like Darren's solution' is an instinctive response on this forum....

0 Kudos
Message 11 of 15
(709 Views)

One thing to realize when you use typecast is that you know what you are doing.

 

So do you?

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 12 of 15
(679 Views)

TCPlomp wrote:

One thing to realize when you use typecast is that you know what you are doing.

 

So do you?

 

Ton


Good point!

 

I once mixed up my cluster types and type cast the wrong type. Years latter (that is computer years about 90 seconds really) I dequeue the data pass it to a TDMS write to file (and suprisingly still worked up to this point) after that data was written and LV was trying to release the buffer holding the data, LV crashes telling me the wrong type of data was being dereferenced.

 

So all bets are off when doing a type cast and don't expect LV to save your behind. So type cast with caution.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 15
(649 Views)

TCPlomp wrote:

One thing to realize when you use typecast is that you know what you are doing.

 

So do you?

 

Ton


 

The OP said he's using the cluster of custers idea, so he's not typecasting. Who are you talking to? I'm sure Darin knows what he's doing.
Richard






Message 14 of 15
(643 Views)

The controls within a cluster is ordered in Tab Order (correct me if i'm wrong) and this can be used as follows:

 

Use the Controls[] Property to get a list of all controls in the cluster, cut/build/select a subarray of your doubles, use a simple for loop to get the value property of each element and convert them to double and build a double array as output.

 

This picture assumes you have 15 doubles first and then your booleans.

 

If they're ordered more randomly you can use the Set Tab Order feature to make things easier on yourself.

 

/Y

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 15 of 15
(641 Views)