필터 지우기
필터 지우기

NI9401 Pulse Generation and Digital Output same time

조회 수: 13 (최근 30일)
Tugrul Öztürk
Tugrul Öztürk 2023년 3월 18일
댓글: Pietro Mele 2024년 7월 5일
Hey all,
I want to drive a stepper controller (TRINAMICS) using the NI 9401. I know that NI 9401 is capable of generating pulse which can be used for the "CLK" resp. "STEP" signal for the stepper controller. Beside the CLK signal I also have to provide digital signals for "DIR" (direction) and "EN" (enable). Is it possible to generate pulsed signal and "constant" digital output signals same time using the NI 9401 ?
My recent approach is attached below, which is not working.
Thank you !
close all;
clear;
clc;
devID_NI9401="cDAQ1Mod1";
daqObj=daq('ni');
chCLK=addoutput(daqObj,devID_NI9401,"ctr0","PulseGeneration");
chCLK.Frequency = 1000;
chCLK.DutyCycle = 0.5;
chDO=addoutput(daqObj,devID_NI9401,"port0/line2","Digital");
write(daqObj,ones(500,1));
start(daqObj,"continuous")
  댓글 수: 2
Pooja Kumari
Pooja Kumari 2023년 8월 28일
What is the error you were facing?
Pietro Mele
Pietro Mele 2024년 7월 5일
Hi @Tugrul Öztürk did you finally solved the problem? I'm currently facing the same issue, emoploying the NI 9401 for controlling a step motor with Simulink. Is it possible to use multiple ports for DO ?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Pulse and Transition Metrics에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by