Jump to content

Phillip Brooks

Members
  • Posts

    911
  • Joined

  • Last visited

  • Days Won

    53

Posts posted by Phillip Brooks

  1. I was looking for a method to validate large files in LabVIEW. The NI MD5.LLB source required passing a string which is not practical for a multi-megabyte file. I researched the .NET MD5 functionality, and put together this VI (LV Version 7.1). The .NET implementation is quite simple.

    I tested this VI against the labview_80.exe download (~450MB) and FastSum 1.3 Standard and was able to verify my download; see Download LabVIEW 8.0 Now! thread...

    FastSum took over a minute to run, the .NET calc called from LabVIEW took ~ 30 seconds...

    Enjoy! :D

    Download File:post-949-1133361444.zip

  2. Subset of NI icons in your local installation:

    Program Files\National Instruments\LabVIEW 7.1\examples\instr\insticon.llb\Icon256.vi

    More on line at:

    http://www.ni.com/devzone/idnet/library/ic...rt_glossary.htm

    One trick I recently learned from this forum is to select a region inside your icon and then executing paste. The graphic will be scaled from the clipboard to fit your selected region.

    I've been opening MS-Word, finding something I like in the clipart gallery, copying and pasting it into my LV icons. There are recurring styles for some of the MS clipart that makes things look consistent, and I've even gotten some compliments :thumbup: for taking so much time to make meaningful icons!

  3. I ran the VI on my computer, then made the changes Louis suggested, and saw similar improvements. I watch the NI Developer Zone RSS feeds and read "Optimizing LabVIEW Embedded Applications" and shaved some additional time off by following the advice to "use shift registers instead of loop tunnels for large arrays."

    When passing a large array through a loop tunnel, the original value must be copied into the array location at the beginning of each iteration, which can be expensive. The shift register does not perform this copy operation, but make sure to wire in the left shift register to the right if you don

  4. I often change the display properties of front panel controls. For example, I hide the labels and display the captions or set the caption to bold text. If I multiselect (SHIFT+select) a group of objects, and want to apply a single (common) property, the change is only applied to the last selected object.

    I understand that not all FP items have the same properties, but there are SOME common properties for the class "Control".

    Individually selecting and setting properties is very tedious.

  5. NI Toolkits?! What are those! :D

    I haven't yet worked for an employer that would pay the price for these :2cents:

    I long ago wrote my own interface to ADO, and have never been involved in PDA, imaging or FPGA development.

    In the consulting world, I'm sure that these tools pay for themselves quickly. Thanks for the insight. :)

  6. :thumbup: That was the trick, thanks Michael! :worship:

    I sometimes get worried about going "outside the box" with all of the layers; VISA, DAQ, MAX, etc...

    It was nice to find that LabVIEW is forgiving outside of the development environment too. I've been burned too many times by adding modules/drivers in other languages only to break something else...

  7. Sorry to those who surf other boards as well; I'm in a crunch and can't figure out what to do. The more eyes, the better...

    I'm trying to upgrade an installation of LV6.1 to use the application builder. The computer was already built and had NI MAX 3.1 and NIDAQ 6.x.x installed. When I do a custom install to select only the Application Builder, the 6.1 Installer indicates that I have a later version of MAX and NIDAQ, and that it will replace MAX and NIDAQ with older versions. I can't "unselect" this!

    I don't want to change these; I've spent 3 months developing with the 3.1 and 6.x.x and can't afford to break my code now. How can I install the 6.1 App Builder WITHOUT touching MAX and NIDAQ?! Why does the LV Installer insist on replacing things that should not matter?!

  8. LabVIEW 8 Easter Egg

    Seemed appropriate to pass along, this might also be worth cross-posting in the LV8 LAVA forum...

    Posted today, 19 Oct 2005 on the Info-LabVIEW forum; by Stephen Mercer:

    Easter Egg: A hidden feature of a piece of software, generally something that has no functional impact, just fun visual impact.

    I happen to like these little hidden corners of a product, provided they take up little to no space on the end user's harddrive. Since I started working at NI, I've put one or two into LabVIEW. But the one I planned for LV8.0 turned out to be a sufficiently good idea that it got documented.

    If you look at the documentation for the "icon editor dialog box", the last line of the documentation says, "Use the lv_icon VI template in the labview\resource\plugins directory to create a VI with which you can edit VI icons outside of the Icon Editor dialog box."

    In LV8.0, take a look in the directory

    labview 8.0\resource\plugins\

    There you will find a file called lv_icon.vit. On the front panel of this VI Template are instructions for how to build your own icon editor that will replace the one used in LabVIEW when editing the icons of VIs. There is another file called SAMPLE_lv_icon.vi which is a trivial example of one such replacement icon editor. Just rename that file to be lv_icon.vi and then see what happens when you try to edit a VI's icon in LabVIEW.

    Have you ever wanted to be able to load your icon in some other piece of graphics software, edit it, and then put it into your VI without cutting and pasting every time you want to edit it? Have you ever thought about just building an icon editor in LabVIEW with features that you like? I saw comments on this mailing list recently about maintaining an icon library.

    You could write an icon editor that integrated such a library into itself.

    In short what started out as a project to open a backdoor for creating silly icon editors for an easter egg idea turned into a real opportunity for LV users to improve/change their icon editing experience. This is one of the small features of LV8.0 that most users will never need or want, but I figured some of the gurus on this list might use this feature to great advantage.

    Pojundery,

    Stephen R. Mercer

    -= LabVIEW R&D =-

  9. Pick one, bone-head! :laugh:

    This is the message I got once when trying to compile a Novell Shell driver using the Netware 2.x (Late 80s). I was specifically trying to create a dialup driver by following the instructions in the manual. There were two dialog options; OK and HELP. I Clicked HELP and saw a duplicate box with OK and HELP. Tried HELP one more time and got "Pick one, bone-head!" :laugh: I reported it to Novell and got an appology letter. :oops:

    Don't know what happened to the programmer, but I imagine in today's environment, one might be let go for that. :nono:

  10. I Moved up to 1280x1024 with my new job.

    The Dell I received has a nice monitor and graphics card, and the legacy code I work with was done on a dual screen 1280x1024 setup (lots of scrolling made me give in). I had created a two tone background image that gave me a 1024x768 rectangle in the upper left of my screen so I could check my front panel size for use on the ATE computer. After attending the LabVIEW Intermediate I&II classes, I found a couple of similar backgrounds on the CD that also left room for the menu bar (assumed bottom) so I use this instead. (See attached)

    I don't maximize the diagram, I use the extra real estate for the control and tool palettes. The only time I find myself scrolling :unsure: is when I start getting into ActiveX calls and control references; the size of the property and method nodes don't make things easy.

    post-949-1129203583.jpg?width=400

  11. Hi, my work is to construct a automatic testing system of mobile phone. At first ,i must read the test parameters from an INI file that writen by Excel. but, the format and content of this file is changed frequently.so i have to change the reading file and write file module. it is worse that i was told to add the testing item in my work.so i have to add some new parameter into the INI file.but,the whole structure of the testing program must be changed totally!BTW,the program is so complexed, i don't wanna see some "insane object" appear in my vi,so ,changing the structure of the whole program is impossible.

    Is thers some good method to sovle this case? The interface of testing program had better to be fixed.

    Thanks .

    If your application is already built, it may take some work. Whenever I've needed to load parameters from an INI file, I:

    1. Create clusters that contain the variable elements that I need to read/write.

    2. Save these as typedef'd controls and use these in my sub-vis.

    3. Use the OpenG INI read and write functions to load and store the clusters in INI sections and variables.

    If a variable is added, you can edit the typedef'd control. This should update anywhere you've placed the control. Don't change the order of your cluster elements, just add elements to the end. By using simple typedefs instead of strict, you can move the elements around within the cluster frame on the front panel without breaking your code; you can even hide elements that you don't need.

    I generally try not to delete elements from my clusters once I've added them. If your software design process is working, you shouldn't need to make that many changes :)

  12. Well, "that country", at least to an extent, is part of the US, so I think you should be covered.

    Besides, many countries (with useful extensions like .tv or .to) allow outside companies to buy their domain names. I think you can even get a European Union (.eu) domain without being a European citizen.

    I THINK some countries have a requirement that the domain must be hosted in country. Example YOURDOMAIN.co.th (Thailand domain) must resolve to a server located within the borders of Thailand. Otherwise, they can't enforce laws (porn, political, etc). Don't know about the Virgin Islands.

    How about a domain name like "openg.vi" ?

  13. I say let them have it! People who've been programming in a bubble all their lives need to be shaken up.

    I agree. It doesn't have to be a blast from a shotgun with both barrels, though. I recently demonstrated the fact that you can expand the Index Array function to someone. He had 12 discreet Index Array functions connected to the same array, with one index input to each. They were indexing elements 0-11. I showed him a "trick" and he nearly fell out of his chair. This is someone who has been programming in LabVIEW for 6 years. He's also fond of globals and locals and sequences that nested 5 and six deep :nono: ; he blows up when he can't create a sequence local in my code to move data around.

    I feel like I've got a good handle on all the features/functions of LaBVIEW (5 years+ I just completed the Intermediate I & II classes) and now need to think at a higher level. Many LabVIEW users are just that; users. If you need to create sequence, then a sequence is what you must use! Sort of like an apprentice tradesman; if the only tool you have is a hammer, then everything looks like a nail!

  14. Wow.  That sounds complicated.

    Rolf!  Where's Rolf!?  He might know.

    So you want to use LabVIEW code as an interrupt handler and then pass along a pointer to that LabVIEW code so it will be executed on an interrupt??

    I have limited knowledge in this arena but I'm wondering if you can't implement your own interrupt handler in C using your own custom DLL or code interface node.  That would let you come up with a block of code to execute as the handler that you could get a pointer to and pass along to your DLL.  Then you could use that block of code in conjunction with some easier mechanism (Queue, Notifier, Occurence etc) to communicate back to LabVIEW that it needs to do something.  That way you wouldn't have to directly have a pointer to a chunk of LabVIEW code, but it would still do nearly the same thing.  You would also have the option of performing a poll then in LabVIEW which might even be easier than an interrupt driven chunk of code (but that might not be exactly what you need).

    Can you expand on how fast you need this to execute?  Do you think a dedicated parallel loop in LabVIEW that was polling at a certain rate would be adequate?  That sounds a lot lot easier than getting an interrupt handler to directly run LabVIEW code.

    5780[/snapback]

    I will have three A/D channels generating single WORD data running at 1200 Hz each. These will not be synchronized. The channels are enabled and disabled manually, this is a monitoring function I may need to switch hardware and DLL at some pint (this is a VME Single Board Computer), but the alternate DLL offers the same functionality (pointer to a ISH routine). I really don't want to write a wrapper DLL.

    I might be able to poll using timed loops, I'm evaluating this now...

  15. I have a DLL that monitors hardware. When an defined interrupt occurs, the DLL calls an interrupt handler by way of a pointer to the handler. I need to handle this from LabVIEW. Below is the API documentation for the function.

    The vmeConnectLM() hooks an interrupt handler when a location monitor is signaled (interrupt occurred).

    ULONG vmeConnectLM(

    BYTE LMNumber, // LM number 0-3.

    ULONG PtrToHandler. // Handler address for the LM INT.

    );

    Parameters

    LMNumber - The LM number range of 0-3.

    PtrToHandler - Pointer to a handler to be called when the INT occurs.

    Return Values

    Zero, if successful; otherwise an Error Code.

    Remarks

    A vmeAcquireInt() API call must be performed before any interrupt can be enabled or disabled. The handler suppose is to be declared as typedef void (*FUNC)(ULONG). If this command is successful, the Location Monitor interrupt specified by LMNumber will automatically be enabled. The parameter passed into the handler will be the LMNumber.

    How/what can I associate to this DLL function? :wacko:

  16. Hi guys.

    I'm a student at Cal Poly and our teacher gave us this Labview assignment without teaching us anything about Labview. Any useful tips would be appreciated. If anybody has any actual codes for things like this they are more than welcome to send them.

                                                                              -Thanks                :headbang:

    P.S. The actual Labview instructions are on the last page of the attached PDF.

    5425[/snapback]

    If you're just trying to understand LabVIEW, you might check out http://www.iit.edu/~labview/Dummies.html

    This will help guide you through things like the front panel, block diagram, etc.

    Good luck!

×
×
  • Create New...

Important Information

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