LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure without user interface

Solved!
Go to solution

I looked for a fast and efficient solution for an event structure which does not have a timeout case and is part of a vi that does not have user interface but I need to sent data configuration to this event structure.

I will be more clear: I have a camera which is generating multiple events taken by a loop with event structure inside.

The camera provider give me this Labview code example with all the events I am interested on and how they are implemented. I must mention that when you write a command to camera this one answer with an event, but when you first connect to camera there are over 100 events generated by it, or when you download camera there are also multiple events. When there is no communication to camera the event structure from the example is idle. The example has a user interface for changing parameters and program responds very well.

I have to integrate this camera in s big application in which camera is going to be configured pragmatically with no the type of user interface existing in the example given by camera manufacturer.  First I tried to design a loop with timeout case in which a queue can send data configuration for setting camera. Everything is good until the download when the code must take events to a certain way; in my case one event is taken another goes to timeout and so on. After two series of 100 frames downloading, during the third series Labview gets blocked (Labview does not respond) and I have to kill Labview. I understood from camera's designer that if camera events are not taken they are kept on a stack and when the stack gets full causes the Labview being locked.

Maybe I give too many details but the issue is: how to communicate with a event structure which does not have a timeout case and is not part of a user interface vi (it does not have an open panel in my application)?

0 Kudos
Message 1 of 7
(3,208 Views)

You will need to define and register user events. This is fairly straightforward and you can look at the examples for how this can be done. Your code would then fire the events when required.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 7
(3,197 Views)

Hi Mark,

I think at one moment I tried this user event. Then I need to feed these events into the dynamic event terminal from the event structure? I want to mention that the source of the event data vi also does not have an opened panel. Is necessary the source of the event to be a control from an opened control panel?

What I did not figured out was how to send a queue generated data as event, Labview 8.6 does not see it.

Any suggestion?

 

Thank you!

Virginia

0 Kudos
Message 3 of 7
(3,187 Views)

Hi Virginia,

 

 I've attached an NI KnowledgeBase article that contains an example VI here from a previous similar issue.  In this VI, however, the user event is triggered by a certain keystroke, but I think you should be able to modify it to do what you are trying to do. 

 

http://ae.natinst.com/public.nsf/web/searchinternal/1199d3582e97ce6786256f2a0010b69f

 

 In the example, the output of the subVI (in your case, your event data VI) is wired directly to the dynamic event terminal of the event structure that contains the Generate User Event VI. 

 

This VI was written in an old version (7.1), but I was able to open it up in 2010 here.

 

If trying something like they did in the example still doesn't work for you, then could you attach your code, especially your VI that is generating the camera data?

 

Thanks,

Austin

 

 

Regards,
Austin S.

National Instruments
Academic Field Engineer
0 Kudos
Message 4 of 7
(3,129 Views)

Austin,

 

Try again on your link.

 

ae.natinst.com is only visible to NI employees, not the general public.

0 Kudos
Message 5 of 7
(3,125 Views)
Solution
Accepted by topic author Virginia_Solomon

Oops...sorry about that.  I've attached the example I was talking about here.

 

-Austin

Regards,
Austin S.

National Instruments
Academic Field Engineer
0 Kudos
Message 6 of 7
(3,113 Views)

Thank you Austin!

That thing worked, but I stepped to another problem which might be for another topic.

Virginia

0 Kudos
Message 7 of 7
(3,090 Views)