01-11-2007 04:43 PM
01-15-2007 11:11 AM
I didn't had a chance to move to LV 8.2 (too many projects ongoin with 8.01) could you please send again your VI in LV 8 or 8.01 ?
Thxs
01-15-2007 01:29 PM
Hello CSPowell,
You are actually seeing the expected behavior of the IMAQ driver. I see that you are trying to open an IMAQ session and keep it open even though you stop your LabVIEW VI. Unfortunately, the IMAQ driver does not allow you to keep an IMAQ session open if the LabVIEW VI stops (or closes). The built-in behavior of the driver will automatically close the IMAQ session if it is left open when the VI stops. Even though the normal behavior of an uninitialized shift register is to return the last value that was stored in it (or the default value for the first time), this is not the case with an IMAQ session. Therefore the uninitialized shift register will not work the way you are trying to use it with an IMAQ Session. If you want to use your "State Machine-like" VI of the Initialize, Acquire, and Close States, then you can, but you will have to have some way to keep LabVIEW open with that session passed to and from it. For example, if you have a higher level VI that calls your VI as a subVI, then this will work for you and you won't get the error code you are receiving.
I have actually seen this error before with another customer that was doing the same thing you are, but they were using a sequencing type of program, similar to NI's Testand software but their own, to pass the IMAQ Session to the different states like the open (Initialize), Acquire image, and Close states. Their sequencing software did not keep the IMAQ session open properly because it didn't pass the session via the IMAQ driver properly, but I tested and successfully did this using NI's Testand software with a LabVIEW VI for the different IMAQ states like in your program.
So you can easily test this out by simply making your VI into a subVI and placing it into a high level VI that calls it for each state that you want. You will see that because LabVIEW does not stop, the IMAQ session will stay open if you pass it (the session id) to and from the upper level VI and the subVI, and you should not get an error. I hope this helps and clears things up for you. Please let me know if you have any further questions or concerns on this issue.
Regards,
Jasper S