01-10-2011 09:26 AM
Dear Sir or Madam,
I need to display a variable of a ThreadFunction that runs at 1 KHz in the User Interface. I can not use SetCtrlVal () because it takes more than 1msec to execute and it makes the ThreadFunction crash. Can you suggest me an alternative way for displaying my number?
Thank you very much for your help.
01-10-2011 10:12 AM
I am not sure that a display rate of 1 kHz is required, most humans can't read that fast...; hence I would separate the task and use two threads... one running at 1 kHz taking your data and another one displaying some of the data, i.e. every 100th value (or the average)...
Wolfgang
01-11-2011 07:54 AM - edited 01-11-2011 07:54 AM
I would guess that you could probably use printf() and print the number to the console window that fast.
Still, your monitor is probably only updating at 60 Hz, maybe 100 Hz if it is a CRT, so even if you can print something that fast your display can't keep up.