07-28-2005 08:01 AM
08-03-2005 06:19 AM
Hi Zaharoff,
I need to know a couple of bits of information before we can move on with this. First of all, what signals are the Photo-Electric Sensors giving out when the object moves past it and makes it give out a pulse. I would assume it is giving out a 0-5v TTL signal, which would be ideal. If this is not the case then please let me know and we may have to look into some other areas to get the correct signal levels.
Next, what do you have it connected to on the SCB-68. For period measurements you have two options depending on how accurate you and the signal and how much programming you want to do. The two options both use the counter pins on your 6601 card.
Before we move on, please check that you have the correct pin assignments for the pins. If we assume you are using CTR 0 for the start measurement function and CTR 1 for the stop measurement function then the following pin assignments are what you need.
CTR 0: source pin - Pin 2
CTR 0: gate pin - Pin 3
CTR 1: source pin - Pin 7
CTR 1: gate pin - Pin 8
These pin numbers are a straight through connection to the pins on your terminal block so use the same screw terminal numbers as you have pin numbers on the DAQ card.
Now, the two options you have are:
1: Permanently enable the gate pin on both counters (this is actually the default state so just don't wire anything to the gate terminal on each counter and it should work fine), then take the signal from the source pin on each counter and use software timing to time the gap between the two pulses. This would be a very simple method of doing the timing but as it is done in software you are liable to get slightly poor readings as the operating system could decide to go off and randomly check the CD drive or look for virus's.
2: Take a known frequency into the source pin and then create a system where you enable the gate pin on the first pulse, and the disable the gate pin on the second pulse - all on the same counter. As you know the frequency and you can count how many pulses went through while the gate was open you can calculate the time taken for the object to pass between the two Photo-Electric Sensors, you simply multiply the period of the pulse by the number of pulses.
Hope this helps you get sorted, if you have further questions then please feel free to get back to me.
Best regards,
Peter H.
Applications Engineer
NIUK.
08-03-2005 10:10 AM
08-03-2005 02:56 PM
08-04-2005 05:29 AM
Well, thanks for your help. I'll try to find this to get a 0-0.5V signal.
Benjamin.
08-04-2005 10:31 AM
Ben:
You keep getting the values wrong- TTL is near zero (0) volts for a logic low. Near FIVE (5) volts for a logic high.
Actual defined ranges are 0 to 0.8 volts for logic low and 2 to 5 volts for logic high. Suggest pulling up the output of the photodiode to 5V, if possible.
Good luck and happing timing!
08-05-2005 05:57 AM