Jump to content
  • 0

Unable to use USB-2523 with UL & Python


mwyerman_tfc

Question

I am trying to use a USB-2523 with the UL and Python, and am unable to use the analog input or digital io. According to the UL documentation here: https://www.mccdaq.com/pdfs/manuals/Mcculw_WebHelp/ULStart.htm (under Hardware Reference -> Analog Input Hardware ->  USB-2500 Series), it says that this device should support analog input through the UL.

When I connect to the device in python, the supports_analog_input and supports_digital_io properties both return false. Additionally, when I try to do anything with the analog input or digital io, it just returns an error.

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

  • 0

I downloaded those examples and ran them, but I am still having issues with the USB-2523. I plugged it in, but the program says no devices found (see output below). The USB-2523 shows up in Instacal and works correctly in TracerDAQ, so this doesn't seem to be an issue with how the daq or how it is connected.

> python .\examples\console\digital_out.py

Error: No DAQ devices found

If I unplug the USB-2523 and plug in a USB-1408FS I have lying around, that works fine. For example, the output from a_in_scan_foreground.py:

> python .\examples\console\a_in_scan_foreground.py
Found 1 DAQ device(s):
  USB-1408FS (1B902F6) - Device ID = 161

Active DAQ device: USB-1408FS (1B902F6)

Scan completed successfully. Data:
Index       CH0       CH1       CH2       CH3
    0     0.000     0.000     0.000     0.000
    1    -0.002    -0.002    -0.002    -0.002
    2     0.000    -0.002     0.000    -0.002
    3     0.000     0.000     0.000     0.000
    4     0.000     0.000     0.000    -0.002
    5    -0.002     0.000    -0.002     0.000
    6    -0.002     0.000    -0.002     0.000
    7     0.000     0.000     0.000     0.000
    8    -0.002     0.000     0.000    -0.002
    9     0.000    -0.002    -0.002     0.000

 

As a test, I made a couple small modifications to the a_in_scan_foreground.py example to use Instacal instead of the UL device detection.

try: # line  49
  # commenting out device_detection to use board 0 from instacal instead
  # if use_device_detection:
  #     config_first_detected_device(board_num, dev_id_list)

  daq_dev_info = DaqDeviceInfo(board_num)

  # print device name and whether it supports analog input
  print("Device product number: ", daq_dev_info.product_name)
  print("Supports analog:", daq_dev_info.supports_analog_input)
  
  if not daq_dev_info.supports_analog_input:
    raise Exception('Error: The DAQ device does not support '
    'analog input')
  return   # adding a return here to end the program before measuring

When I run that with each device plugged in, I get the following outputs:

> python .\examples\console\a_in_scan_foreground.py
Device product number:  USB-1408FS
Supports analog: True
> python .\examples\console\a_in_scan_foreground.py
Device product number:  USB-2523
Supports analog: False

 Error: The DAQ device does not support analog input

Is there something else I need to set up to get the analog input working with the USB-2523?

Link to comment
Share on other sites

  • 0

Here's the output from that file:

> python .\a_in_scan_usb-2500.py
No devices detected

I know that program is explicitly ignoring Instacal, but just to show that its plugged in, here's what InstaCal looked like before I ran that file:

image.png.623607fc9b6be35fe2a2f45c7ab3e684.png

Are there any idea's why the device isn't being detected in Python?

Link to comment
Share on other sites

  • 0

This is not making sense. The device discovery thinks that nothing is plugged into the USB port, yet InstaCal finds it and TracerDAQ works. 

I believe your company has another USB-2523 (s/n 400237), is it available to try? 

Lastly, what is the installed version of InstaCal?

Link to comment
Share on other sites

  • 0

We do have that one available, I just tried it and it had the same behavior: shows up fine in InstaCal but the python script says no devices found.

 

Edit: Forgot to include the InstaCal version, it is 6.73.

Edited by mwyerman_tfc
Forgot to include the InstaCal version
Link to comment
Share on other sites

  • 0

The path output on your image indicates you put it into \Users\Admin\Downloads\. Copy it into your Documents folder and run it using the Run As Administrator option.  You may get a warning such as:

Microsoft Defender SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.

More info

Click More Info and press the button Run Anyway.

 

Link to comment
Share on other sites

  • 0

That code still says "No devices detected". As a test, I added a statement to print dev_list immediately after the get_daq_device_inventory call, and it just gave an empty list. And just to make sure everything is still connected properly, I was able to run the C# program from earlier and that still found the device and ran correctly. Do you have any other ideas?

Thanks!

Max

Link to comment
Share on other sites

  • 0

There is something odd about your USB-2523 boards. I want to get one or both of them to verify the problem and, if necessary, sent it to the factory for repair. Unfortunately, the repair process takes about four weeks, so it is not a quick solution. Let me know if you're open to this.

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