LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Events - Output for Event Structure

I created some user events, I wonder if its possible to have outputs inside the Event structure for dynamic events.

 

Like the application event below.

 

 

If yes, how can i accomplish this? 

 

Many thanks!

0 Kudos
Message 1 of 12
(3,508 Views)

Hi j3r3mi,

see this link please. It should help you.

 

Mike

0 Kudos
Message 2 of 12
(3,505 Views)

Thanks Mike, but i din't think thats what i wanted. Basically, the link just illustrate how events are used (which i think i already knew). However to go deeper, which i wanted to have an "output" (or filter, or whatever u named it) in the Event Structure for my Dynamic User Event. I guess thats impossible as i have trying it whole day and searching the web & forum for an answer.

 

ANYWAY, MANY THANKS!! 😄

0 Kudos
Message 3 of 12
(3,499 Views)

Hi,

sorry, i didn't realized that you mean output.

 

Why is it necessary to filter a user event. If you don't want it, then simply don't send it. Can you explain what you like to do?

 

Mike

0 Kudos
Message 4 of 12
(3,495 Views)

I have an event (say Event A) which is trigger perodically. In the event structure (for the case ,Event A), some data is being passed back to the VI which triggers that event.

 

If you know C program, its similar concept as a callback function.

 

int GetData(int *_val)
{
    if (_val)
        _val = 9898;
}


//// main code
void main(void)
{
    int success = 0;
    int myData = 0;

    while (1)
    {
        success = GetData(&myData);
    }
}

 

0 Kudos
Message 5 of 12
(3,488 Views)

Hi,

why do you want to use the Event Structure? You can realize it with a queue or a notifier or you can use a sub vi which you call by reference.

Can you show what you try to to in LabVIEW. With a specific example it would be much easier to find a solution for you.

 

Mike

0 Kudos
Message 6 of 12
(3,483 Views)

I know there are many ways to go about it. I just wanted my program to be event-driven rather than polling.

 

Never mind, since its not impossible. I'll go with queue then.

 

Many Thanks!!

0 Kudos
Message 7 of 12
(3,480 Views)

Hi,

why do you think it's not event driven if you use a queue?

 

Mike

0 Kudos
Message 8 of 12
(3,478 Views)

Event-driven, as it speaks, are triggered by events.

 

From my opinon, for queue, you need to keep polling it to get data.

 

Maybe you can help me by showing an "event driven" queue.

0 Kudos
Message 9 of 12
(3,470 Views)

Hi,

if you use the "Dequeue Element" with a timeout value "-1", then you wait til a new elment is available in the queue.

 

Mike

0 Kudos
Message 10 of 12
(3,468 Views)