NI9401 Pulse Generation and Digital Output same time
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")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") 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") daq, matlab MATLAB Answers — New Questions