By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,745 Members | 1,873 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,745 IT Pros & Developers. It's quick & easy.

Real time data input from hardware

P: 1
I'm working on a C++ app (in MS Visual C++ 6.0) to control a small test robot in a research lab to replace the existing LabView code (which I can't stand to look at).

I have functions to read the data from the encoders connected to the computer, and can output them when a button is pressed, but I'm wondering about the best way to take the data real time (and eventually dump it all to plain text files for MATLAB analysis).

I was thinking that just running a while loop until another button is pressed was a way, but I don't know how to make that not completely eat up all the CPU, and I also don't need it to run faster than 10kHz because that's the clock on the input board.

Thanks in advance!
Chris
Jun 20 '07 #1
Share this Question
Share on Google+
1 Reply


weaknessforcats
Expert Mod 5K+
P: 9,197
Can you just pause between checks on the button?
Jun 20 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.