Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use GetUserEvent with othe events than "commit"

Hi,
I am programming a controller for 4 identical syringe pumps. I would like to have a panel with 4 ring_tank controls representing the 4 syringes, and have a single Refill_CallBack that upon right click o one of the ring controls will pop up a message and recharge the associated syringe.
I want to reserve the commit event for injecting liquid from that syringe.

Is it possible to use GetUserEvent or something similar as in the sample code "getuserevent.prj".
other suggestions???

many Thanks,
JHH
0 Kudos
Message 1 of 2
(2,603 Views)
Hi,

The GetUserEvent function will only read COMMIT and user defined events (events generated usign the QueueUserEvent() function). My advice here is to setup another thread with a call to RunUserInterface(); then setup a Callback for the controla dn on that callback catch the EVENT_LEFT_CLICK and there send a user event with QueueUserEvent(). This should allow you to get leftclicks with the GetUserEvent function. You can use the CmtScheduleThreadPoolFunction to call the RunUserInterface() in another thread.

Another option is to call ProcessSystemEvents() in a loop that you control and use the regular Callback method.

I hope this helps.

REgards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(2,603 Views)