09-26-2019 06:40 AM
Hi everyone,
I have a problem about reference of IMAQdx Open camera.vi. In my system, I used to low level functions to grab and obtain images. I shared the system that is like my system.Firstly, we need to select camera name by reference, while system is running.My system is directly running when VI opened, and I take an error. This error is about choosing the reference of IMAQdx Open camera.vi, this is normal. I want to fix this problem. There is no problem with camera, everything is OK,I obtain images and system has very good performance when I choose reference. When I used to event structure for reference of IMAQdx Open Camera.vi, the system was working (There is no error). But this is not enough for me, I want to use event structure in while loop. By using while loop in system, I want to change my reference of IMAQdx Open Camera.vi for many times while the Labview execution system is running. I designed this system, labview was working but I did'nt observe image. How can I fix this problem ? Could you help me,please?
Solved! Go to Solution.
09-26-2019 06:45 AM - edited 09-26-2019 06:52 AM
If I understand your question correctly, you can do the following:
An analogous example is below as a snippet (you can download it and drag it into a block diagram to view other cases)
09-26-2019 09:55 AM
@cbutcher wrote:
If I understand your question correctly, you can do the following:
- Use a shift register for the camera reference
- Use a value change event for the Camera name to
- close the current camera
- open a new camera
- configure grab
- Use the timeout case with a timeout of 0 to "IMAQdx Grab2.vi" as in your current loop
An analogous example is below as a snippet (you can download it and drag it into a block diagram to view other cases)
My problem: When this happens, I don't capture image from my system but it gives me no error. I want to capture images while this system is running.
Thank you very much 🙂
10-10-2019 05:10 AM - edited 10-10-2019 05:10 AM
@cbutcher wrote:
If I understand your question correctly, you can do the following:
- Use a shift register for the camera reference
- Use a value change event for the Camera name to
- close the current camera
- open a new camera
- configure grab
- Use the timeout case with a timeout of 0 to "IMAQdx Grab2.vi" as in your current loop
An analogous example is below as a snippet (you can download it and drag it into a block diagram to view other cases)
I will ask you a question again, please help me.
I downloaded image on my computer. I drag it into a block diagram to view other cases but I did not view other cases. When I drag it into a block diagram, it acts like only image. How can I view other cases? My Labview is 2014 Base Development Package.
10-10-2019 07:09 AM
You won't be able to because snippet was saved for LabVIEW 2015.
Someone will need to save a copy of the VI as 2014 for you.
10-10-2019 07:14 AM
@prettywoman wrote:My Labview is 2014 Base Development Package.
That is your problem. The snippet was made in LabVIEW 2015 2019 (I just tried to open it myself with LabVIEW 2016). I saved the VI for 2014. So give it a try.
10-10-2019 07:31 AM
Tim,
There is something I noticed about about the code capture tool, but haven't truly confirmed. It seems like even when you set it for a previous version, it doesn't do the back-saving necessary to put the code in the snippet. That although the person saved it for 2015, the snippet itself is still 2019. I think the CCT used to work with saving for older versions, but now I'm not so sure.
10-10-2019 07:34 AM
@prettywoman wrote:
@cbutcher wrote:
If I understand your question correctly, you can do the following:
- Use a shift register for the camera reference
- Use a value change event for the Camera name to
- close the current camera
- open a new camera
- configure grab
- Use the timeout case with a timeout of 0 to "IMAQdx Grab2.vi" as in your current loop
- I don't understand where is exactly 'IMAQdx Grab2.vi' in this example. Please, tell me again detail.
- In this example, Closing %f is equal to Close IMAQdx Camera.vi and Opening %f is equal to Open IMAQdx Camera.vi. Did I understand this correctly?
- Can you give me more details about above example?
- I want to 'Camera Name' to put into a event structure, and this event structure into a while loop. I want to this because I should change my 'Camera Name' in this system when I want. When I used event structure without using while loop, 'Camera Name' is changing only once. When I used event structure with using while loop, I don't capture image. (I created 'False' constant to while loop condition to change 'Camera Name' of this system everytime.)
My problem: When this happens, I don't capture image from my system but it gives me no error. I want to capture images while this system is running.
Thank you very much 🙂
Hopefully now that the snippet version issue is solved by crossrulz you can see all the cases.
Yes, the Timeout case contains the Grab2.vi (at least in the real case, the example has no IMAQdx code).
10-10-2019 07:35 AM
@RavensFan wrote:
There is something I noticed about about the code capture tool, but haven't truly confirmed. It seems like even when you set it for a previous version, it doesn't do the back-saving necessary to put the code in the snippet. That although the person saved it for 2015, the snippet itself is still 2019. I think the CCT used to work with saving for older versions, but now I'm not so sure.
It has been that way for a long time. I don't trust the "save for previous" on the CCT.
10-10-2019 07:36 AM
@RavensFan wrote:
Tim,
There is something I noticed about about the code capture tool, but haven't truly confirmed. It seems like even when you set it for a previous version, it doesn't do the back-saving necessary to put the code in the snippet. That although the person saved it for 2015, the snippet itself is still 2019. I think the CCT used to work with saving for older versions, but now I'm not so sure.
This isn't the first time I've noticed this, but I only saw it the last few times. Presumably I just didn't try in older versions before (I haven't updated/changed my CCT at all recently).
The images still claim to be for an older version, but now fail. I don't think it always happens. Perhaps it depends on the target version, or the code in the snippet? (Or perhaps it does always happen, and I'm misremembering/imagining working cases).