LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI of the Day (9/18/2009) - Code Snippets

Can anybody tell me what is new and different about this code snippet (other than the ugly picture which I just threw together)?

 

NewSnippet.png

0 Kudos
Message 11 of 34
(1,758 Views)

First think I noticed was that the frame and the text label weren't part of the snippet.  So I tried to see if that was something about the snippet program causing that.

 

That's when I realized (based on what got dropped back when I tried to duplicate it) that you don't have the refnum control issue when working with property nodes that has been pointed out a few times in the forums.

0 Kudos
Message 12 of 34
(1,742 Views)

Ravens Fan wrote:

 

That's when I realized (based on what got dropped back when I tried to duplicate it) that you don't have the refnum control issue when working with property nodes that has been pointed out a few times in the forums.


 

 

We have a winner.  What I snip is what you get.  A complete hack this time to prove the principle, a few UI improvements and I'll share the code for those interested.  I'll also have a better image than quickly throwing a frame and label around the code.  I thought there would be more frames available for BD decorations.

 

Next trick:  Snippets for LV8.6, maybe this weekend.  Still a few hacks to go there.

 

 

Message 13 of 34
(1,736 Views)

Darin,

are you saying you have a working prototype to programatically create VI snippets?

If so I would be very interested to add this functionality into the Code Capture Tool, see a recent discussion in this thread.

 

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!
0 Kudos
Message 14 of 34
(1,710 Views)

I have a real simple question: How is a code snippet a VI (it's already been established it isn't), and how does it fall in the "VI/Primitive of the Day" category?

 

Or, do you just like to talk about them? Smiley Very Happy

0 Kudos
Message 15 of 34
(1,711 Views)

First and foremost, I do like talking about them, primarily since I was anxious to use them as a vehicle for sharing code/examples in these threads.   Second of all, how has it been established that it isn't a VI?  I now happen to think that they are and as evidence I will use my previous example.

 

Ton, I do have a working prototype that let's me generate code snippets (I may call them fragments instead since what you snip is what you get).  I'll try to assemble the various pieces into a single functioning piece before I leave for vacation.  It does require LV scripting. 

 

 

0 Kudos
Message 16 of 34
(1,701 Views)

Darin.K wrote:


Next trick:  Snippets for LV8.6, maybe this weekend.


I believe Rolf has you beat there. I know he's been working on it (although personally I don't see the benefit) and I noticed this image he posted a while back.

 

GetAccelerometerData.PNG

 

 

I haven't tried merging it in 8.6, but I assume it works.


___________________
Try to take over the world!
Message 17 of 34
(1,682 Views)

tst wrote:

Darin.K wrote:


Next trick:  Snippets for LV8.6, maybe this weekend.


I believe Rolf has you beat there. I know he's been working on it (although personally I don't see the benefit) and I noticed this image he posted a while back.

 

I haven't tried merging it in 8.6, but I assume it works.


Thanks for the image, very suggestive.  If Rolf is working on it I am sure it is done well.  Do you have the link to that thread, I have missed it.  I would like to see how he handles the dropping of the BD aspect.  My current method is a little clumsy and involves running a helper VI.  My primary motivation in adding an 8.6 version is that I can embed multiple versions in a single snippet and the proper one can be extracted based on LV version.  This way, when I use snippets to post a short example it isn't limited to people with LV 9.  It all works for me at this point, but the user interface for 8.6 is a stumbling block.

 

0 Kudos
Message 18 of 34
(1,675 Views)

Sorry, no link. I assume it was at least three weeks ago, but that's all I can say. Short of that, all I can suggest is that you ask him.

 

As I said, I didn't try merging it in 8.6, but I believe it did work in 9.0, so it's possible he only got the creation part working in 8.6. I suggest you try it in 8.6 to make sure.


___________________
Try to take over the world!
0 Kudos
Message 19 of 34
(1,670 Views)

tst wrote:

Sorry, no link. I assume it was at least three weeks ago, but that's all I can say. Short of that, all I can suggest is that you ask him.

 

As I said, I didn't try merging it in 8.6, but I believe it did work in 9.0, so it's possible he only got the creation part working in 8.6. I suggest you try it in 8.6 to make sure.


 

 

 

It does not appear to work natively by dropping it into LV 8.6.1

0 Kudos
Message 20 of 34
(1,660 Views)