Hi,
I have attached a root macro with a code that shows the problems that I am experiencing.
I have a string of temperature sensors that I want to read and I have created a code that interfaces with the root GUI to show a graph in real time of the temperature reading. IMPORTANT For hardware reasons there has to be one second delay between one temp reading and the next. I have in mind a GUI with two buttons:
- Draw-> That connects to the sensor and starts reading/plotting the temp sensor reading. Inside this function I would have a do loop that keeps reading/plotting every second until the button “Exit” is clicked.
- Exit-> Closes the connection to the temp sensor, saves the plot, etc…
Because the temp sensor only has a windows driver I have to do this in WINDOWS (XP).
My problems:
1)
After reading the temp for a couple of seconds my root GUI freezes completely and it doesn’t show the plot or the buttons. The attached macro simulates the same effect when run in WINDOWS XP. If I comment the gSystem->Sleep(1000);
line it all works fine.
2)
Incidentally I don’t experience this problem in my mac, but, when the program is executing the temp reading loop it does not respond to me clicking the “Exit” button.
Any suggestion on how to address these problems?
Thanks
example.C (1.97 KB)