LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Display Variable from the Thread Function

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.

0 Kudos
Message 1 of 3
(3,067 Views)

I am not sure that a display rate of 1 kHz is required, most humans can't read that fast...Smiley Wink; 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

Message 2 of 3
(3,056 Views)

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.

0 Kudos
Message 3 of 3
(3,027 Views)