vugie Posted February 16, 2008 Report Share Posted February 16, 2008 First of all I would like to welcome everybody at LAVA forum. I'm reading it from time to time since my LV beginnings. Although I was not active at all, each time I had a problem, or wanted to learn something new, I was able to find the answer somewhere here. Thank you guys. Now to the point. I'm using my national LV community portal and my experience is that due to graphical nature of VI's code very often it is quite hard or at least inconvenient to describe a problem, help to solve one or share an idea. One way is to publish VI itself. But not everybody uses same LV version, VI is often dependent on number of subVI's, type definitions or libraries, downloading and opening VI takes time, particularly if one is doing something else at the same time. Another way is publishing a screenshots. But in this case you have to use a graphical editor to arrange subcases (with some trouble if you have nested conditions), crop the picture, etc. Diagram may be larger than screen causing additional problems, and large pictures posted at some forums may destroy layout (which is not a case here AFAIK). I know that there is a Code Capture Tool - frontly speaking I did not try it yet, but for sure in does not solve all these problems. So this is a background for my idea mentioned in the title - interactive VI preview. A preview which would allow user to switch between front panel and diagram view, to swich between subdiagrams within a Case Structure, Diagram Disable structure or Stacked Sequence independently on nesting level, which would allow to zoom and pan the view, see descriptions of elements and allow to enter the subVI and browse it the same way. Natural way to realize such idea is to alayze the VI (using dark and legendary method called scripting ) and to generate result as dynamic HTML or Flash animation. I decided to use Flash as it is mor compact and easier to embend (forums often support it) and here is the first result: http://vugie.republika.pl/mult/mult.html (sorry for the icons - it took me 2 mins to make them...) I hope that browsing this example is natural: you can drag diagram with mouse, switch cases using arrows, zoom with magnifying glass. Additionaly tips with name and some text appears when cursor is over an element. Of course this animation was generated automaticly with a preliminary version of tool I called VIpreVIEW. This is very early stage of development and is not advancing very fast as I do it in my spare time (which I do not have to much). So I decided to share this idea with you, just not to loose the motivation . If anybody is interested, I serve with details. Quote Link to comment
Ton Plomp Posted February 16, 2008 Report Share Posted February 16, 2008 QUOTE(vugie @ Feb 15 2008, 03:48 PM) So I decided to share this idea with you, just not to loose the motivation . If anybody is interested, I serve with details. Wohoayuhasyadf, drewl drewl :thumbup: :thumbup: :thumbup: :thumbup: :thumbup: :thumbup: Very nice, (did I tell I am bazzled?) Please share! Ton Quote Link to comment
LAVA 1.0 Content Posted February 16, 2008 Report Share Posted February 16, 2008 QUOTE(tcplomp @ Feb 15 2008, 04:26 PM) Wohoayuhasyadf, drewl drewl Very nice, (did I tell I am bazzled?) Please share! Ton Very very nice it's probably caled "FlashVIEW"?? I can't say more... Quote Link to comment
Daklu Posted February 16, 2008 Report Share Posted February 16, 2008 Very, VERY cool. Keep it up! I'm sure you meant the name to be said as, "VI preview." At first glance I read it as "Viper View," with viper being spelled as vipre. (For non-native english speakers, a viper is a general term for a snake.) Quote Link to comment
PJM_labview Posted February 16, 2008 Report Share Posted February 16, 2008 QUOTE(tcplomp @ Feb 15 2008, 07:26 AM) Wohoayuhasyadf, drewl drewl :thumbup: :thumbup: :thumbup: :thumbup: :thumbup: :thumbup: Very nice, (did I tell I am bazzled?) Please share! Ton I agree with Ton, you did a very nice job. :thumbup: Please do give us the details. PJM Quote Link to comment
Aristos Queue Posted February 16, 2008 Report Share Posted February 16, 2008 QUOTE(vugie @ Feb 15 2008, 08:48 AM) If anybody is interested, I serve with details. HECK YES I'M INTERESTED! This is something I've toyed with for years, but if you've got VIs that actually make this work, that would be spectacularly cool. Are you planning on posting the VIs? Quote Link to comment
vugie Posted February 16, 2008 Author Report Share Posted February 16, 2008 QUOTE(Aristos Queue @ Feb 15 2008, 07:48 PM) Are you planning on posting the VIs? Definitely yes, but not now - this is probably most ugly looking code I wrote ever... You know - patches for patches for patches... Anyway it works. It requires rewriting at least to let me understand my code <img src="http://lavag.org/old_files/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br />But I can describe the scheme. First stage is diagram analysis. I'm taking a shot of whole the diagram and then parsing it recursively (which is one of reasons why the code looks like this) classifying all nodes to switchable ones, subVIs, functions and terminals. For each of these I store bounds, label and description in tree-like structure. For each switchable node I switch between nodes taking a shot of each and parsing them recursively same way. Then it is needed to parse the front panel (it would be good to switch between tabs if any). It is not implemented yet - in example I just glued the image of panel manually in the middle of the process <img src="http://lavag.org/old_files/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br />Then all pictures are being saved to PNG files. At this stage user shoud decite what he want to show - which subVI to include, determine size of an animation, whether to show tips and what to put there, etc. Probably only initially selected part of code should be processed. All this stuff is not implemented yet. For generating SWF files I use Swftools (<a href="http://www.swftools.org/" target="_blank">http://www.swftools.org/</a>). As the name says it is a set of tools for dealing with SWF files <img src="http://lavag.org/old_files/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />. One of these tools is a compiler for text based flash generation scripts (see the examples on the webpage). I created a set of sth like script templates for various object types (including some ActionScript also) and traverse the diagram tree replacing keywords in these templates with picture names, labels, etc. and glueing pieces together in order to create one big script file which may be compiled by calling external program. This is probably not very elegant and efficient solution and I treat it as a proof of concept. I would like rather to directly generate flash file using i.e. Ming library (<a href="http://www.libming.net/" target="_blank">http://www.libming.net/</a>). But Swftools were easy too learn - it is my first experience with Flash. Learning and creating wrappers for Ming will be quite big task - collegue of mine already started to work on this. Another advantage of Ming is that it uses less resrictive LGPL licence (Swftools is GPL). So forget about BSD, but I think it should be enough for such a tool.<br />So as you see lot of work is to be done... Quote Link to comment
crelf Posted February 17, 2008 Report Share Posted February 17, 2008 QUOTE(vugie @ Feb 15 2008, 05:50 PM) Definitely yes, but not now - this is probably most ugly looking code I wrote ever... You know - patches for patches for patches... Anyway it works. It requires rewriting at least to let me understand my code Once you've cleaned it up a little, I'm sure it will be really welcomed here. If you'd like to eventually submit it to the LAVA Code Repository, (and based on the enthusiasm already shown on this thread), I figure there'll be at least a few talented people that would love to help you out. Quote Link to comment
Yair Posted February 17, 2008 Report Share Posted February 17, 2008 This is certainly very impressive and could be immensely useful in sharing code online. Thank you. One thing that is important to note is that for this to be usable by wide audiences it will have to have a one-click usability. For the CCT we went to some effort to make it very easy both to install and to use. Ideally, when a user generates something like this, they should end up with an easy way of building a path to embed this as a Flash object. Quote Link to comment
vugie Posted February 26, 2008 Author Report Share Posted February 26, 2008 QUOTE(crelf @ Feb 16 2008, 03:59 PM) Once you've cleaned it up a little, I'm sure it will be really welcomed http://forums.lavag.org/Code-Repository-In-Development-f83.html' target="_blank">here. OK. As you suggest I contionue this topic here. I also invite you here, where I showed another tool of mine. Quote Link to comment
Rolf Kalbermatter Posted February 27, 2008 Report Share Posted February 27, 2008 QUOTE(vugie @ Feb 15 2008, 09:48 AM) So I decided to share this idea with you, just not to loose the motivation . If anybody is interested, I serve with details. Very nice tool. Looks really good, and I'm sure NI is looking with big interest at this . Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.