Check out our VI Scripting Code Repository Files and visit the LabVIEW Wiki VI Scripting article
Tags |
(This content has not been tagged yet)
|
![]() |
Sep 1 2006, 08:27 PM
Post
#1
|
|||
![]() Very Active Member Posts: 129 Joined: 29-October 04 From: Vancouver, B.C. Member No.: 932 Using LabVIEW Since:1998 LV:8.5.1 ,7.1.1 ,.
|
As far as I can see, the only property we have for selecting which cluster element is unbundled in a named unbundler is the "Element Names[]" property. But this doesn't seem to work for selecting elements out of a sub-cluster.
I've attached 2 VIs which demonstrate what I'm talking about. Open both of them and run "Test Unbundle Script.vi" - it doesn't seem to work. Anyone have ideas? Jaegen
Attached File(s)
Test_Unbundle.vi ( 12.68K )
Number of downloads: 208
Test_Unbundle_Script.vi ( 37.32K )
Number of downloads: 198-------------------- "Duck was a neutral party, so he brought the ultimatum to the cows." -- Click, Clack, Moo: Cows That Type
|
||
|
|
|||
| Ad |
Sep 1 2006, 08:27 PM
Post
#
|
||
|
|
|
||
|
|
|||
Nov 17 2006, 10:20 PM
Post
#2
|
||||
![]() Very Active Premium Member ![]() Posts: 179 Joined: 19-January 05 From: Switzerland Member No.: 1396 Using LabVIEW Since:1998 LV:8.20 ,8.0.1 ,7.1.1
|
As far as I can see, the only property we have for selecting which cluster element is unbundled in a named unbundler is the "Element Names[]" property. But this doesn't seem to work for selecting elements out of a sub-cluster. I've attached 2 VIs which demonstrate what I'm talking about. Open both of them and run "Test Unbundle Script.vi" - it doesn't seem to work. Anyone have ideas? Jaegen Hello it does Work!?! You can easy change the number of unbundle Elements and you can easy change their values (if they are maching to the "default" cluster) -------------------- ![]() Happy Wiring! (User defined "Swiss Wire Class" for neutral data only!!!)
|
|||
|
|
||||
Nov 17 2006, 11:27 PM
Post
#3
|
||||
![]() Very Active Member Posts: 129 Joined: 29-October 04 From: Vancouver, B.C. Member No.: 932 Using LabVIEW Since:1998 LV:8.5.1 ,7.1.1 ,.
|
Hmmm, maybe it only works in the German language version.
Here's what I get: (I made some minor mods to make mine look like yours) Note: I'm using LabVIEW 7.1.1 (though it doesn't seem to work in 8.2 as well) Jaegen -------------------- "Duck was a neutral party, so he brought the ultimatum to the cows." -- Click, Clack, Moo: Cows That Type
|
|||
|
|
||||
Nov 18 2006, 06:42 PM
Post
#4
|
|||
![]() Very Active Premium Member ![]() Posts: 179 Joined: 19-January 05 From: Switzerland Member No.: 1396 Using LabVIEW Since:1998 LV:8.20 ,8.0.1 ,7.1.1
|
Hmmm, maybe it only works in the German language version. Here's what I get: (I made some minor mods to make mine look like yours) Note: I'm using LabVIEW 7.1.1 (though it doesn't seem to work in 8.2 as well) Jaegen Hello It doesn't work any more since I played around with the Methode Node (Resize, Add Output, Remove Output) But I don't now why, it's strange. But I am still able to select the elements in the Main Cluster (Sub 1 and Sub 2) when I then add a second unbundler to Sub 1 or to Sub 2 I am also able to select A or B. But I can't anymor directly a "Subcluster".. -------------------- ![]() Happy Wiring! (User defined "Swiss Wire Class" for neutral data only!!!)
|
||
|
|
|||
Nov 18 2006, 09:46 PM
Post
#5
|
|||
|
Instant Human, just add coffee Premium Member ![]() Posts: 889 Joined: 31-January 03 From: Waterford, CT USA Member No.: 45 Using LabVIEW Since:1992 LV:8.2.1 ,7.1 ,8.0.1
|
Hello It doesn't work ... it's strange. But I am still able to select the elements in the Main Cluster (Sub 1 and Sub 2) when I then add a second unbundler to Sub 1 or to Sub 2 I am also able to select A or B. But I can't anymor directly a "Subcluster".. Ditto here. Sometimes I was able to get to a subcluster directly, but mostly only at the same time as resizing. After a short while it doesn't seem to work except for the main cluster elements. Oh well, at least we have some part working. I might try to add all the elements with a resize next, then selectively delete the ones I don't want to try to arrive at the final desired configuration. -------------------- ************************************************************* "Always listen to the experts, they'll tell you what can't be done, and why. Then go do it." ~The Notebooks of Lazarus Long (by Robert Heinlein) *************************************************************
|
||
|
|
|||
Nov 19 2006, 06:56 AM
Post
#6
|
|||
![]() Very Active Member Posts: 129 Joined: 29-October 04 From: Vancouver, B.C. Member No.: 932 Using LabVIEW Since:1998 LV:8.5.1 ,7.1.1 ,.
|
QUOTE Hello It doesn't work any more Shoot, there goes my theory that it actually had something to do with German vs. English, or ANSI vs. Unicode, or the like. ... I might try to add all the elements with a resize next, then selectively delete the ones I don't want to try to arrive at the final desired configuration. I thought of this, but I don't think there's a way to do this that handles everything - it has to do with the way LabVIEW handles resizes of an unbundle node in general. If you wire an unbundle by name and drag down, it automatically fills with all of the elements in the cluster, but doesn't drill down into sub clusters until you get to the end (i.e. if your last element is a sub cluster, then it starts automatically filling with the elements of that cluster - I'd love it if they changed this by the way). So, with scripting you could work out a way to get into the last sub cluster, but not any others. Are you guys sure that you actually had this working? The end result is very dependent on which values are in the unbundle before you run, and which values you're asking for. Another annoying thing is that it doesn't return an error if you ask for something that doesn't exist. Should I file a bug report for this??? Jaegen -------------------- "Duck was a neutral party, so he brought the ultimatum to the cows." -- Click, Clack, Moo: Cows That Type
|
||
|
|
|||
Nov 20 2006, 06:32 AM
Post
#7
|
|||
|
Very Active Member Posts: 85 Joined: 4-September 04 From: Canada Member No.: 658 Using LabVIEW Since:1992 LV:8.20 ,7.1.1 ,8.0.1
|
Are you guys sure that you actually had this working? The end result is very dependent on which values are in the unbundle before you run, and which values you're asking for. Another annoying thing is that it doesn't return an error if you ask for something that doesn't exist. Should I file a bug report for this??? Jaegen This is really bugging me. I'm not sure if I ever got the sample VI to work, so, not calling anyone a liar, can someone confirm that it did work consistently, at least for a while? The only way I have been able to do this reliably, is really clunky. I create a tree of unbundles to get the item I want and then I wire the final unbundle to the original cluster and delete the intermediate unbundles. Not for the faint of heart. I agree, no feedback (error) for non-existent items is a real pain. As for a bug report, I remember Jeff K. saying something about "It's ok to use scripting, just don't expect us to support it", so that's a non starter. Scripting: The final Frontier. -------------------- There are 10 kinds of people in the world; those that understand binary, and those that don't.
|
||
|
|
|||
Nov 20 2006, 08:40 AM
Post
#8
|
|||
![]() Very Active Member Posts: 129 Joined: 29-October 04 From: Vancouver, B.C. Member No.: 932 Using LabVIEW Since:1998 LV:8.5.1 ,7.1.1 ,.
|
The only way I have been able to do this reliably, is really clunky. I create a tree of unbundles to get the item I want and then I wire the final unbundle to the original cluster and delete the intermediate unbundles. Not for the faint of heart. Very clever - I'd given up on this being possible at all (not that this is really a realistic solution though). Joking about bug reports aside, perhaps we need someone with access to the "source code" to at least give some insight into this ... Jaegen -------------------- "Duck was a neutral party, so he brought the ultimatum to the cows." -- Click, Clack, Moo: Cows That Type
|
||
|
|
|||
Nov 24 2006, 11:33 AM
Post
#9
|
|||
![]() Very Active Premium Member ![]() Posts: 150 Joined: 1-November 04 From: Sydney Member No.: 941 Using LabVIEW Since:1995 LV:8.5.1 ,8.6 ,.
|
Confirming!!
It worked for me yesterday perfect. But today, it doesn't This post has been edited by MikaelH: Nov 24 2006, 11:47 AM --------------------
|
||
|
|
|||
Nov 29 2006, 11:21 AM
Post
#10
|
|||
![]() Very Active Premium Member ![]() Posts: 150 Joined: 1-November 04 From: Sydney Member No.: 941 Using LabVIEW Since:1995 LV:8.5.1 ,8.6 ,.
|
Hi scripting lovers.
Since bundle and unbundle of clusters in cluster don't work, I've had to do it in an diffrent way. (See attached project-LV8.2). The application is not nice written, it's just a proof of concept ![]() Cheers, Mikael
Attached File(s)
--------------------
|
||
|
|
|||
Nov 29 2006, 02:03 PM
Post
#11
|
|||
|
Instant Human, just add coffee Premium Member ![]() Posts: 889 Joined: 31-January 03 From: Waterford, CT USA Member No.: 45 Using LabVIEW Since:1992 LV:8.2.1 ,7.1 ,8.0.1
|
Interesting way to walk down the tree. I'm going to try this, and then disconnect the bottom most unbundle and rewire it to the top cluster and see if it maintains the low level unbundle. If so, then we can then delete the intermediate unbundles.
-------------------- ************************************************************* "Always listen to the experts, they'll tell you what can't be done, and why. Then go do it." ~The Notebooks of Lazarus Long (by Robert Heinlein) *************************************************************
|
||
|
|
|||
Nov 29 2006, 02:05 PM
Post
#12
|
|||
![]() I'm a LAVA, not a fighter. V I Engineering, Inc. ![]() Posts: 3759 Joined: 13-October 03 From: Michigan, USA Member No.: 181 Using LabVIEW Since:1993 LV:8.5 ,. ,.
My Blog
|
Since bundle and unbundle of clusters in cluster don't work, I've had to do it in an diffrent way. That's pretty neat Mike - consider the concept prooved -------------------- ![]()
|
||
|
|
|||
Nov 29 2006, 05:24 PM
Post
#13
|
|
![]() Very Active Member Posts: 129 Joined: 29-October 04 From: Vancouver, B.C. Member No.: 932 Using LabVIEW Since:1998 LV:8.5.1 ,7.1.1 ,.
|