PDA

View Full Version : Posting LabView Code Easily?


Greg Marra
08-12-2008, 03:10 PM
Is there an easy way to share code diagrams that doesn't involve attaching the VI? A VI requires software and it takes more time than I usually want to spend to launch LabView and look at someone's code.

Is there an easy way in LabView to capture an image of the current VI without having to crop it in Paint or Photoshop?

Is there a good way in vBulletin to share images other than just attaching them to posts? That works, but it's definitely harder than pasting some code in a code tag block.

This is going to be important with so many teams programming in LabView. Can we come up with some easy solutions for a Sticky thread?

whitetiger0990
08-12-2008, 06:32 PM
Yup!


Go to file File
Hit "Print..."
Hit "Next"
Select "Icon, description, panel and diagram"
Hit "Next "
Select "HTML File"
Hit "Next"
Hit "Save..."
Select a directory, this will create an html file and 3 images. Those images are what you want. =)


See example of what you get below.

*edits* Oh yeah, about sharing them out of attaching.. probably not. Unless you host them elsewhere and use image tags. But I think that's a bit harder than just attaching. Unless someone else has a better idea for that.

whytheheckme
08-13-2008, 01:20 PM
One thing to think about *attention Brandon*... With all of these labview images going up.... server space?

Imagine if you took every code segment ever posted on CD and replaced it with a good 500k-1MB image... Perhaps there is some kind of vBulletin plugin that can be installed to allow image uploads of this type to be stored on a DIFFERENT server, as to not clog up the main CD server.

Also, I did a search already, it would be nice to upload your .vi file, and have the forum convert it to an image on-the-fly. This way, it would render the image file for when you need to view it, but it isn't being permanently stored. No such thing exists (as far as I can find), but maybe we have a few vBulletin coders?

Jacob

Joe Ross
08-13-2008, 02:50 PM
Unfortunately, several labview structures can't be flattened to a picture easily, like case statements. Any solution would have to make the vi available.

The printing to html does make separate images for each item in the case statement. However, by the time you look at several images, you might as well just open the vi.

Greg Marra
08-13-2008, 03:40 PM
The printing to html does make separate images for each item in the case statement. However, by the time you look at several images, you might as well just open the vi.

I strongly disagree. Most computers can view jpegs but many fewer can view VIs. Opening a vi requires expensive, hard to set up software. Some sort of animated image format would be vastly superior and even a series of flat images are still viewable on mobile devices (like the one I am writing this post on).

I think a combination of the pictures and the vi makes of easiest for someone else to help you.

Nate Smith
08-13-2008, 04:18 PM
While I can't help with converting it automatically when you upload the file(can't find any command line tools that can do that so far, if anyone knows of one, let me know...), I can help with server space...I'm working on a few other things as well, and I'll add this to the "to do" list...more info to come...

Brandon Martus
08-13-2008, 04:28 PM
One thing to think about *attention Brandon*... With all of these labview images going up.... server space?

We've got more space than we know what to do with ... space isn't an issue.

Greg McKaskle
08-13-2008, 09:06 PM
I'm not entirely sure if it is needed, but if someone responsible for the forum is interested in a tool to serve up images, that wouldn't be too hard as long as you can run LV on the server machine and plug it into a CGI. Get in touch.

Greg McKaskle

kamocat
08-14-2008, 01:01 AM
What d'you know, someone already mentioned this at NI communities (I didn't know until just now).

http://decibel.ni.com/content/message/1721#1721

Greg McKaskle
08-14-2008, 07:17 AM
I guess I've been on the receiving end of way too many movies watching someone write a diagram trying to demonstrate a bug. True, it has its uses, but most times, I ended up panning to the end, looking at a super grainy frame, and spotting the problem. So, the time to make the movie, time and space of the movie downloads, and time I spend watching their movie so I can make their diagram on my machine for experimenting, are all time I wish I had back.

But, the forty-seven second demo watching someone type into a text field almost convinced me I was wrong.

In other words, simplifying a VI to show the problem so that you can post a good succinct stand alone snippet of code that others can run, modify, learn from, and send back in an improved form, is my preferred way of discussing LV or C code. Screenshots are a good way to identify areas within the code and are sometimes enough. A movie has potential, but most of us don't have enough Spielberg in us to pull it off.

Greg McKaskle

whytheheckme
08-14-2008, 01:24 PM
What d'you know, someone already mentioned this at NI communities (I didn't know until just now).

http://decibel.ni.com/content/message/1721#1721

I really like this software. I just downloaded it, and installed it, and used it. It's beautiful and serves the purpose.

Thanks!

-Jacob

kamocat
11-25-2009, 11:32 AM
Revisiting this thread...

Is anyone excited to be able to use the LV 2009 Snippet feature in FRC 2011?

Jeff Pahl
11-25-2009, 11:58 AM
Is anyone excited to be able to use the LV 2009 Snippet feature in FRC 2011?

I would be, but in the Senior Mentor Conf Call last week, they said we are getting LV 8.6, not LV 2009 :(

I'm hoping they were wrong....

Joe Ross
11-25-2009, 12:03 PM
I would be, but in the Senior Mentor Conf Call last week, they said we are getting LV 8.6, not LV 2009 :(

I'm hoping they were wrong....

That's why he said 2011, not 2010...

Here's more info on the snippets (http://zone.ni.com/devzone/cda/tut/p/id/9330)

Alan Anderson
11-25-2009, 12:08 PM
Is anyone excited to be able to use the LV 2009 Snippet feature in FRC 2011?

Ask again in a year or so? LabVIEW for FRC 2010 is basically LV 8.6, so far as we know.

Jeff Pahl
11-25-2009, 12:12 PM
That's why he said 2011, not 2010...

I'm hoping by 2011 they will have moved us to LV 2010, which will be released at NI Week 2010, sometime around August 2010. NI has announced they are moving to a yearly major release schedule, tied to NI Week. At least that's what they stood up and said in front of a couple hundred of us at the NI Symposium I recently attended...

It would be nice to be working with the current version we are using in industry, instead of trying to remember which things you are used to that you can't do in the FRC version :(

And yes, I did have a mental lapse on the dates for next year... after 3 days of staring at the spreadsheet I'm working on, all numbers are starting to look the same :)

keehun
11-25-2009, 01:26 PM
Is LabView format proprietary? Is it legally off-bounds to implement an open source reader?

With the intellectuality of FIRST, I think it would be an awesome community project. Implement a LabView viewer with web technologies...

Joe Ross
11-25-2009, 03:49 PM
I'm hoping by 2011 they will have moved us to LV 2010, which will be released at NI Week 2010, sometime around August 2010. NI has announced they are moving to a yearly major release schedule, tied to NI Week. At least that's what they stood up and said in front of a couple hundred of us at the NI Symposium I recently attended...

It would be nice to be working with the current version we are using in industry, instead of trying to remember which things you are used to that you can't do in the FRC version :(

I saw somewhere that they started prepping for the 2010 season months before LV 2009 was released. Maybe in the future they can improve the time of the development cycle.

What we with FIRST get is much newer then I get at work.