Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I Controll Digital I/O through Matlab?

I have used USB-6501 digital I/O.

Because I want to treat VNA, RF Switch, Digital I/O in one tool, I selected Matlab.

The other things are completed, but I want to know how to controll digital i/o through Matlab.

I already checked that my device is connected well through daqmx and matlab.

But, I want to know how to make each digital pins on/off.

For example, make P0.0 and P0.1 on, and after 3 seconds, make P.0.0 off, and after, P0.1 off like this.

Could you help me anyone?

0 Kudos
Message 1 of 6
(309 Views)

You can do it from software but are limited to the timing accuracy of calling the driver to change the hardware output state.

 

Advanced DAQs (not 6501) that support hardware timed Digital Output where you can define these transitions with high resolution and the hardware can do it with high accuracy.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 6
(285 Views)

Always I appreciate with your kind response. Maybe, I will not request precise timing, so I think some problem don't matter.
However, I want to ask you something more.

There is digital pin, +5V Vdd, gnd in USB-6501.

Can I use digital pin for supplying operating voltage? not +5V vdd.

Would it makes some problem about electric power?

0 Kudos
Message 3 of 6
(275 Views)

A digital pin has a limited amount of current it can drive. Your 6501 device allows to drive 8.5 mA on its digital output pins (but can go as low as 2V when loaded with such a current). So if you want to drive anything substantial, you should not try to abuse a digital output as power pin. In the best case it won't work, in the worst case you damage your device.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 6
(257 Views)

@junhong0708 wrote:

Always I appreciate with your kind response. Maybe, I will not request precise timing, so I think some problem don't matter.
However, I want to ask you something more.

There is digital pin, +5V Vdd, gnd in USB-6501.

Can I use digital pin for supplying operating voltage? not +5V vdd.

Would it makes some problem about electric power?


Why and what do you plan to do by using the digital pin?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 5 of 6
(245 Views)

Hello,

 

The hardware you are interacting with determines this. The most widely used techniques make use of data acquisition devices.

 

Here I am sharing a basic example to control digital I/O using DAQ device:

 

matlab.png

 

You can also follow this link for more information in details: https://www.mathworks.com/help/daq/servicenow training-digital-input-and-output.html

0 Kudos
Message 6 of 6
(7 Views)