LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

user event notification

How can I know when an event has occured. Like a boolean or event status that can be compared so that only if it is true I can execute another set of code ?

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 1 of 5
(2,770 Views)

This is the entire purpose of the event structure. You register your event to it and it will only run certain code when a certain event happens.

0 Kudos
Message 2 of 5
(2,767 Views)

in that case, I have an event that tells me if an image is available from the camera. and only when an event occurs, that is if an image is available I get to save it. But when I do 2x2 scan and have to capture 3 images for each pixel, I see that it misses certain images. This doesnt happen in any particular order.

 

Is it nevessary to add unregister user events and destroy event after the event structure for every single pixel ? 

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 3 of 5
(2,762 Views)

Are you actually creating a user event for when the image is available, or are you programatically updating an LED indicator when an image is available and then using that value change to try and trigger and event change? Also, can you please explain a bit more what you mean by a 2x2 scan and capturing three images for each pixel? I'm not entirely sure what your application is doing. 

 

Unregistering events just means that the event structure associated with that event will no longer trigger when the event occurs. Unregistering is not necessary for normal operation. 

Nathan Murphy
0 Kudos
Message 4 of 5
(2,679 Views)

If you are passing a reference to an image via event and the image itself has a limited lifetime then a race condition (Events are asynchronous) can cause your software to work on image references which have (since the event was fired) since become invalid.

0 Kudos
Message 5 of 5
(2,657 Views)