03-13-2024 01:10 AM
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?
03-13-2024 09:32 AM
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.
03-14-2024 01:06 AM
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?
03-14-2024 06:08 AM - edited 03-14-2024 06:09 AM
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.
03-14-2024 09:02 AM
@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?
05-07-2024 02:27 AM
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:
You can also follow this link for more information in details: https://www.mathworks.com/help/daq/servicenow training-digital-input-and-output.html