LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event handling is not working as expected (NI vision).

Hello, 

 

I am facing problem to handling Event structure.

I am trying to make one creating template vi, that can create templates from Images, from captring image from camera directly and as well from live streaming.

For that I have created Event structure with 3 different Event, but only captureing Image and create template from it, is working fine while other two is not even reponding.

Here in attachemtn I have attached My vi that I tried.

Please guide me where I am doing wrong.

Thank you very much in advance.

 

Regards, 
Ankit Ramani.

0 Kudos
Message 1 of 6
(3,767 Views)
For that I have created Event structure with 3 different Event, but only captureing Image and create template from it, is working fine while other two is not even reponding.

-What is the Stop button mechanical action?

-Do you get any error?

-You don't stop the camera session or close the camera and there should be error and connected to outer loop.

-When you click stop does vi still executing or stopped?

-If you are not familiar with LabVIEW(which i am thinking) please look into below tutorials:

NI Learning Center

NI Getting Started

LabVEW Basics

3 Hour LabVIEW Introduction 

6 Hour LabVIEW Introduction 

LabVIEW Graphical Programming Course

Using the Context Help Window

LabVIEW Inbuilt Examples

Thanks
uday
0 Kudos
Message 2 of 6
(3,738 Views)

Thank you for reply.

Mechanical action of stop button is Switch until release.

I am not getting any error.

Noramally only capturing image and making templates case is working fine, during this case stop button working fine, If I press stop button vi stop execution.

But in other two cases buttons are not responding at all, no ROI tool is working not save or stop buttons are working.

 

0 Kudos
Message 3 of 6
(3,729 Views)

-Why are you opening camera and configuring session inside loop?

-Why are you using 5 to event structure timeout?(Why are you polling?)

-What is inside Timeout event?(what is happening?)

-What is the Error Status in other cases?

-Please learn about using event structure and basics as i mentioned in my previous post.

Thanks
uday
0 Kudos
Message 4 of 6
(3,721 Views)

Thanks for suggestions.

I will work on it 🙂

 

0 Kudos
Message 5 of 6
(3,719 Views)

When a front panel object event occurs that has been registered in an event structure event case, the front panel, by default, locks until the object's event case completes execution. Since the event has not finished executing it doesn't release the front panel to allow any buttons/controls to use.

 

While this solution may work, a better solution for programs with time intensive processes is to design your programing using a producer consumer architecture. See the link Application Design Patterns: Producer/Consumer below for more information on this topic.

 

Ref: http://digital.ni.com/public.nsf/allkb/D979D150E9FC253C86256BC7006F3E22 

Thanks
uday
Message 6 of 6
(3,690 Views)