Jump to content

jgcode

LabVIEW Tools Network
  • Posts

    2,397
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by jgcode

  1. None of the reentrant VIs maintain state so I'm going to try to switch to shared reentrancy and see if there are any improvements. But I was wondering, does shared reentrancy create a "pool" of instances where it only opens up as many as are needed for parallel execution at one point in time or does an instance get allocated every time the VI is executed.

    Hi bbean

    Preallocated Re-entrant VIs will maintain their state not Shared Re-entrant VIs. I.e. for each Preallocated re-entrant VI you place on the block diagram, each will have it's own state.

    If you want to share the state of a VI in multiple locations on the BD then it cannot be re-entrant and you will end up with a Functional Global VI (FGV) type VI.

    I am pretty sure you are right for your description of shared instances - a pool is maintained and as the need arises LabVIEW manages the pool and distributes from the pool meaning that VIs cannot maintain their state. This leads to less overhead - not every instance has to be in memory at the one time, but you will experience some jitter e.g. which may be important when used on Real Time systems.

  2. A while ago I was told that there is a VI that accomplishes this that we can use in vi.lib.

    I can't find the information that directed me towards it, but hold out and someone should be able to direct us to it.

    That sounds very cool

    So far I could only find this link which says it cannot be done. Maybe they are hiding it! :ph34r:

  3. I only noticed this when tinkering with the Endevo toolkit. I thought it was nice and wondered if there was an easy way to do it.

    Thats the only place I have seen it.

    I don't know if it's easy or not to do.

    Maybe its as simple as that data being located in the .lvclass file?

  4. For a few seconds I couldn't figure out if you were an Aussie or a South African!

    (am from SA myself...)

    I like to keep people guessing :ph34r:

    Nice video. On a tangent, any idea how to change the colour of a class cube in the lvproj tree?

    Thanks.

    What are you trying to achieve?

    Matching the color of the class to the class icon in the project??

    Endevo do it. As far as I know them and JKI are the only companies to have binary project integration (or whatever its called) for their products so I am guessing it is done through this??

    I guess someone at NI or maybe Endevo could answer this one.

  5. I have a section of my code that I want to make into a sub vi, this sub vi would always be inside a loop and needs to use the index of the loop it's called from. I was wondering what the best paradigm would be to implement this. Is it as simple as making a terminal which takes the index or is there a better way of doing it?

    That sounds fine

    Edit: For context and also because it leads me to another question. I'm trying to write a VI to raster a window through an image calculating the contrast in each section of the image. My image data currently exists as a 1D array so I've written my VI with this in mind, i.e. each time I shift the window I have to build the Region Of Interest (raster window) from the 1D data. I was wondering whether it would be smarter to cut the original 1D image data into rows, build a 2D array, and then raster a 2D sub window over the data?

    I guess the questions I would ask here would be:

    Is the window a moving window - or does each window contains mutually exclusive points from the 1D array?

    Is the window length the same size each time (or determined another way)?

    If it is a moving window you may find duplicating the points in memory is expensive and decreases performance.

    Otherwise if its not, you would just be reshaping the array from a 1D to a 2D.

    If the window lengths are not the same you may have to use e.g. a cluster, to protect the size of array (and end up with an array of clusters of arrays).

    I guess the only way to tell will be to time both methods - if is not a moving window there is probably not much in it.

  6. A mass icon editor user interface.

    One that would easily let you, for any library (LVOOP or otherwise), see ALL the icons displayed and easily allow you to edit them simply by double clicking

    This is a great idea. Does it interface to the existing Icon Editor? I think it should fit within the realms of the existing Icon Editor framework - the ability to edit the templates on the fly. Having dynamic folder links as well as the static ones in LabVIEW Data folder.

    I would like this to be handled for a project as well as libraries. I.e. icons get stored in a project file (which would be templates for the project) and when you open the Icon Editor with the project open it sees these icons and you can mass edit them easily.

    I've struggled with using the templates as they don't always behave the way I intuitively expect, especially when adding text. sad.gif I've seen some discussion about it elsewhere but I don't remember what it said or where I saw it.

    Sometime I don't use the templates as templates - I just want them there so I can cut and paste them quickly. I also take advantage of the NI_Library tag even tho the VI is not in a library. This seems to clear up the problems of misaligned text. When I actually use a Library I don't have this problem.

    <object width="1135" height="719"> <param name="movie" value="

    http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/jingswfplayer.swf"></param>'>http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/jingswfplayer.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/FirstFrame.jpg&containerwidth=1135&containerheight=719&content=http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/NI_Library%20Icon%20Tag.swf"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/"></param>'>http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/"></param> <embed src="http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/jingswfplayer.swf" quality="high" bgcolor="#FFFFFF" width="1135" height="719" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/FirstFrame.jpg&containerwidth=1135&containerheight=719&content=http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/NI_Library%20Icon%20Tag.swf" allowFullScreen="true" base="http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/" scale="showall"></embed> </object>

    • Like 1
  7. What I normally do is set up a messaging scheme.

    When a property is set (or read) or a method is invoked, I add a cluster with a string (specific to the property/method) and a variant (with specific data) to an messaging array in the display state.

    In the facade VI I read the message and act appropriate.

    Thanks Ton

    That sounds really clever - kinda like Producer-Consumer comms

    What do you mean with 'system information'

    I mean LabVIEW providing us with information that this method was just run/selected by the user.

  8. What is the best way to handle methods in X controls?

    As-far-as I am aware there is no system information for the method invoked available.

    Do people pass in an enum from the Property VI to identify the method and do the work in the Display State Change event of the Facade?

    Cheers

    -JG

  9. Good video. I hate going through and changing the class colors. Your templates will certainly save me time.

    I've struggled with using the templates as they don't always behave the way I intuitively expect, especially when adding text. sad.gif I've seen some discussion about it elsewhere but I don't remember what it said or where I saw it.

    As a completely unrelated aside, I didn't know you are Aussie. For some reason I had it in my head you're in North Carolina, though as I look around LAVA now I don't know why I thought that.

    Thanks mate (I thought that would be the give away I am Aussie :))

    I love the new Icon Editor but it does need some a-lot-of work.

    I had this problem - I don't know if that is what you are referring to? But you made a post also.

  10. <object width="640" height="498"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/d6d1d416-ffb9-4ca9-add4-fca2ff9f84da/Icons_controller.swf"></param>'>http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/d6d1d416-ffb9-4ca9-add4-fca2ff9f84da/Icons_controller.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/d6d1d416-ffb9-4ca9-add4-fca2ff9f84da/FirstFrame.png&containerwidth=640&containerheight=498&showstartscreen=true&showendscreen=true&loop=false&autostart=false&color=000000,000000&thumb=FirstFrame.png&thumbscale=45&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/d6d1d416-ffb9-4ca9-add4-fca2ff9f84da/icons.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/d6d1d416-ffb9-4ca9-add4-fca2ff9f84da/"></param>'>http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/d6d1d416-ffb9-4ca9-add4-fca2ff9f84da/"></param> <embed src="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/d6d1d416-ffb9-4ca9-add4-fca2ff9f84da/Icons_controller.swf" quality="high" bgcolor="#FFFFFF" width="640" height="498" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/d6d1d416-ffb9-4ca9-add4-fca2ff9f84da/FirstFrame.png&containerwidth=640&containerheight=498&showstartscreen=true&showendscreen=true&loop=false&autostart=false&color=000000,000000&thumb=FirstFrame.png&thumbscale=45&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/d6d1d416-ffb9-4ca9-add4-fca2ff9f84da/icons.mp4" allowFullScreen="true" base="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/d6d1d416-ffb9-4ca9-add4-fca2ff9f84da/" scale="showall"></embed> </object>

    I am having trouble editing the discussion of a LAVA CR submission to include a demo video as I can't use the full editor!

    When I can sort it out I will ask that these threads are merged

    But in the mean time here it is!

    Cheers

    JG

  11. index.php?app=downloads&module=display&section=screenshot&id=109

    Name: Icons

    Submitter: jgcode

    Submitted: 13 Dec 2009

    File Updated: 13 Dec 2009

    Category: LabVIEW IDE

    Version: 1.0.0-1

    LabVIEW Version: 2009

    License Type: BSD (Most common)

    Icons v1.0.0-1

    Copyright © 2009, Jonathon Green; JGCODE

    All rights reserved.

    Author: Jonathon Green

    LAVA Name: jgcode

    Contact Info: Contact via PM on lavag.org

    LabVIEW Versions:

    LabVIEW 2009

    Dependencies:

    No dependencies

    Description:

    Discussion contains video demonstration

    Temporarily located here

    Installs a range of icons to the LabVIEW Data Directory folder (osdatadir) for use with the LabVIEW 2009 Icon Editor. Icons include icon templates, LVOOP banner and object icons and commonly used glyphs.

    The LabVIEW Data Directory (osdatadir), by default, is located at C:\Users\(User Name)\Documents\LabVIEW Data for Windows Vista and Windows 7 and C:\Documents and Settings\(User Name)\My Documents\LabVIEW Data for Windows XP.

    LabVIEW 2009, by default, stores Glyphs in the (osdatadir)\Glyphs folder and icon templates in the (osdatadir)\Icon Templates folder.

    For this package the installation locations are sub folders within these folders:

    Commonly used glyphs - (osdatadir)\Glyphs\_glyphs

    LVOOP Templates - (osdatadir)\Icon Templates\_lvoop icons

    Icon Templates - (osdatadir)\Icon Templates\_template icons

    An underscore is used to alphabetically rank the folders, moving them to the top of the list in the LabVIEW Icon Editor.

    Menu items are also installed for LabVIEW under File >> Icons to open the default folder locations from LabVIEW.

    Menu selections include:

    File >> Icons >> Template Icons - opens the (osdatadir)\Icon Templates folder

    File >> Icons >> Glyphs - opens the (osdatadir)\Glyphs folder

    This is makes it easy to open and browse all images from LabVIEW. Menu items are installed under (LabVIEW)\Wizard\Icons folder.

    Installation and instructions:

    Install package using VIPM.

    Restart LabVIEW for the Menu Items to take effect.

    Examples:

    Open the Icon Editor to view the installed icons

    Browsw the File >> Icons menu item to open the folder locations from LabVIEW.

    Known Issues:

    Due to no support for osdatadir in VIPM and OGPB and the fact that this location is not LabVIEW Versioned, the user should only install the package in one version of LabVIEW. (As of LabVIEW 2009, this is the only option).

    Acknowledgements:

    OpenG

    ICON Technologies

    Version History (Changelist):

    1.0.0-1 2009 12 05

    [New] Initial release of the code (LabVIEW 2009)

    License:

    Copyright © 2009, Jonathon Green

    All rights reserved.

    Redistribution and use in source and binary forms, with or without

    modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright

    notice, this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above copyright

    notice, this list of conditions and the following disclaimer in the

    documentation and/or other materials provided with the distribution.

    * Neither the name of the <organization> nor the

    names of its contributors may be used to endorse or promote products

    derived from this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY <copyright holder> ''AS IS'' AND ANY

    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

    DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY

    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES

    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND

    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS

    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    Support:

    If you have any problems with this code or want to suggest features:

    please go to lavag.org and Navigate to LAVA > Resources > Code Repository (Certified) and search for the LVOOP Custom User Scripting support page.

    Distribution:

    This code was downloaded from the LAVA Code Repository found at lavag.org

    Click here to download this file

  12. My question is I would like the string control to read top to bottom in the order the messages are received and programmaticly(sp) "scroll" to bottom when needed. What I can't find is a way to scroll. I can set if the vertical scroll bar is visible but can seem to find a way to change the scroll position.

    Hi Ryan

    Use the Text - Scroll Position property node to move the scroll position.

    post-10325-126033017282_thumb.png

    Additionally, I would like to have the Send Debug Message.vi check if the Debug console is running and if not; run it. I can get a list of all VI's in memory but I'm not sure how to get a reference to a specific VI. (meaning I'm not sure how to get the full path of a VI in memory) I remember reading about someone having an Abort all Running VIs but can't find it. I would think that would have my answer.

    In order to get a reference to a VI in memory...

    post-10325-126033081369_thumb.png

    The other way would be to check for an error returned from the Open VI Reference function if the VI is not in memory. It's up to you.

    Cheers

    JG

    • Like 1
  13. Finaly , i have just a bit modify your vi to creat a list of folders in a new project. I have creat Obj package , who install this tool in wisard folder.

    I have just i small problem, i have try to "close front panel" of this tool at start. And in this case, the project is creat , but not the folders. When i let the front panel open and close it at the end, all run ok.

    I send you my package , tell me if it's ok ,and perhapse why i can't close FP at start.

    Regards

    Eric

    Cool, glad it was an easy fit :thumbup1:

    My suggestion is that you do not open the window (but don't close it either!) at the start.

    Run your code then at the end open the window

    Remember the way it is coded - the save method only runs if the Project Path is valid.

    If you are calling it as a tool then this will most be likely empty as you have no default.

    Therefore if you call the close method and you have not saved the project you will lose it!

    post-10325-126032026068_thumb.png

    Cheers

    JG

  14. I'm seeing this same issue. Has anyone found a plausible work around?

    I see it in chrome, firefox and IE

    I did notice that when I immediately replied, instead of creating a double post it merged the posts into one, attachments and all. That was cool, but only works if no one has posted of course and you want to extend your attachments not edit them.

    This problem is really annoying - is a Admin able to comment about a fix please?

    Cheers

    JG

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.