Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate and synchronize 6 digital channels with differents phases/frequencies/duty cycles/...

 
 
Hello,
 
For some kind of tests we need to generate, with a 6534 card, 6 signals.
The 6534 has 32 digital E/S and can go up to 20MB/s !
 
Each channel must be independant so that it can have it's own frequency and duty cycle. But for exemple the second channel can be delayed in reference at first channel. I put an image so that you can understand better what i try to do (3 signals are shown but six are needed).
 
I see a lot of things on forum that are close to my probleme, but none seems to be as advanced as mine.
[Example removed] -> 6534 doesn't have timers
I contacted NI support, they send me an exemple on "patterns" but it generates frequencies that are multiple of one with no phase consideration or duty cycle.
 
Any idea ?
 
Thanks in advance for your advice and help.
 
Eric.
 

Message Edité par Eric31 le 08-10-2007 06:52 AM

Message Edité par Eric31 le 08-10-2007 06:55 AM

0 Kudos
Message 1 of 4
(4,114 Views)
At best, that's gonna be a pain in the neck with that board.  If you need very precise timing for freqs, duty cycles and offsets, it gets worse.  If they need to change on-the-fly, it'll be near-impossible.
 
1. You can only operate 1 hw-timed digital output task at a time.  So all 6 signals must be part of that 1 task.
2. Thus, you need to define an output buffer representing the states of those 6 bits throughout your entire generation.
3. There's a bunch of greatest common factor and least common multiple stuff needed to figure out the right output rate and buffer size, assuming you'll want to regenerate repetitively.  You first need the gcf of all the transition times to come up with the right output rate since all the transitions need to occur on some integer multiple of the output period.   You'll then need the lcm of the 6 signals' periods, combined with the output rate, to size up a buffer that can be regenerated.
4. Forming the output data array may be quite complex.   Personally, I always do my stuff with raw arrays and I know that interleaving all those signals can be quite tricky, especially if there may be an occasional simultaneous transition.   However, I suppose there's a chance that some of the digital waveform functions *might* make this step a bit simpler.  I just haven't played around with that format much.
 
Editorial opinion: Buy a 6602.  You can trigger 6 counters to start with different initial phasing, and will be able to change freq & duty cycle on-the-fly for each one independently.
 
Editorial opinion #2: For higher channel count apps, I'd also recommend checking out the DIO-64 board put out by Viewpoint Systems, an NI Alliance partner.  It gives you much smarter hardware-timed DIO.  With the NI board, there can be huge amounts of redundant info in the DO buffer.  If you find that your GCF is 10 microsec, but the time between consecutive transitions is 10 millisec, you'll have to stuff 1000 identical values into your output buffer.   With Viewpoint's board, your data acq buffer *only* contains data at the transition times.  Timing is controlled by delivering a separate array defining the timestamps that correspond to those transitions.
 
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 4
(4,103 Views)
Thanks for your answer.
I also think that forming the output array could be a solution but for 6 channels it could become unmanageable !
I'm really interested in the 6602 card that is not as expensive as the DIO-64 board, but i'm going to investigate all possibilities before to buy a new card. But it seems to be the easiest/fastest solution.
0 Kudos
Message 3 of 4
(4,081 Views)

Yeah, if you only need 6 outputs, I'd definitely recommend a counter/timer board like the 6602 or perhaps the 6624.  Personally, I've only used the 6602.  It appears that the 6624 is generally similar but with more robust capability for higher voltage interfaces. 

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 4
(4,065 Views)