Python – MCC USB-1208FS-Plus

Using Python to see connection and simple measurement using MCC’s USB-1208FS-Plus

Presentation

Python code text see in console result

# -*- coding: utf-8 -*-
"""
Created on Thu Apr 13 08:52:18 2023

@author: aleja
"""

from mcculw import ul
from mcculw.enums import ULRange
from mcculw.ul import ULError
import time


board_num=0
channel=0
ai_range=ULRange.BIP10VOLTS
try:
   for i in range (10): 
    my_value=ul.a_in(board_num,channel,ai_range)
    eng_units_value=ul.to_eng_units(board_num,ai_range,my_value)
#    print("Raw Value;"+str(my_value))
    print("Eng Value:"+'{:0.3f}'.format(eng_units_value))
    time.sleep(0.1)
except ULError as e:
    print("A message from UL code:" +str(e.errorcode)+"msg:" + str(e.message)) 
    

Down of simple measurement to see on console

Notes

  • Presentation: Python and MCC DAQ 1208FS-Plus
  • MCC, Measurement Computing Corp is own by NI (previously know as National Instruments)
  • Programming Language used: Python 3.7 in Spyder
  • Presentation app: Microsoft’s PowerPoint
  • Python of respective company
  • Presentation shown to spark ideas of use.
  • This presentation is not connected to or endorsed by any company.
  • Use at your own risk.
  • Tags: MCC DAQ USB-1208FS-Plus, MCC,Python, MCCULW for python,PIP
  • Future possibilities: Making a Python Tkinter to show readings
  • DaqDevDiscovery01 example form MCC github code (see presentation)

About LV_TS_Test_Engineer_3000_VI

Automated Test Equipment Software
This entry was posted in Test Sector and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s