You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
This example shows how to create a square wave output on the GCPTR0 line of a National Instruments data acquisition card using only direct DLL calls to the NIDAQ DLL.
With DLL calls, you can use features that are not directly accessible from MATLAB or the Data Acquisition Toolbox. The same technique can be adapted for other tasks such as reading counters, creating pulses, or general data acquisition.
For more examples, look at any of the C files typically found in the folder
C:\Program Files\National Instruments\NI-DAQ\Examples\VisualC
Any of those programs can be adapted to run in MATLAB using DLL calls.
The original purpose of SQUAREWAVE was to generate a clock signal for a bank of anti-alias filters, but it also provides a useful example of the general approach.
This submission complements, and was made possible by, Scott Hirsch's excellent http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=2890&objectType=file (Counter Example).
Chris Ruckman (cruckman@vssl.com)
Cite As
Christopher Ruckman (2026). squareWave (https://se.mathworks.com/matlabcentral/fileexchange/7216-squarewave), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (13.4 KB)
-
No License
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
