Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

How to send commands to command button to look like an event

$
0
0

Hi all

I am trying to find the proper way to send a software command to a command button.

For example say you have a simple (OK) command button, within that command button the callback function has multiple lines of code that are run from within that one callback.

Now what I want to do is call the (OK) button in another function as if the user pushed the button without effectively having the function to wait for all the process in the (OK) callback to finish, I want it to call the (OK) button and get out of its function and continue on.

What I have seems to work but I am not sure if this is the proper way of coding it.

Code sample to turn on =1and off 0:    OK Callback (panelnumber =2, controlnumber = 2, event=2 , callback= NULL, event1=0, event2=0)

if(ON)

{

SetCtrlVal(panelmain, PANELMAIN_OK,ON)

OK(2,2,2,NULL,0,0);

 }

else

{

SetCtrlVal(panelmain, PANELMAIN_OK,OFF)

OK(2,2,2,NULL,0,0);

}

 

 


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>