Search the Community
Showing results for tags 'while'.
-
Hello to all. I would like to know how I can close my program ordely. I mean... I have 4 whiles in my program so when user clicks a "stop" botton close ordely: while 1 and when it is finished then close while 2 then close while 3.... How can I do that just with a stop botton? Thanks a lot.
-
Hi everyone! I am currently designing a lab setup, where I need to take measurements from two devices simultaneously. I am dependent on polling one of the devices (a 1-axis stepper) for its position, while the other is a simple readout from a DAQ-board. My problem comes in the form of a low sampling rate. I have included a control that (is supposed to) enable users to set the sampling rate. I then pass the reciporcal of this as the argument for a time delay within a while loop that takes one measurement (polls the stepper and reads a single value from the DAQ board and writes to a spreadsheet file). However, the sampling rate is quite limited, and over the course of 15 seconds, it takes about 600 samples when setting the sampling rate to 1000 S/s. This doesn't seem to change when setting the sampling rate to other values. Does anyone recognize an obvious limitation to my way of implementing this? Am I using the timer wrong? Is there an obviously better way of implementing this? Thank you!