LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure with low level grab

Solved!
Go to solution

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. Fig_5_2.pngI 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? 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 1 of 11
(2,682 Views)

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)

Example_VI_BD.png


GCentral
Message 2 of 11
(2,672 Views)

@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)

Example_VI_BD.png


  • 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 🙂

 

0 Kudos
Message 3 of 11
(2,618 Views)

@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)

Example_VI_BD.png


 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.

 

0 Kudos
Message 4 of 11
(2,571 Views)

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.

Message 5 of 11
(2,552 Views)
Solution
Accepted by prettywoman

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 11
(2,550 Views)

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.

0 Kudos
Message 7 of 11
(2,541 Views)
Solution
Accepted by prettywoman

@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).

 


GCentral
Message 8 of 11
(2,536 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 11
(2,533 Views)

@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).


GCentral
0 Kudos
Message 10 of 11
(2,531 Views)