Jump to content

Jen

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Jen

  1. Hello JRys, Thank you for your help. The matlab code provided in the 50779 support example with a small modification works now to set a digital output. I added two lines of code to that example in order to set DIO0 to an output and to a high value: daq.DConfigBit(MccDaq.DigitalPortType.AuxPort, 0, MccDaq.DigitalPortDirection.DigitalOut); daq.DBitOut(MccDaq.DigitalPortType.AuxPort, 0, MccDaq.DigitalLogicState.High); The main confusion was what to set the DigitalPortType to and thank you for telling me that it was AuxPort. Another big confusion was that I did not know what was meant by Port or Bit. As far as I understand now Port means all the digital IOs together and Bit means just one of the digital IOs specifically. Thank you again.
  2. I would like to control the digital inputs and outputs of a USB-201 in MATLAB using the Universal library for .NET. I have seen the code provided in https://kb.mccdaq.com/KnowledgebaseArticle50779.aspx and am trying to add to it. I would like to use DConfigPort and DOut commands for example but am mystified by the parameter MccDaq.DigitalPortType. When I click on the options for that parameter in the UL library Help reference I get descriptions about options like FirstPortA, FirstPortB etc. This language of ports is totally unfamiliar to me. All I know for a USB-201 is that I have DIO0 to DIO7. Could someone please tell me how to specify which DIO I would like to configure and talk to? Better yet could someone please give me example code like in the above article for MATLAB that would say for example set DIO0 as an output and set its signal to high?
×
×
  • Create New...