Jump to content

Leo Wolscht

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Leo Wolscht

  1. Hey John

    Thanks for the quick response. I am quite confident that I included mcc134 in the import statement as you can see in the first quote in my question. I simply exchanged mcc118 with mcc134 in the "from daqhats import ..." line.

    I also tried the examples for mcc134 on https://github.com/mccdaq/daqhats/tree/master/examples/python/mcc134 with the same error message.

    Next step is to try call sudo "daqhats_read_eeproms" and "daqhats_list_boards" to reassign the addresses.

    If you have any other idea, please let me know.

    Cheers,

    Leo

  2. Hi

    I am connecting my MCC134 to a Raspberry and started by running your example code from github. All I did was exchange the mcc118 to mcc134 and added a printout line for the board_list.

    the hat_list finds my MCC134 but the initialization of the mcc134 object at address 0 raises an HatError: Addr 0: Invalid board type.

    What am I missing?

    Quote

    import sys

    from daqhats import hat_list, HatIDs, mcc134

     

    # get hat list of MCC daqhat boards

    board_list = hat_list(filter_by_id = HatIDs.ANY)

    if not board_list:

    print("No boards found")

    sys.exit()

    print(board_list)

     

    # Read and display every channel

    for entry in board_list:

    if entry.id == HatIDs.MCC_134:

    print("Board {}: MCC 134".format(entry.address))

    board = mcc134(entry.address)

    for channel in range(board.info().NUM_AI_CHANNELS):

    value = board.a_in_read(channel)

    print("Ch {0}: {1:.3f}".format(channel, value))

    Quote

    [HatInfo(address=0, id=323, version=1, product_name='MCC 134 Thermocouple Input HAT')]
    Board 0: MCC 134
    Traceback (most recent call last):
      File "/home/cross-ing/Zehnder/Code/daqhat_test.py", line 21, in <module>
        board = mcc134(entry.address)
      File "/usr/local/lib/python3.9/dist-packages/daqhats/mcc134.py", line 119, in __init__
        raise HatError(self._address, "Invalid board type.")
    daqhats.hats.HatError: Addr 0: Invalid board type.

     

×
×
  • Create New...