data-acquisition

How to convert a data acquisition Matlab script to Simulink?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 23:40:35
问题 The Matlab script which I wrote is going to be used as a feedback for my control system. I have downloaded a library done called "Custom Arduino Library for HX711" by Nicholas Giacoboni. I want to convert a Matlab script which I wrote Matlab script. I have also tested the script by itself and it works. HX711 is a load cell amplifier ADC converter. function data = Loadcell() eml.extrinsic('arduino','addon','read_HX711') a = arduino('COM5','Mega2560','libraries','ExampleAddon/HX711'); scale =

Long term instrument data acquisition with Python - Using “While” loops and threaded processes

若如初见. 提交于 2019-12-13 04:05:48
问题 I will have 4 hardware data acquisition units connected to a single control PC over a hard-wired Ethernet LAN. The coding for this application will reside on the PC and is entirely Python-based. Each data acquisition unit is identically configured and will be polled from the PC in identical fashion. The test boxes they are connected to provide the variable output we seek to do our testing. These tests are long-term (8-16 months or better), with relatively low data acquisition rates (less than

Use Python to get state of combustion engine based on spark plug actuation

我的未来我决定 提交于 2019-12-12 19:14:01
问题 Working to create a data acquisition system for a custom off-road vehicle. Using Raspberry Pi and a custom tachometer (tested and confirmed working) to measure RPM. Using interrupts in the following code to get RPM value. def get_rpm(): GPIO.wait_for_edge(17, GPIO.FALLING) start = time.time() GPIO.wait_for_edge(17, GPIO.FALLING) end = time.time() duration = end - start rpm = (1/duration)*60 return rpm This code only works if the engine is running and producing a spark. If there is no spark,

PyVISA missing methods

风流意气都作罢 提交于 2019-12-11 17:55:01
问题 I am running Win 7 x64, NI 488.2, PyVISA 1.5, and python with numpy/scipy/ipython. I am attempting to contact a Keithley instrument through a GPIB-USB connection and send simple commands. However, when I attempt to create the instrument object, I discovered that PyVISA's ResourceManager was missing the required methods used for finding, reading, and writing to instruments. Following the example code on PyVISA's page, right now I have: import visa rm = visa.ResourceManager my_instrument = rm

Exchanging data between python processes through a database

北城余情 提交于 2019-12-08 11:03:21
问题 I have a raspberry pi with a MCC118 daqhat. The goal is threefold: Acquire and record data to a database Stream data over a private LAN to a browser as close to real-time as possible (network GET/POST speed limited) Analyze this data and actuate devices (RPi.GPIO) based on the analysis My program is both cpu and I/O bound in that the program must wait on data input from the daqhat (I/O bound), and, once data is read, it must be recorded and analyzed (cpu bound). For the cpu bound portion, I