12-07-2007 04:53 AM
12-07-2007 05:58 AM
This is very easy and i don't think you will need help.
A small tip: you will need "<numeric>..rundom number" function
12-07-2007 06:40 AM
12-07-2007 06:48 AM
12-07-2007 08:54 AM
11-26-2011 04:17 AM
Hi Guys!
@ GerdW:
Maybe you could helb us.
We were so frustrated that we took your program and changed it, but the sample rate of the DAQ Assistant has to be much higher than it is right now. We tryed different positions of the DAQ-Ass. the sample rate is as long as the light is on.
I would be very thankfull for your help!!!!!!!
BenniB
11-26-2011 06:48 PM
BenniB,
The USB-6008 may be part of your problem. Its digital IO is software timed and the maximum data rate is about 150 Hz. In addition you have the unknown and somewhat random OS latency to add to your woes.
You should consider changing your program to a state machine. I think you probably need only one loop and no global variables.
What happens if the button is pressed before the time delay? What happens if multiple buttons are pressed simultaneously? If Level is set to zero, your time to wait becomes infinite! Either do not allow zero for Level or do something about the result.
Lynn