Jump to content

Neil Pate

Members
  • Posts

    1,185
  • Joined

  • Last visited

  • Days Won

    110

Posts posted by Neil Pate

  1. ok, a couple of things to address. The IMAQ close error probably happens because there is no open session the first time. It would probably be fine just to silence that error by clearing it.

    The first error is a bit surprising as you dont have a timeout value wired into the case-structure so I would have expect that portion of the code to never execute. Another slightly strange thing is the name of the VI in the error message does not match the name of the VI in your code (IMAQ Write BMP vs IMAQ AVI 2 Write Frame). 

    Try wire a value into the timeout (like 1000 ms or something like that) and move your acquisition code into that event.,

    I do not currently have the vision toolkit installed so cannot test your code.

  2. @Natiq this (non-functional example) should be enough to get you started. The weird arrow thing on the boundaries of the while loop is a shift register.

    The event structure can also be configured to have a timeout case where you can then perform other stuff, like reading your image and writing it to the reference on the the shift register.

    image.png.04c49f5dfa5185f84d43e44e49c44cad.png

    There is heaps of information out there (YouTube for example), a bit of searching will lead to some more details.

    • Like 1
  3. Close should be inside the loop. Before you start a new file you would close the old one.

    The file reference you get from opening the file would be put onto a shift register so that you can access it in the next iteration of the while loop.

    Can you share your code?

    • Thanks 1
  4. You are likely getting only 1 video because you are re-using the same filename.

    There are a bunch of ways to solve your problem. For me the easiest would be to look to using an Event Structure as this stops you from needing to poll the button all the time. Do a bit of googling to see how the Event Structure works. (tip, you will configure an event that responds to the save button click, and in that event you will prompt for a new filename (or autogenerate with timestamp) and then open a reference to this new file).

     

    • Confused 1
  5. 2 hours ago, Cat said:

    Hellooo?  Anybody home? :)

    For those of you who don't remember (or weren't even born yet when I started posting here 😄), I work for the US Navy and use a whole bunch of LabVIEW code.  We're being forced to "upgrade" to Windows 11, so figured we might as well bite the bullet and upgrade from LV2019 to LV2024 at the same time.  And then the licensing debacle began...

    Due to our operating paradigm, we currently use a LV2019 permanent disconnected license for our software development. This was very straightforward back then.  But not so much with LV2024 and the SaaS situation. Add to this the fact that I can't talk to NI directly and have to go thru our govt rep for any answers.  And he and I are not communicating very well.

    I'm hoping someone here has an answer to what I think should be a really simple question:  If I have a "perpetual" license with 1 year service duration for LabVIEW, at the end of that year, if I don't renew the service, can I still use LabVIEW like always, as if I still had my old permanent license?  I realize I would not have any more support or upgrades, but that's fine.

    I've read thru the threads here and in the NI forum about this, but they mostly ended back when no one really knew how it was all going to shake out.  So are we locked into either our ancient LV versions forever, or are we going to be paying Emerson/NI every year for something we don't really need?

    Cat

    Welcome back! Yes we remember you 🙂

    So I think you can now actually buy perpetual licenses again. I have not needed to do this myself as my org has an enterprise agreement with NI, but it is possible (I think...)

    • Like 1
  6. On 7/7/2024 at 2:34 PM, ShaunR said:

    Because I can immediately test the correctness of any of those VI's by pressing run and viewing the indicators.

    Nope. That's just a generalisation based on your specific workflow.
    If you have a bug, you may not know what VI it resides in and bugs can be introduced retrospectively because of changes in scope. Bugs can arise at any time when changes are made and not just in the VI you changed. If you are not using blackbox testing and relying on unit tests, your software definitely has bugs in it and your customers will find them before you do.

    Again. That's just your specific workflow.

    The idea of having "debugging sessions" is an anathema to me. I make a change, run it, make a change, run it. That's my workflow - inline testing while coding along with unit testing at the cycle end. The goal is to have zero failures in unit testing or, put it another way, unit and blackbox testing is the customer! Unlike most of the text languages; we have just-in-time compilation -  use it.

    I can quantitively do that without running unit tests using a front panel. What's your metric for being happy that a VI works well without a front panel? Passes a unit test?

    It may be in the codebase for 30 years but when debugging I may need to use the suspend (see below) to trace another bug through that and many other VI's.

    There is a setting on subVI's that allow the FP to suspend the execution of a VI and allow modification of the data and run it over and over again while the rest of the system carries on. This is an invaluable feature which requires a front panel
    image.png.9dd8a775e4a41151dbe43585fef4b6a2.png

    This is simply not true and is a fundamental misunderstanding of how exe's are compiled.

    Can't wait for the complaint about the LabVIEW garbage collector.:D

    We'll agree to disagree.

    ^ 100% all these things.

    • Like 1
  7. You are trying to run before you can walk.

    Try and get something (anything!) to display on the 3d graph. Read some docs to understand how to use its API. Once you understand the data you need to pass into it you should be able to display something on it. Then you will need to figure out how to get the actual measurements/information you care about to be displayed.,

×
×
  • Create New...

Important Information

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