08-26-2008 03:36 AM
Dear all,
i'm trying to do some register level programming for a PCI-6602 card. I need to generate three synchronized PWM-Signals with variable duty-cycle which look somehow like this:
1. Channel
0____1------2-------3____4
2. Channel
_______----------_______
3. Channel
_________------________
( _ low; - high, 0-4 time)
A period T is defined from 0 to 4, half the period from 0 to 2, from 0 to 1 the counter should count down and toggle the output-pin at 1, the same should be done from 2 to 3. These definition might sound funny, but if used for every channel, they guarantee minimised switching losses for the converter. From 1 to 2 and from 3 to 4 the counter should keep the current state.
Now I would like to ask the following questions:
1. Is it possible to synchronize the three counters ? The counters need to start at the same time. How do I have to configure the counters to achieve this ? Is it enough to choose the same "Selected Source" ?
2. In the 660x Register-Level Programmer Manual there is some talk about four available load registers. Load A and Load B in two X and Y bank cells. What is the sequence, in which the values stored in the register are loaded into the counter ?
3. How do I access the registers ? The Register Maps-Chapter tells me about four Load A Registers, since there are 8 counters, shouldn't there be at least 16 Load A Registers (two X and Y bank cells) ?
4. At 4 I need to trigger an AD-Conversion ? Can you recommand me an PCI-DAQ-Card, which is able share the trigger via the RTSI bus ?
Thanks a lot,
Nico
08-28-2008 10:13 AM
Hi Nico,
I did not really get your point, what you want to implement, but I try to answer some of questions:
to 1.)
==> This is possible. You have to use the Arm Start Trigger of the DAQmx - Trigger property node. (see manual "NI 660x User Manual")
to 2.) and 3.)
==> As far as I know register level programming is not supported by NI. You should use the DAQ driver.
to 4.) Please have a look at ni.com
Furthermore there are links that might be interesting for you:
"Which Devices Support Arm Start Triggering?"
http://digital.ni.com/public.nsf/allkb/A00D601140D0F8EC86256F8D007C53F9?OpenDocument
"Pulse Train Generation with Changing Pulse Specs (PWM)"
http://zone.ni.com/devzone/cda/epd/p/id/1170
"Generating a Pulse Train with a Counter"
http://zone.ni.com/devzone/cda/tut/p/id/2760
If you do not want to start the three PWM signals with the rising edge at the same time, then you should better use a device which supports Correlated DIO.
Regards,
Torben