Jump to content
  • 0

Replacing DT9801 with USB-1808X


PhilipW

Question

Hello Fausto,

Back in January it was announced that the DT9801 was discontinued. I exchanged some emails with you and based on my requirements I selected and purchased a USB-1808X for development.

With the DT9801/Open Layers library my application can simultaneously use three analog input channels to read voltages and one digital input to count pulses from an encoder. As well, the application will send a value using the digital output when a condition within the application is met.

Using the USB-1808X/Universal library I’ve been able to use three analog input channels and one digital input working simultaneously using DaqInScan(). Digital output uses DOut(). I used your example programs to write my code; ULDO01 uses DOut() and DaqInScan02 uses DaqInScan() to collect data points in continuous, background mode.

The technical documentation for the USB-1808X states there 8 analog inputs, 4 digital I/O and 2 counter inputs.

When I run your example application DaqInScan02, the following code from the application finds 8 analog channels, 2 counters but only 1 digital port

            // determine the number of analog channels and their capabilities

            ChannelType = clsAnalogIO.ANALOGDAQIN;

            NumAIChans = AIOProps.FindAnalogChansOfType(DaqBoard, ChannelType, out ADResolution, out Range, out LowChan, out DefaultTrig);

            // determine the number of digital ports, their capabilities, etc

            ChannelType = clsDigitalIO.PORTINSCAN;

            NumPorts = DIOProps.FindPortsOfType(DaqBoard, ChannelType, out ProgAbility, out PortNum, out NumBits, out FirstBit);

            // determine the number of counters, their capabilities, etc

            ChannelType = clsCounters.CTRSCAN;

            NumCtrs = CTRProps.FindCountersOfType(DaqBoard, ChannelType, out CounterNum);

 

I was expecting 4 digital ports. Can you explain the digital I/O discrepancy?

 

Regards,

Philip

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @PhilipW.

The MCC USB-1808X has one digital port which consists of four configurable bits.  However, when scanning, the entire port must be configured as either inputs or outputs.  You mentioned needing both digital inputs and digital outputs.  If you need to send a digital output pulse, while scanning the analog input channels and digital input port, then use one of the Timer output channels.

USB-1808X User's Guide:  https://www.mccdaq.com/pdfs/manuals/USB-1808X.pdf

Universal Library Help:  https://www.mccdaq.com/pdfs/manuals/Mcculw_WebHelp/ULStart.htm

image.png

Regards,

Fausto

 

Link to comment
Share on other sites

  • 0

Hi Fausto,

You indicated that I could use a Timer Output instead of a Digital Output. How?

Here is my code for the Digital Output:

                    ushort DataValue = 255;  // numeric value to send to digital output
                    MccDaq.ErrorInfo uLStat = daqBoard.DOut(PortOutputNum, DataValue);

                    if (uLStat.Value != MccDaq.ErrorInfo.ErrorCode.NoErrors)
                    {
                        ...
                    }
                    
                    My code is based on your example program ULDO01 which uses DOut().

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...