LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

When using the user interface on LabWindows CVI,I am trying to find out which which callback function should be used to change the mode of another function?

In my Program, I have a callback function ao_write, so that the user can select the amount of ouput he/she wishes to supply to the module (FP_AO_200).The problem is that I want the user to have the obtain of using automatic mode (Were the unit is supplied the values. I have added the Checkbox constant to the uir.I wanted to know what is the best function too use. All help is greatly appriecated, Thankyou.
0 Kudos
Message 1 of 2
(2,875 Views)
Well, as before, with the questions that both I and Jeremiah have tried to reply to, I really don't know what you are wanting to do in your application. When posting a question in the forum you really should provide a better explanation of how your program is structured and not just what you are wanting to accomplish. A small and descriptive, and I repeat, small and descriptive, code snippet that illustrates what you want to do would be good.

Now, if you are wanting to programmatically change which callback function a UI control is tied to, you can use the SetCtrlAttribute function like this:

SetCtrlAttribute (panelHandle, CHECKBOX, ATTR_CALLBACK_FUNCTION_POINTER, MyFunction);

I'm not really sure how you were wanting to "let the user have the obtain of using a
utomatic mode" (this statement has little grammatical sense, if you reply could you clarify it?) but that is the function call you need. Now if you are just wanting to have the user click certain checkboxes and have certain procedures carried out when they do, then you should just put multiple checkboxes on your panel and have a different callback for each that contains said procedures.

I hope this info has helped in some way, but please if you post again, please take the time to clarify your question a little more if you wish to get a reply. Thanks!

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
Message 2 of 2
(2,875 Views)