LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger button click programatically after a specified time

Solved!
Go to solution
And most importantly, you kept your inner timed loop as continue if true and you connected True to it, which means it will be an infinite loop.
Thanks
uday
0 Kudos
Message 11 of 33
(789 Views)

I tried to use the producer/consumer architecture, as you told me to, but I just couldn't understand how to use it.

Here's what I did, and I'm still getting the video frozen, when I use this app.

Please help me out, and tell me what I have to do to fix this.

Thanks in advance!

0 Kudos
Message 12 of 33
(778 Views)

@nando1988 wrote:

I tried to use the producer/consumer architecture, as you told me to, but I just couldn't understand how to use it.


First understand the architecture to work further. Without understanding why do you want to use it??

-Simple way is the producer will generate something and put it in queue.(Producer loop)

-The consumer loop will keep on checking for something in Dequeue element, when it gets data it will pass the element.


Here's what I did, and I'm still getting the video frozen, when I use this app.

Please help me out, and tell me what I have to do to fix this.


Did you try run the code?? Did it run??

-Clearly there are two errors and you are telling that video is frozen, how can you run code without fixing errors??

 

-For Obtain Queue-why element data type is IMAQ session?

-Why you are enqueing the "element" string data type into the queue?

-Why you are using grab in both producer and consumer loops?

-where is the time constraint you are checking?

-Why you are closing the camera after both producer and consumer loops?

 

 

-If you understand above questions the answer will be easy. Main intention is you should learn and this is not code writing service to give you entire code.

Thanks
uday
0 Kudos
Message 13 of 33
(750 Views)

I just fixed the video, but I'm still having problems with getting the image every 500 ms.

Can someone please help me out?

Thanks in advance!

0 Kudos
Message 14 of 33
(740 Views)

I modified the vi, so that it would take a picture and then stop, but with no success.

Someone please help me out, I currently only have video, and I need to take a picture of that video after every interval of 500 ms.

Please help me out.

Thanks in advance!

0 Kudos
Message 15 of 33
(732 Views)

As I said, I don't have the imaq functions but just looking at your VI, I can tell that your producer/consumer loop is all wrong. You would want to pass to the consumer loop the image stream. You are doing something silly by writting a string value 'element' to the queue. You also do NOT want to pass the image out of the top loop and into the bottom loop. That just forces the bottom loop to wait until the top is done. Again, you need to understand dataflow.

0 Kudos
Message 16 of 33
(730 Views)

@nando1988 wrote:

I modified the vi, so that it would take a picture and then stop, but with no success.

Someone please help me out, I currently only have video, and I need to take a picture of that video after every interval of 500 ms.

Please help me out.

Thanks in advance!


Hey nando,

 

I think you are getting some what.

-If you correct it little bit, you will see answer by yourself (trust me).

-Why the session out is connect to obtain queue??

-What element you need to pass in enqueue element??(it should be image instead of string)

-After how much time enque should happen?(500ms)

-Is there a need for case structure in consumer loop and case selector which you connected is not justifying the need.

-If you connect a wire from top loop to bottom loop then they don't run parallell.

-Do you need two stop buttons??

Thanks
uday
0 Kudos
Message 17 of 33
(713 Views)

I tried taking the camera out of the producer loop, in order to have the image connected to the snap Image window, but that did not work. I also made other changes as suggested, but I still can't get the image and video (video on one screen and the image on another screen).

Can someone give me more pointers, so I can be able to fix this?

Thanks in advance!

0 Kudos
Message 18 of 33
(701 Views)

"You also do NOT want to pass the image out of the top loop and into the bottom loop. That just forces the bottom loop to wait until the top is done. Again, you need to understand dataflow."

0 Kudos
Message 19 of 33
(697 Views)

I took the camera oput of the producer loop and connected to the screen that's inside the consumer loop, but now, instead of having the video, I only get a picture that's taken the second I run the app. I need to have the video on one side and an image to be taken every 500 ms on the other side.

Can someone please tell me how to do this?

Thanks in advance!

0 Kudos
Message 20 of 33
(683 Views)