HP VXI 75000 C Series User's And Scpi Programming Manual page 357

Algorithmic closed loop controller
Table of Contents

Advertisement

static float D_max = 9.9e+37;
static float D_min = 9.9e+37;
static float I_max = 9.9e+37;
static float I_min = -9.9e+37;
static float Man_state = 0;
static float Man_out = 0;
static float Man_inc = 0;
static float SD_factor = 0;
static float SD_max = 9.9e+37;
static float SD_min = 9.9e+37;
static float History_mode = 0;
/*
/*
Other Variables
static float I_out;
static float P_out;
static float D_out;
static float Error;
static float PV_old;
static float Setpoint_old;
static float SD_out;
static float Status = 0;
/*
/*
/*
/*PID algorithm code:
/* Test for Process Variable out of limits */
if ( (inchan
{
if ( !Status.B6 )
{
Status.B6 = 1;
alarmchan = 1;
interrupt();
}
}
else
{
Status.B6 = 0;
}
/* Do this when in the Manual control mode */
if ( Man_state )
{
/* On the first trigger after INIT only */
if (First_loop)
{
Man_out= outchan;/* Maintain output at manual smooth start */
}
/* On subsequent triggers, slew output towards Man_out */
else if (Man_out
{
outchan = outchan + abs(Man_inc);
Appendix D
>
PV_max) || ( PV_min
>
outchan + abs(Man_inc))
/* Derivative clip limits
/* Integral clip limits
/* Activates manual control
/* Target Manual output value
/* Manual outout change increment
/* Setpoint Derivative constant
/* Setpoint Derivative clip limits */
/* Activates fifo data logging
/* Integral term
/* Proportional term
/* Derivative term
/* Error term
/* Last process variable
/* Last setpoint - for derivative
/* Setpoint derivative term
/* Algorithm status word
/*
B0 - PID_out at clip limit
/*
B1 - I_out at clip limit
/*
B2 - D_out at clip limit
/*
B3 - SD_out at clip limit
/*
B4 - in Manual control mode
/*
B5 - Error out of limits
/*
B6 - PV out of limits
/*
others - unused
>
inchan ) )
/* PV alarm test */
PID Algorithm Listings
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
357

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents