Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2015-11-02 15:25:35

nadorffn
Member
Registered: 2015-11-02
Posts: 1

PID Control with REXDuino

I would like to set up a PID control algorithm where;
if the input voltage (0-5V) to pin A10 of the arduino is below the setpoint,
then PIDU block calculates an appropriate output voltage (0-5V) to pin (ex DO5_PWM).

I have worked through the REX examples for both the RPi and the REXduino but have not seen anything quite like this. Any help would be appreciated.

-Nick

Offline

#2 2015-11-03 21:42:11

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: PID Control with REXDuino

Find the example attached. The LIN blocks scale the signals to 0-100% range, change it to 0-5 if you prefer.

As a side note, the PIDU block calculates appropriate output even if the input is above setpoint. Why do you want to implement the IF condition?

REXduino_master.stl
X_UNO_PIDloop_task.mdl
X_UNO_PIDloop_exec.mdl

Offline

Board footer

Powered by FluxBB