Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

"synchronizing multiple cwpulse controls?"

I am using the cwpulse control to turn 2 shutters on and off. I need a finite pulse stream of 30hz 1% duty cycle for each shutter. I want to manualy start cwpulse1 (easy). I want cwpulse2 to be triggered at precisely 15.625 ms after cwpulse1 is started (difficult). 15.625 is midway between pulse 1 and pulse 2 of the first shutter. Can anyone tell me how to do this? I would be forever in your debt if you sent code.

Paul
0 Kudos
Message 1 of 2
(3,247 Views)
Paul,

Here's an idea that might work.

If you have the 6602, you could do this with 4 counters. For instance, set up counter 0 to do finite pulse train. Then, set up counter 2 to do continuous pulse train, but specify counter 3 to be the gate signal. Then, set up counter 3 to do retriggerable pulse generation with pulse width and delay specifications. Set up the gate to be RTSI 0, which will come from the output of counter 1. (I'll explain this further down.) The delay will be that 15.625 ms in terms of source counts. So, you might have to wire in an external source signal to get that. Then, you would have to calculate how many counts of that external source signal would correspond to how many pulses you want out of counter 2, and that would be your
pulse width.

Okay, for setting up the gate of counter 3 to be counter 1, you need to use the CWDAQTools control, and the RouteSignal method. Route the output of counter one to RTSI 0. RTSI is the Real-Time System Integration bus that is useful for routing timing signals across a board or multiple boards for synchronization or sharing signals.

There are examples in the NI-DAQ >> Examples >> VBasic >> Counter directory that may be helpful in getting you started in that direction.

Regards,
Geneva L.
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 2
(3,247 Views)