See the properties of your daq by typing its device name in command line. See how the channels are called and which types you have. you have to use the digital output code d = daq("ni"); addoutput(d,"Dev1","Port0/Line0","Digital") For example. But you can use also port 1 and other lines. It depends. Use the ni max software to test the channel. In that software you can also find a help to properly configure the output and know which gpio to use.