Jump to content

TG

Members
  • Posts

    225
  • Joined

  • Last visited

Posts posted by TG

  1. From some books and documents, these two seem don't have much difference, the result of using a Functional Global Variance is the same as that of calling a sub-vi with same function, then why does LabVIEW develop the concept of Functional Global Variance? Is there any good reasons to use the Functional Global Variance instead of a sub-vi?

    Thanks a lot!

    One thing to note about a simple subVI (statically defined default when you define one) it acts as a semaphore.

    The locking is implied by the fact that only one call to a static subVI can proceed at a time.

    This makes default data inside the subVI 'safe' in that only one access at a time is permitted to the subVI however,

    using default data in controls always has a way of causing strange bugs so it is critical to initialize a subVI on the first iteration of it.

    That said Functional Globals are excellent way to initialize data and retain values between calls.

    Use FG's whenever you need to initialize data and then safely maintain the data in that subVI.

  2. First thanks for this I found it very interesting, I do really need to spend some time looking more at LabVIEW OO and start doing some.... .... however ..... please please please frusty.gif, why can NI not make this type of thing in a downloadable form, am I being silly is this not possible with webcast ? This is not the first and I am sure not the last really good webcast / video presentation I have come across on the NI site, that I have though wow what a great and useful presentation and I really want the opportunity to view them several times and at time when I have a bit more peace and quite. Also I have on several occasions tried to find a previous webcast /video on the NI site that I rememberer and find the links are not longer valid and I cannot find it. dannyt
    <BR><BR>Id rather read the documentation I cannot see the displays. The rate is slower than mollases. More importantly ... never mind Sorry <BR><BR>
  3. What kind of LabVIEW enthusiasts would we be if we didn't upgrade to the latest and greatest! laugh.gif

    Not only that but how can anyone learn anything from this forum if they don't have the latest version

    of LabVIEW?

    I come here to learn and get example code.

    The Latest LabVIEW is needed to learn new stuff here.

    • Like 1
  4. My only beef on this issue is the number of upgrades that come down the pike in just a few years.

    And guess what. I am not going to have a new version just sit there when it comes out. Who would?

    Even if I don't use it I am still going to install it

    And I am going to look at it when time permits.

    and of course when I download an example code snippet here at this forum I'll have to have the latest and greatest version to convert the thing into something I can use.

    But the size and timeload of each new installation for each new revision is kind of ridiculous to me personally.

    I would not care either way except for that.

  5. Hi Guys,

    I do not have this utility, unfortunately!

    But Im sure it can be found or made here!

    From the perspective of a single developer making changes to hiw own code without (the luxury of) source code control it would nevertheless be nice to have a tool allowing a hotkey to quickly insert timestamp string into windows clipboard, all ready to be pasted into a block diagram comment.

    Does LabVIEW already has this capability?

    Any API facade VI out there allow to write to the windows clipboard programatically?

    Example during development, F12 key when pressed would place a nicely formatted time stamp string into the windows clipboard all ready to be pasted on to the block diagram. That would be a great little tool!

    LV 8.5.1

    LV 8.61

    LV 2009

  6. Is the 'excel objectRepository.vi' in your project directory somewhere? And does it need a .dll to operate and is that in the project directory as well? I can't explain why but, if my memory serves me correctly I encountered a similar problem a while back and that is how I fixed it.

    Good thinking PaulG. I'll have to get back to you on that.

    Just thinking out loud now.

    If being in the project directory somewhere means I can see it in my project displays the answer is yes I can see the repository file in the labVIEW library in the project view in a virtual folder but I will double check to see if it needs to be another type like populated.

    Since its password protected it may indeed use some windows DLL.

    I don't think LabVIEW's interface to excel uses a DLL but then again?

    I would surmise that the automation services provided by LabVIEW simply use the Active X services

    available in the server (Excel 2003) through some common interface like COM. That is as far as my understanding goes concerning COM. :)

    The best lead so far is that the dll (or the path to it) must be inside the password protected repository vi

    I guess I should be including a link to this dll if I can figure out what it is and where it is.

  7. This is probably an easy fix but I have yet to figure it out. I build a rather large executable and all is well except for one labVIEW library that allows some access to excel using automation. It was written by a nice gentleman who made it available on the web. I cannot remember his name anymore. Anyway, I use his Vi's to get simple access to Excel sheets in a workbook. The builder seems to never be able to find the path to 'excel objectRepository.vi' I have tried to add to LabVIEW .INI and also have included the library in the 'always include' field before compiling. But for some reason it never finds it. Actually, that is not totally true, on some rare occasions it actually finds the file but probably because I am building more than once in the same LabVIEW session I would think. Anyway I wish I could make some change to the Build file so that this file would always be included. Mind you it is not a showstopper but I would like to know the actual reason for this issue. I think the file is read only or password protected. Is that the reason it cannot be added to the build list? ANy similar experiences with APP builder LV 8.5.1?

  8. I've recently started using the automatic error handling. It's annoying, but worthwhile for catching those unwired errors.

    Maybe someone knows, is there a way to attach a custom handler or callback to the automatic error handler? (I would occasionally like to inspect, or even modify, my program state when the automatic error handler pops up.)

    Thanks,

    Joe Z.

    I realize now this is a relatively old thread

    I don't think so Joe but you can get the behavior you wish with a state machine that is setup to handle both normal states and an error state. Errorr handling is best done by designing architectures to handle them from the ground up. I believe dataflow concept makes this necessary. Its one thing to report an error, quite another to handle it and return to the beginning of the dataflow..

    You could write a generalized error handler VI.

    Then when an error occurs you could call this VI and have it handle the error based on its number or message. Since its a VI call you have a way to determine if the handler actually 'handled' the error because itcan return information back to you.

    The only catch is you need to call this VI when the error occurs, hence the need for designing a state machine that can detect error (after the state) and then redirect to the error state for handling.

    You then need to know that the error was handled correctly.

    If it was handled nicely you can go back and retry the prior state in the machine, else you escalate the error or close out.

    Its a technique talked about in 'LabVIEW Advanced Programming Techniques.' I use it a lot and it is helpful especially with controlling peripherals which don't always behave :)

    BTW I turn on error handling to help troubleshoot and its great for catching unwired situations.

  9. Hi Guys,

    How is the best way to see a memory leak (if indeed there is one) when running an Executable created with LabVIEW?

    LabVIEW 8.5.1 currently

    I m using serial VISA and FieldPoint exclusively.

    Nat instruments 16 port serial card.

    Is there anything out there that is either freeware (or if it works really good low cost software) to catch the devil?

    Thanks in advance

  10. QUOTE (Minh Pham @ Jun 5 2009, 06:41 AM)

    Pretty simple actually. You just need to run the vi with the specfied path to the exe file.

    please look at the example below i made for Tortoise SVN to do an automate Check out

    Thanks Minh,

    Yeah it seems to work now except now it seems to randomly returns error 2 (with a meaningless GPIB explanation) and "LabVIEW memory full."

    Could I assume this is because the exe file has a possible memory leak?

    I am reluctant to ask the guy who made this executable because I sincerly doubt he would make one with a memory leak

    and afraid to askl without proof.

    I wonder if anyone else encounter anything like that using this exe launcher in LabVIEW?

  11. QUOTE (TobyD @ Aug 27 2008, 11:16 PM)

    I enable it only when debugging, otherwise I leave it off.

    I prefer to handle errors in my code, however sometimes code runs funny or has errors that are not trapped because of lack of dataflow for error channel etc

    In those cases I turn it on and let labVIEW give me a clue about where I may have screwed up..

  12. QUOTE (ShaunR @ May 1 2009, 11:49 AM)

    I d like to learn more about callbacks and messaging architecture that encapsulates most of the details of messaging, etc.

    I have no idea why (yet) but I tried to open or look into both zip files,

    The Message pump zip and

    and your Callback LLB and could not open either in labVIEW 8.5.1

    It looke like the message pump library looking for semaphore support in LabVIEW 6 and the Callback LLB simply will not open beyond the

    LLB manager window for some reason

    ANyway hope I can figure this out.

    Anyone else have success looking at these zips?

    Thx

  13. QUOTE (Cat @ Apr 3 2009, 07:06 PM)

    Don't get me wrong -- I love state machines and use them all over the place. I just never made the leap into using it to make more simplified transitions between parts of my code that *always* go step1->2->3->etc.

    I'm giving it a whirl right now with my big, messy, 3x4 screens, dies-after-8 hours vi. If I can make it work there, I can do it anywhere.

    I think a state machine (any type) handles variation better than a stacked sequence.

    If it always goes 123 then of course no problem there, however it is always better to design code with the

    intention of being extended. Turns out to be easier to read and re-use too.

    BTW Too late for me now, Ive got many megabytes of hideous looking code (with sequence structures) from past projects that when I need to look at them today,

    make me cringe now.

    Anyone else have skeletons in their closet?

  14. QUOTE (crelf @ Mar 12 2009, 09:25 PM)

    That's a good idea - or maybe you could right-click on a VI/primitive and select "Visible Items > Sequence Container" which would add a 3 pixel border around the VI/primitive that we can wire any datatype to. Then it'd be obvious which wires are for dataflow only and which ones are connected to the connector pane.

    Thats even better crelf

    Thanks for the that tip!

    I'll have to try it out myself :)

  15. QUOTE (mindmoody @ Mar 10 2009, 08:37 AM)

    Hello everyone in LAVA...

    currently i'm working on my project by using LabVIEW.. I want to use serial port (RS232) to control a humididty sensor and one servo motor.. How am i going to build the control and monitoring application by using this LabVIEW? Please give me a guide.. where should i start? Thanks..

    regards,

    Mindmoody :(

    I originally learned LV by taking an example and messing with it until I could call it my mess ;)

  16. QUOTE (neBulus @ Mar 10 2009, 05:33 PM)

    No and no.

    BTW: DAQmx Tasks will do the same thing (but you will have to trust me on that one. ;) ) That behaviour SEEMS to apply to every resource allocated by LV. I think it has to do with hedging against the possiblity that someone that doesn't know what they are doing cloising a ref and then latter trying to use it (trap catcher?), but NOW I AM speculating.

    Ben

    Thanks Ben

    All I know is when I put the exception handler in and ran it over the weekensd it worked ok however

    when I exit the program (The LabVIEW executable I built)

    Monday Morning Windows was acting funky like it was out of memory.

    It is a low price IBM laptop with 512MB like the 1970's but..

    BTW Thanks for doing the testing and reporting to us.

    You say simply clearing the buffer works and no side effects?

    Do you also keep ythe default (4096) buffer size?

  17. QUOTE (neBulus @ Mar 6 2009, 04:48 PM)

    Closing and re-opening a VISA session will bite you eventually uless the app is restarted regularly.

    Can you elaborate further on this point?

    Trust me I am not dissagree with you even if I do not know full answer.

    I got this error even though I open/close the port before every exchange

    (was required to make it reliable as it currently is)

    and many thousands of successful queries on the device yet this error still manage to creep in randomly.

  18. Hi Guys,

    Quick Q for those who are familiar with VISA serial functions.

    My device sometimes returns error after long periods of perfect operation

    −1073807253 A framing error occurred during transfer

    I have seen this error before but never could figure out why it happens randomly after many thousands of perfect exchanges.

    There is not too much I can do about it regarding the connections or the fact that it is going through a USB- Serial converter (Its on a laptop)

    I am attempting to deal with this by putting in exception handling code that will catch the error then Close the port then

    Open it again for a retry of the operation.

    The Q is once an error like this occurs would an approach like this save me from further issues

    does anyone have experience doing something similar to recover from a VISA error and will it work long term?

    Thanks in advance

×
×
  • Create New...

Important Information

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