LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Example Acquire Data

Hi,
 
A few days ago, i planned to workf for the first time with it. I follow an example to better understand the way of working(see link below).
I try to make the example. Everything goes very well untill i try to debug the project through pressing the run button. He gives me a run time error.
When i take a look in the .c file, i also can't find AcquireDataFunction. Thus he don't add some code for the Acquire button.
I hope that somebody can give me some hints.
Thank you.
 
 
Jeroen
 
0 Kudos
Message 1 of 4
(3,377 Views)

The reason yo the compile error is that there isn't any callback function in your code to associate with "Acquire" button. This is strange since "Generate all code" function should have produced all necessary code for you, including the button callback: could it be that you edited the button adding the callback name after generating the code?

In any case it is possible to generate individual controls callbacks after the first code generation. You can right-click the control and select "Generate control callback" from the context menu, or execute Code >> Generate >> Control callbacks menu item. If asked for a target file, select your .C file in the project.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,353 Views)

Thank you for the answer.

Well, this is what i don't understand, i push the button "generate all code" and he don't see the acquire button.

Very strange, somebody an other suggestion?

0 Kudos
Message 3 of 4
(3,346 Views)
Hi Jeroen,

I took your Sample.zip, I opend your .prj with CVI 8.1 and then opend the .uir. Pressed generate and then selected all code. Selected add to existing project and everything seemed fine. I have attached the .c file that that action made for me and i have got the AquireData Callback in it.
I don't know for sure why it didn't worked with you, are you using CVI also and if so which version? Is your problem solved or are you still having troubles with the generate code function?
Kind Regards,

Joris Donders
National Instruments
EMEIA GTM Lead for Semiconductor
www.ni.com/semiconductor
0 Kudos
Message 4 of 4
(3,308 Views)