Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8151

Python • Re: PID controller help

$
0
0
Still having speed problems?
Open a terminal and enter "top".
Start your python script in another terminal.
Watch the top output. That will show how much resources your code is using.

I thought you were doing a brewing program also, but it doesn't matter. The code should be good for any input. Could be temperature or humidity.
What device(s) are you using to control the humidity that uses PWM?
Been tied up in the shop havent had alot of time to play with this the last couple days, though i havent really gotten anywhere with it

using your code the temperature bounces up/down 1 degree, and when i changed it to display %1.f as i want to have this adjustable to .5 degree, i noticed the decimal number is erratic for some reason also. 'printing' the output from my RTD code while the window is open and watching this, my RTD code is spitting out a steady temperature, while the GUI is bouncing up and down a degree (doesnt look like its even rounding it even though im now using XX.X format, the RTD will be at say 18.2* steady and the GUI will bounce 18-19 with what seems like random numbers after the decimal)

with your code running im seeing about 30% cpu load and ~150mb memory usage once its opened and levelled out. i see about 5% cput 50mb memory with the conglomeration i made with pysimplegui (but i also havent figured out how to get it to auto refresh/update the GUI like yours does)

The PWM output from the PI is going to be used as an input for a 90vdc motor controller that drives a discharge metering roller

Statistics: Posted by Ykdave — Fri Oct 25, 2024 12:43 am



Viewing all articles
Browse latest Browse all 8151

Trending Articles