Support of NI PCI 6602 for Simulink
Show older comments
Hi,
I want to use the NI PCI 6602 for a simple function, which is to convert Simulink analog signals into standard PWM signals. I am not sure if this is feasible. Additionally, is generating PWM signals through the NI PCI 6602 faster than using an Arduino, since there is no additional data conversion process?
Answers (2)
dpb
on 25 May 2026
0 votes
See <NI DAQMX Hardware Support> which lists the NI PCI-6602 as supported. You'll need the Data Acq Toolbox or the legacy drivers.
1 Comment
Walter Roberson
on 25 May 2026
The input modes supported for the 6602 are: Digital, EdgeCount, PulseWidth, Frequency, Position
The output modes supported are: Digital, PulseGeneration
It is not immediately clear to me that PulseGeneration includes Pulse Width
tianyuan wang
on 26 May 2026
Edited: tianyuan wang
on 26 May 2026
0 votes
3 Comments
I don't know Simulink nor the particular NI device, but I can't imagine it doesn't have the ability to control the pulse width; would seem pretty useless without. So, I asked an AI 'bot and got the following...
Yes, you can generate a hardware-timed PWM output using the NI 6602 in Simulink. To achieve this, you need to use the physical device's built-in counters, which requires the MATLAB Data Acquisition Toolbox or the legacy xPC Target/Simulink Real-Time blocks.
Step-by-Step Implementation:
- Define the Counter Task: In Simulink, use a Counter Output block configured for Pulse Width or Frequency Generation.
- Assign Physical Pins: Route the counter output signal to a physical PFI (Programmable Function Interface) pin on your NI 6602 breakout box to send the signal to your hardware.
- Control from Simulink: Pass your Simulink duty cycle or frequency signal (as a value between 0 and 1) to the DAQ block. The NI 6602 hardware handles the high-frequency clock generation, ensuring stable PWM without overloading your computer's CPU.
Important Considerations:
- Simulink Compatibility: Because the NI 6602 uses traditional DAQmx or legacy drivers, verify that your version of MATLAB natively supports your specific OS and hardware via the Data Acquisition Toolbox Support Package for National Instruments NI-DAQmx Devices.
- Software vs. Hardware Timing: Avoid generating PWM using standard digital output (DIO) and pure software timing. Software-timed solutions run at the mercy of the operating system's execution loop, causing jitter. Using the NI 6602's hardware counters ensures microsecond-level precision.
This NI device is quite old (introduced Jan,1999) so you may have issues if using recent MATLAB/Simulink release with having to find legacy tools to implement with...will need to read the details in the NI user's manual to learn how to use the device in detail.
tianyuan wang
on 26 May 2026
Edited: tianyuan wang
on 26 May 2026
dpb
on 26 May 2026
I've never even seen a Simulink installation so I know absolutely nothing about it; I'm just searching the NI links can find for the particular device.
There's also the <NI DAQMX Hardware Support> link which is the one that lists the 6602 under PCI devices. It claims it's compatible with R2017 on.
Again relying on the AI 'bot, it says that after everything needed is installed that there should be a set of NI-DAQmx blocks in the Data Acquisition Toolbox library browser. If you don't see that, may need to contact official support on how to finish an installation to use it.
Categories
Find more on Texas Instruments C2000 Processors in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!