I am looking to use an input measurement to trigger a stimulator output in order to coordinate the opening of two separate apertures. Here are the details of my setup, as well as a chronological description of my progress:
- I have a laser pointed at the ADInstruments light meter. The beam is interrupted by a variable speed motor-driven disk with an aperture in it. When both are on and I am recording, I get a cyclical signal with a square pulse.
What I'd like to do is to calculate the period and count the pulses (both can be done using the cyclic measurement). Using those calculations I want to trigger a single (or very low frequency) +10V TTL square pulse (which drives a solenoid) to occur in coordination with one of the cyclical wheel pulses. The width of the TTL should be equal to the calculated period.
- As the signal was coming in, I was measuring the period of the pulses in Channel 2 using the cyclic measurement tool. I noticed that this calculation took a bit of time, causing the curve to come in a few seconds behind.
- At this point, I would like to use the live measured period to determine a cyclical event occurrence (period 1 event/Y time period; Y on the order of 500+sec). Y could be determined by the counts and the calculated period (Channel 2). The more challenging aspect of this is that I would also like the pulse event to have millisecond accuracy (sub-10s of millisecond at worst) and I want the width of the pulse to be equal to (period+(duty cycle*period)). The trigger of this event could be the beginning of the next pulse (after X number of counts)?
By doing this, theoretically I can cause a 10V pulse window to occur (in time) around the occurrence of the a single pulse event happening across the axis of rotation of the wheel aperture. This event occurs with the same frequency as channel 1, but that has a time shift by pi radians.
- Based on the reading that I've done in the LabChart help, there is no way to use a Channel as an Arithmetic input to the stimulator panel. Therefore, I've been attempting a different approach.
Using Ch1 as a trigger (above a threshold of some kind) and having previously calculated my pulse frequency (see https://docs.google.com/spreadsheets/d/ ... =drive_web), I have attempted to coordinate the stimulation with the measured input from the Channel 1 light meter.
This seems to work pretty well for Ch1 input with periods around .17 msec (Block 25). However, when I increase the speed of my wheel (Blocks 31-33), there is a bit of an asynchrony between the input pulses and the output pulse. This could cause a number of issues during experimentation including missing the pulse, fractionally capturing, or even doubly capturing the pulses I'm interested in.
- Rather than trying to rely on the coordination of the input period and the output periods, would there be a way to use a trigger just as I did to start sampling to cause a pulse, where the trigger would be dormant for the time periods specified? Perhaps this can be done using blocks rather than multiple stimulation events per long time period?