Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

delayed pulse train using PCI 6514

I have a 6514 card & am trying to create 2 pulse trains one delayed w.r.t the other by half the pulse width. I can get it to delay by a full pulse width. My pulse widths are 100ms. Attached is a picture of what I can achieve. I'm using timed sequences & delaying the SCLOCK by 150ms w.r.t. SDATA. I'm currently ignoring the SLOAD line. Attached is the vi.
I realize that the best way to implement this would be to use a board that is capable of hardware timing, but at this point I'm trying to work around thru software. Because of my software timing, any timing less than ~ 50ms is unreliable (unless I'm underestimating the power of the controlled timing vi's ?).
How can I implement this 50ms stagger between SDATA & SCLOCK ?
Any suggestions would be greatly appreciated.

Thanks,
ak

Download All
0 Kudos
Message 1 of 4
(3,438 Views)
Hello,

If you switch the wait until next millisecond multiple inside of your timed sequences inside your while loop to a wait everything works as you explained.  The wait until next millisecond multiple is a VI that is typically used to synchronize loops.  For example if you have two loops, and loop1 starts at time 0ms and loop2 starts at 50ms, the wait until next millisecond multiple (set to 100ms) will cause both loops to run again at time 100ms.

I have replaced all the wait until next millisecond multiple VIs in your application with the wait, and it works.  Please see the image below.

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
Message 2 of 4
(3,426 Views)
Jesse,

   Thanks - I came to this conclusion also. I also created a internal clock source (Create 1kHz source.vi) to drive the 3 Timed Sequences & used Synchronize Timed Structure Starts.vi  to synch the sequence executions. I could get pulse widths down to 20ms.

    I'm curious how low I could go (it's kind of amazing that SW-timed can let me do this, I believe the 1kHz source is generated directly by the CPU, so perhaps it does not have to go thru the Windows OS to get to the 6514 board ? Ultimately I can't go shorter than the 1kHz source (1ms). There's a 1MHz clock option too - could I use that ?

Thanks,
ak

0 Kudos
Message 3 of 4
(3,423 Views)
ak,

Actually, the 1kHz source is generated by the operating system (in this case, Windows), and as such isn't a "hard" timing source that can be trusted to be deterministic.  The 6514 doesn't have any hardware timing on it (many of our other DAQ boards do, such at the M-series), so your timing performance is entirely dependent on your system.  The Timed Loops are definitely your best option in this scenario.

The 1MHz clock option is only available on the LabVIEW Real-Time operating system, which IS a CPU-generated clock that is passed through by the operating system. 
--Paul Mandeltort
Automotive and Industrial Communications Product Marketing
0 Kudos
Message 4 of 4
(3,412 Views)