LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Invoking CallBack other than from UIR.

Solved!
Go to solution

The UIR has a group of 20 buttons all associated with the same callback function. There is a case statement for each button which does a bunch of stuff when that button is pressed.

 

Here is the question:

While accessing statemachine code I need to simulate a UIR button press. Can regular code invoke (the above)  a callback function or is that taboo? I could have a dedicated function but it would be exactly the same as the callback function.

 

I don't know if this is recommended or not? LabWindows might not like it?

 

NOTE: When executing statemachine code all the above buttons are dimmed so that they would be inactive during the invoked call to the callback function.

 

Thanks for any insight.

0 Kudos
Message 1 of 4
(3,584 Views)
Solution
Accepted by NI Nubie

Hello - 

 

The function CallCtrlCallback in the Programmer's Toolbox should be exactly what you are looking for. 

 

NickB

National Instruments  

0 Kudos
Message 2 of 4
(3,582 Views)

That did it.

 

Thanks Nick.

0 Kudos
Message 3 of 4
(3,578 Views)
> CallCtrlCallback()

And you can also simply call it as a normal function, passing the correct
panel and control identifiers and whatever events you wish.
--
Guillaume Dargaud
http://www.gdargaud.net/



0 Kudos
Message 4 of 4
(3,514 Views)