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)