Tags |
(This content has not been tagged yet)
|
![]() |
Oct 7 2004, 08:31 PM
Post
#1
|
|||
|
Very Active Member Posts: 236 Joined: 16-April 04 Member No.: 360 Using LabVIEW Since:2006 LV:8.5 ,. ,.
|
I use case-selectors with a strict-typed enum Mode control to leverage subVI functionality. For some VI's that get called a lot (such as an LV2 global), there may be many many instances of the VI. Currently, there are two ways to find a specific function call that uses the VI and a moding constant:
The short of it: It would be nice to have a method to search not only for an instance of an enum constant, but for the instance of a particular value of an enum... like being able to select the object in the Find box and then also being able to get a dropdown list of values to select from (or an all encompassing "All Values", similiar to property nodes.)
|
||
|
|
|||
| Ad |
Oct 7 2004, 08:31 PM
Post
#
|
||
|
|
|
||
|
|
|||
Jun 20 2005, 10:25 AM
Post
#2
|
|||
|
Very Active Member Posts: 236 Joined: 16-April 04 Member No.: 360 Using LabVIEW Since:2006 LV:8.5 ,. ,.
|
I wanted to add a note to this particular post because somewhere along the way I discovered that even though you can't look for a particular instance of enum, you can manually type in the text and LabVIEW will find that text for the instantiated enum--meaning you can find all text that is identical and then pick the items off the "found" list that are actually enums.
While it would still be nice to have selective search capabilities, it works for now doing a text search.
|
||
|
|
|||
Jun 24 2005, 04:05 AM
Post
#3
|
|||
|
Changing the world, one VI at a time. JKI ![]() Posts: 1692 Joined: 22-October 02 From: San Francisco, CA Member No.: 17 Using LabVIEW Since:1995 LV:8.2.1 ,8.5 ,7.1.1
My Blog
My Gallery
|
QUOTE (m3nth @ Oct 7 2004, 12:31 PM) I use case-selectors with a strict-typed enum Mode control to leverage subVI functionality. For some VI's that get called a lot (such as an LV2 global), there may be many many instances of the VI. Currently, there are two ways to find a specific function call that uses the VI and a moding constant:
The short of it: It would be nice to have a method to search not only for an instance of an enum constant, but for the instance of a particular value of an enum... like being able to select the object in the Find box and then also being able to get a dropdown list of values to select from (or an all encompassing "All Values", similiar to property nodes.) I have debugged code written by others that used "naked" functional LV2 globals (not placed inside wrapper VIs to hide the call mode selection and input/output routing). I find it a real pain, as you have described, to search for all instances using a particular call mode, in addition to reverse engineer which inputs and outputs are associated with each call mode. Here is the solution: for each calling mode, create a wrapper VI. It is then very easy to search for the wrapper VI instances. Also, users of your functional LV2 global will always know which inputs and outputs are relevant to a specific call mode. The collection of wrappers can be thought of as the API of your component. --------------------
|
||
|
|
|||
Jun 24 2005, 09:55 AM
Post
#4
|
|||
|
Very Active Member Posts: 236 Joined: 16-April 04 Member No.: 360 Using LabVIEW Since:2006 LV:8.5 ,. ,.
|
That's an excellent idea Jim--well thought out and something I hadn't considered. I would still like to be able to search by enum instance of course
The only concern I might have with making wrappers is trying to remember when exactly LabVIEW makes copies of data. If I had a large amount of data (big array or something) I was passing out of the LV2 global, would there be another copy made because it gets passed out of the wrapper also? Or just one copy made? Either way, having LV2 wrappers for each function sounds like a great idea.
|
||
|
|
|||
Jun 27 2005, 08:00 AM
Post
#5
|
|||
|
<customize this text> Premium Member ![]() Posts: 1001 Joined: 9-April 04 From: Rotterdam Member No.: 349 Using LabVIEW Since:1992 LV:8.5.1 ,8.2.1 ,7.1.1
|
QUOTE (m3nth @ Jun 24 2005, 04:55 AM) That's an excellent idea Jim--well thought out and something I hadn't considered. I would still like to be able to search by enum instance of course The only concern I might have with making wrappers is trying to remember when exactly LabVIEW makes copies of data. If I had a large amount of data (big array or something) I was passing out of the LV2 global, would there be another copy made because it gets passed out of the wrapper also? Or just one copy made? Either way, having LV2 wrappers for each function sounds like a great idea. Early versions of LabVIEW can make copies of data where it isn't necessary. But at least since 5.x it does not generate data copies when merely passing out a variable from a subVI to its caller. This does of course require a few clarifications: If your frontpanel is open, then LabVIEW will create a copy of the data for the internal data buffer of each control. This is logical as the control needs to maintain its own copy to be able to (re)display the data as needed. In LabVIEW 5.0 and 5.01 (and probably 6.0) where some issues where passing out arrays stored in shift registers could either create unnecessary copies or much worse under certain circumstances: reuse data from earlier loop iterations which resulted in wrong behaviour. This is however not a problem which would appear in a wrapper VI but in the actual LV2 style global itself, so creating a wrapper had no influence on this nor a worse performance. In current versions of LabVIEW passing in large arrays into subVIs to be worked on in there (and preferably through shift registers in the subVI if a loop is present) and then passing them out of the subVI again to the caller does not create data copies at all, unless absolutely unavoidable because of the data manipulation inside the subVI. So this architecture is much more performant than simply branching of from the array to be passed to a subVI for operation on that array. This is since branching a wire to be passed to a subVI will have to create a copy of the data, while by simply passing it though the subVI where no branches of the wire occur can completely reuse the original buffer. Rolf Kalbermatter
|
||
|
|
|||
![]() ![]() |
| Time is now: 22nd November 2008 - 02:22 AM |