LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a new Event in event structure

Hi

 

Can i create any event on my own in the event structures? For instance, one can always find the key down and key up events in the structures!!

But what if i want to create a new event such as add/remove hardware in it? Is it possible?

Somil Gautam
Think Weird
0 Kudos
Message 1 of 15
(3,256 Views)

Hi Somil,

when should the event occur?

 

You can use UserEvents. See this link for more information:

http://forums.ni.com/ni/board/message?board.id=170&thread.id=242266&view=by_date_ascending&page=1

 

Mike

Message 2 of 15
(3,252 Views)
The event is attachment or removal of some hardware to the pc
Somil Gautam
Think Weird
0 Kudos
Message 3 of 15
(3,236 Views)

Hi Somil,

what type of hardware is it? Is it an usb device?

 

Mike

0 Kudos
Message 4 of 15
(3,226 Views)

It can be any!!!

OK, let it be a USb device

Somil Gautam
Think Weird
0 Kudos
Message 5 of 15
(3,223 Views)

Hi Somil,

if it is an usb device, then windows sends a message to all windows. I'm not sure for other hardware.

 

Mike

Message 6 of 15
(3,220 Views)
I guess, whenever a new hardware is attached , a "found new hardware " message comes. Wont that be enough to trigger event structure?
Somil Gautam
Think Weird
Message 7 of 15
(3,217 Views)

Hi Somil,

if you can get this message in your vi, then it's enough to trigger your user event. I think there is normally no event like this implemented, so you have to use user events.

 

Mike

Message 8 of 15
(3,209 Views)

Oh, ok.

 

One thing more i wanted to ask regarding dynamic events

I read about those in the link you had provided but wasnt able to get a clear picture. Can you please tell me about  them

Somil Gautam
Think Weird
0 Kudos
Message 9 of 15
(3,204 Views)

Hi Somil,

see the attached picture as an example.

If you use LabVIEW 2009, then you should be able to insert the picture into your vi, to get the code.

 

Mike

0 Kudos
Message 10 of 15
(3,198 Views)