Jump to content
  • 0

LED turns off shortly after plugging in OM-USB-1208FS then .py ANALOG calls hang until re-plug



I am bringing some old test fixtures back to life which were based on the OM-USB-1208FS. We are using the python implementation of mcculw. The DAQ I am using for development works fine in all cases when I test it using Instacal but I am having a hard time getting my python script to run as reliably. I noticed that when i plug the DAQ in the indication LED blinks briefly, stays lit for 6 seconds or so then turns off completely. If I plug in the daq and start my script at the right time (while the LED is constant lit), everything runs perfectly. If I wait until the LED turns OFF, then run my script, the DAQ LED will start blinking and can handle any calls to digital IO but any calls to any DAQ analog inputs will hang the application (DAQ will stay blinking forever) and it seems an unplug/replug will be required.


I need this test tool to be reliable enough for someone who cant see the LED to use. Can anyone offer any advice? Code which works depending on LED status when starting shown below:


from __future__ import absolute_import, division, print_function
from builtins import *  # @UnusedWildImport

from mcculw import ul
from mcculw.enums import DigitalIODirection
from mcculw.device_info import DaqDeviceInfo

from mcculw.enums import InterfaceType
from mcculw import enums

use_device_detection = True
dev_id_list = [130]
board_num = 0

ai_range = enums.ULRange.BIP10VOLTS

#Copied from console examples folder
def config_first_detected_device(board_num, dev_id_list=None):
    """Adds the first available device to the UL.  If a types_list is specified,
    the first available device in the types list will be add to the UL.

    board_num : int
        The board number to assign to the board when configuring the device.

    dev_id_list : list[int], optional
        A list of product IDs used to filter the results. Default is None.
        See UL documentation for device IDs.
    devices = ul.get_daq_device_inventory(InterfaceType.ANY)
    if not devices:
        raise Exception('Error: No DAQ devices found')

    print('Found', len(devices), 'DAQ device(s):')
    for device in devices:
        print('  ', device.product_name, ' (', device.unique_id, ') - ',
              'Device ID = ', device.product_id, sep='')

    device = devices[0]
    if dev_id_list:
        device = next((device for device in devices
                       if device.product_id in dev_id_list), None)
        if not device:
            err_str = 'Error: No DAQ device found in device ID list: '
            err_str += ','.join(str(dev_id) for dev_id in dev_id_list)
            raise Exception(err_str)

    # Add the first DAQ device to the UL with the specified board number
    ul.create_daq_device(board_num, device)
def get_inputs():
    global board_num
    global ai_range
    input_buffer = []    
    for i in range(5):
        #value = ul.a_in(board_num, i, ai_range)
        value = ul.v_in(board_num, i, ai_range)
        # Convert the raw value to engineering units
        #input_buffer.append(ul.to_eng_units(board_num, ai_range, value))
        print("DEBUG: input "+str(i)+" = "+str(value))
    print("DEBUG: inputs = "+str(input_buffer))
    return input_buffer
    if use_device_detection:
        config_first_detected_device(board_num, dev_id_list)
    daq_dev_info = DaqDeviceInfo(board_num)
    dio_info = daq_dev_info.get_dio_info()
    print('\nActive DAQ device: ', daq_dev_info.product_name, ' (', daq_dev_info.unique_id, ')\n', sep='')
    if not daq_dev_info.supports_analog_input:
            raise Exception('Error: The DAQ device does not support '
                            'analog input')           
    ai_info = daq_dev_info.get_ai_info()

    #ensure in single ended mode:
    ul.a_input_mode(board_num, enums.AnalogInputMode.SINGLE_ENDED)    
except Exception as e:
    print('\n', e)
    if use_device_detection:


Edited by Pizzaguy
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello @Pizzaguy.

I ran your code in IDLE and it produced an output.



With the USB-1208FS connected to the target Windows system, did you run the HID Registry Update utility, when you launched InstaCal?



Cycle the USB cable connection after completing the update and before launching InstaCal.

Any issues running the other MCC Python examples in 'C:\Users\Public\Documents\Measurement Computing\DAQ\Python\examples\console'?



Link to comment
Share on other sites

  • 0


I did run the HID Registry Update utility but that doesn't stop the popup from showing up every time I open instacal (perhaps that is a clue?). I did have a number of minor issues running the examples for analog calls specifically but i dont know if those are timing issues with the connection or not. I'm starting to wonder if I have a Hardware failure on this particular DAQ. 

If you plug in your USB-1208FS (which i assume is effectively the same as OM-USB-1208FS?) and just let it sit there, does the indication LED stay lit for 10 seconds or longer?

If so, I think that's more evidence to suggest that I have an issue with my DAQ. If the LED does go out, can you still run that script? (when i let the LED go out after 6 seconds, I cant run this script and have it work, If i start the script during that 6 seconds when the LED is lit, i see the same output you do)


I have an extra USB-1208FS-Plus and it runs this script just fine every time so now I need to evaluate if we need to switch out all our OM-USB-1208FS' for USB-1208FS-Plus'

Link to comment
Share on other sites

  • 0

Hello @Pizzaguy.

Which versions of InstaCal and Windows are you using?

The USB-1208FS and OM-USB-1208FS were EOL'd in 2022, so I would suggest the USB-1208FS-Plus, since the USB-1208FS and OM-USB-1208FS modules are not serviceable.

After running the HID Registry Update utility and verifying detection of the module in InstaCal, the module's LED does remain on after cycling the USB cable connection to the module.

If you haven't already, swap the USB cable and/or USB port on the host system, in case there's a connection issue.



Link to comment
Share on other sites

  • 0

Just for anyone who may read this in the future:
I am running Windows 10 (no pending updates as of 11-2-2023) and instacal 6.47


My conclusion: This is either an issue specific to my device OR specific to the EoL-ed OM-USB-1208FS and as such, I am just going to update to newer hardware (USB-1208FS-Plus)

Thank you very much for your assistance Fausto! One of our options was to spin our own hardware interface but I told the team there is no reason to switch away from MCC products unless forum support becomes un-responsive or python support is discontinued. Keep up the good work!

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