Hi I'm trying to write a program in python that takes in the input from the DIO port B0(pin 32), when I do this it gives me an error.
Below is the Pinout for the MC USB-1024LS DAQ device.
I downloaded the MCCULW package(v1.0.0) using pip from the MCCDAQ GitHub.
These are the packages I imported;
When I configure the port as PORT A with Pin A0 (pin 21), it works alright [port_name = DigitalPortType.FIRSTPORTA], but as soon as I configure the port as PORT B[port_name = DigitalPortType.FIRSTPORTB] with Pin B0 (pin 32), it gives me "Error 11: Invalid digital port number".
Attaching screenshot of code for DigitalPortType.FIRSTPORTA and DigitalPortType.FIRSTPORTB below.
My guess is that FIRSTPORTB is not the correct way to configure Port B on the board.
Also attaching the enum class that I imported to call those functions below;
To check if Port B is not supported by the hardware, I tested it with DAQami application by Digilent, and the output is as expected [I used a switch and toggled the input to High and Low]. Below is the screenshot for that as well.
Question
Nihaal
Hi I'm trying to write a program in python that takes in the input from the DIO port B0(pin 32), when I do this it gives me an error.
Below is the Pinout for the MC USB-1024LS DAQ device.
I downloaded the MCCULW package(v1.0.0) using pip from the MCCDAQ GitHub.
These are the packages I imported;
When I configure the port as PORT A with Pin A0 (pin 21), it works alright [port_name = DigitalPortType.FIRSTPORTA], but as soon as I configure the port as PORT B[port_name = DigitalPortType.FIRSTPORTB] with Pin B0 (pin 32), it gives me "Error 11: Invalid digital port number".
Attaching screenshot of code for DigitalPortType.FIRSTPORTA and DigitalPortType.FIRSTPORTB below.
My guess is that FIRSTPORTB is not the correct way to configure Port B on the board.
Also attaching the enum class that I imported to call those functions below;
To check if Port B is not supported by the hardware, I tested it with DAQami application by Digilent, and the output is as expected [I used a switch and toggled the input to High and Low]. Below is the screenshot for that as well.
Could someone help me out on this?
5 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now