Jump to content
  • 0

MCC DAQ Hats Parallel Processing and Threading Ability


keshmaster81

Question

I am working on a test and measurement device that combines the MCC128 data acquisition with the movement of an actuator, specifically the closed loop micro linear actuators from Xeryon. https://xeryon.com/products/mini-linear-actuators/

The actuator is controlled via UART through USB and through a python library provided by Xeryon, so it does not interfere with the functionality of the hat. The main challenge that I need to overcome is the lack of ability to run the actuator and the data acquisition scan simultaneously. When the code gets to the line for running the actuator, it stops and performs the actuator movement, before starting the scan. I know that Python has a threading library which can overcome this type of programming challenge, but my question is does threading/parallel processing inherently affect the functionality of the hat? From my understanding, the HAT ADC and hardware is responsible for the very fast and precisely timed data acquisition, but the pi CPU only reads data from the HAT buffer periodically, making the data acquisition I/O bound rather than CPU bound, so I should be capable of threading. Is this true and are there any examples of this type of usage with the hat?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I have this exact same issue with a similar application, but I get a "response error -3" from the mcc118 daq hat every few scans. When I call the a_in_scan_start() function, the description says the data collection and buffer operation happens in the background, I am assuming this is a new thread? If so, my problem is I can't figure out how to access this thread, such that I can do a thread.join() which would prevent the scan from getting interrupted by my other threads. Am I understanding this function of the _scan_in_start() correctly, and is there a way to do this?

Thanks,

Joe

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