Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

6602 Synchronize 4 outputs by matlab

Hello,

 

I am trying to use PCI-6602 counters to generate 4 pulses that start together. The width of these 4 pulses are ms level. However, the delay between channels is ms level too. So how to synchronize trigger the start and stop of 4 channels (with different duty cycle) by matlab?  

 

I tried to use an external signal to trigger 4 channels together buy using 'addTriggerConnection', 'External' as source. But it didn't work. Matlab said Trigger and clock connections will not affect counter output channels.

 

And how to connect wires?

 

Thanks. 

0 Kudos
Message 1 of 6
(6,106 Views)

Hi Lindsay,

 

If you are using the MATLAB® Data Acquisition Toolbox™ to program the PCI-6602, please contact the MathWorks support team since they will be better suited to answer MATLAB programming questions.

 

To accomplish this in LabVIEW and our NI-DAQmx driver, you can use the information in these documents:

 

Using a Digital I/O Line as the Start Trigger with a PCI-6602 (you don't have to wire any external lines)

http://digital.ni.com/public.nsf/allkb/9052D691C228A56686256CFB00611D0D

 

Timing and Synchronization Features of NI-DAQmx (If you want to use an external line, take a look at Figure 4)

http://www.ni.com/white-paper/4322/en/

 

MATLAB® and Data Acquisition Toolbox™ is a registered trademark of The MathWorks, Inc.

 

Sincerely,

 

Aldo A
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(6,073 Views)

In PCI-6602 manual, this DAQboard output channel can be triggered by both internal signal and external signal. Is the internal signal means output of the other channel in the same board? If so, how can I connect them? Do I need to connect trigger channel's OUT pin with the other channels' GATE pin or they are already connectted inside the board?

 

Thanks

0 Kudos
Message 3 of 6
(6,037 Views)

The internal outputs of the counters are routable without external wiring.  The name of these terminals are:

 

/DevX/CtrYInternalOutput

 

Where "DevX" is your device name and "Y" is the counter you are using.  Counters 0-3 and counters 4-7 are grouped on the board itself, routing between these groupings must use the trigger bus.

 

 

Having said that, the 6602 is certainly capable of using an external trigger as a start trigger for your counter output tasks.

 

 

I have not used the Data Acquisition Toolbox so I can't comment on how one might do any of this through that API.

 

 

Best Regards,

John Passiak
0 Kudos
Message 4 of 6
(6,031 Views)

Thank you John,

 

For example, I want to use counter 4 as internal trigger for counters 0-3. Do you mean I need to use the trigger bus to connect them? And for trigger bus, do you mean RTSI bus?

 

Thanks,

0 Kudos
Message 5 of 6
(6,026 Views)

The driver does the routing for you, it only becomes an issue if you don't have any suitable lines available.  You can see which lines are used exactly in the MAX routing table by shift-clicking on the yellow box in the routing table (although, this just shows one possible route and doesn't tell you if there are other alternatives):

 

NI PCI-6602 Dev11 - Measurement & Automation Explorer_2014-04-16_14-23-42.png

 

 

 

Best Regards,

John Passiak
0 Kudos
Message 6 of 6
(6,024 Views)