Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically Phase Shift Pulse Trains on a 6624.

I have three identical pulse trains coming from a PXI-6624 that are triggering from an external clock.  I need to dynamically phase shift these trains in relation to each other in C.  I can set initial delays without issue, but can't figure out how to change these in progress.

 

Is the hardware capable of this?

How do you do this using the ANSI C API?

0 Kudos
Message 1 of 3
(3,133 Views)

Hi coyote,

 

The way to change something on the fly would be to use a property node within your while loop. However, this is not a value that can be changed while the task is running, as it will generate an error.  A very slow way to accomplish this would be to stop the task, reconfigure, and then restart the task, but I can't imagine this being done faster than 200ms.  You should be ablet o chagnethe pulse width or frequency on the fly though.  Here are some examples.

 

http://decibel.ni.com/content/docs/DOC-3751

 

http://decibel.ni.com/content/docs/DOC-8382

 

Best,

Adam
Academic Product Manager
National Intruments
0 Kudos
Message 2 of 3
(3,095 Views)

What I think you're asking should be possible.  The behavior on your board isn't quite intuitive (we've changed the default behavior on X Series with the option of reverting back to the old behavior, but you don't have the option on the 6624).  You can read more information about it here.

 

If you're outputting a pulse train in response to your external trigger, then you will need to configure two counter tasks as described in the link above.  The Low Time of your gating pulse can be modified on-the-fly to adjust the delay of the entire pulse train.

 

If you're just outputting a single pulse in response to your external trigger, you can use a single task and modify the Low Time on-the-fly to adjust the delay.

 

 

You will need to use the CO.RdyForNewVal property as shown in this example to make sure the counter is ready to take a new value before writing it (instead of CO.Frequency, you can change the task to CO.Time so you can adjust the high and low time directly).

 


Best Regards,

John Passiak
Message 3 of 3
(3,088 Views)