Jump to content
  • 0

USB-1808 questions





I am trying to measure thickness of the hollow disc, so that use usb-1808 with 2 analog channels and 2 rotary encoders.

I try to find out of encoder input test in the Instacal but there is no encoder test menu in usb-1808.

And I used function(cbCConfigScan, cbAInScan), but an error occured.

There was no error in other devices, but an error occurred in usb-1808.


err = cbCConfigScan(vSet.board, ch, BIT_32,

I used this command on USB-QUAD08 and no error occurred, but when I used this command on USB-1808, an error occurred.(error code 137)


int rate = 1800;

err = cbAInScan(vSet.board, 0, 7, 2880000, &rate, vSet.inrange, ScanBuff, BACKGROUND | CONTINUOUS);

I used this command on USB-1608G and no error occurred, but when I used this command on USB-1808, an error occurred.(error code 35)



Would you let me know how to catch the encoder signal?

Your kind advice would be appreciated.


Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @hello.

MCC's InstaCal utility software does not have a test for the encoder channels.

A helpful resource when programming with MCC's Universal Library API is the Universal Library Help.


USB-1808X User's Guide:  https://files.digilent.com/manuals/USB-1808X.pdf

The USB-1808 Series supports two encoder channels, which are counter numbers 2 and 3.  Please verify the specified channel in your code.



The Help also has a list of error codes.  Error 137 refers to an invalid counter mode for the USB-1808X, even though it was valid for the USB-QUAD08.



If you are intending to use an encoder channel, on the USB-1808X, then the third parameter (mode) in cbCConfigScan() should not be 'BIT_32'.  The supported modes are listed in the Help.



Next, the cbAInScan() function is for the eight analog input channels and is supported.  Error code 35 refers to an invalid pointer.  Please check your code.



By installing the MCCDAQ software, the Universal Library API examples are copied to the Windows folder 'C:\Users\Public\Documents\Measurement Computing\DAQ'.  Take a look at the 'CInScan03' example.



Additionally, the following VB.NET zip link contains various USB-1808 examples, which includes an 'EncoderScanMode' example.





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...