500 Example PID Algorithm Listings
Appendix G
PIDC Algorithm
PIDC is very similar to PIDB with the addition of extended history mode.
See comments in source code below.
PIDC Source Listing
/********************************************************************************************/
/* PID_C
*/
/********************************************************************************************/
/* I/O Channels
*/
/* Must be defined by the user
*/
/*
*/
/* inchan - Input channel name
*/
/* outchan - Output channel name
*/
/* alarmchan - Alarm channel name
*/
/*
*/
/********************************************************************************************/
/*
*/
/********************************************************************************************/
/* PID algorithm for VT1422A controller module. This algorithm is called */
/* once per scan trigger by main(). It performs Proportional,
*/
Integral
*/
/* and Derivative control.
*/
/*
*/
/*
*/
/* The output is derived from the following equations:
*/
/*
*/
/* PID_out = P_out + I_out + D_out + SD_out
*/
/* P_out = Error * P_factor
*/
/* I_out = I_out + (Error * I_factor)
*/
/* D_out = ((PV_old - PV) * D_factor)
*/
/* SD_out = (Setpoint - Setpoint_old) * SD_factor
*/
/* Error = Setpoint - PV
*/
/*
*/
/* where:
*/
/* Setpoint is the desired value of the process variable (user supplied) */
/* PV is the process variable measured on the input channel
*/
/* PID_out is the algorithm result sent to the output channel
*/
/* P_factor, I_factor, D_factor and SD_factor are the PID constants
*/
/* (user supplied)
*/
/*
*/
/* Alarms may be generated when either the ProcessVariable or the
*/
/* error exceeds user supplied limits.
*/
/* The alarm condition will cause an interrupt to the host computer,
*/
/* set the (user-specified) alarm channel output to one (1) and set a bit */
/* in the Status variable to one (1).
*/
/* The interrupt is edge-sensitive. ( It will be asserted only
*/
/* on the transition into the alarm state.) The alarm channel digital
*/
/* output will persist for the duration of all alarm conditions. The
*/
/* Status word bits will also persist for the alarm duration. No user
*/
/* intervention is required to clear the alarm outputs.
*/
/* */
/* This version provides for limiting (or clipping) of the Integral,
*/
/* Derivative, Setpoint Derivative and output to user specified limits.
*/
/* The Status Variable indicates when terms are being clipped.
*/
/*
*/
/* Manual control is activated when the user sets the Man_state variable */
/* to a non-zero value. The output will be held at its last value. The
*/
/* user can change the output by changing the Man_out variable. User */
/* initiated changes in Man_out will cause the output to slew to the
*/
/* Man_out value at a rate of Man_inc per scan trigger.
*/
/*
*/
/* Manual control causes the Setpoint to continually change to match
*/
/* the Process Variable and the Integral term to be constantly updated
*/
/* to the output value such that a return to automatic control will
*/
/* be bumpless and will use the current Process Variable value as the
*/
/* new setpoint.
*/
/* The Status variable indicates when the Manual control mode is active. */
/*
*/
Содержание VT1422A
Страница 2: ...This page is blank...
Страница 8: ...8 Notes...
Страница 22: ...22 Support...
Страница 57: ...Field Wiring 57 Chapter 2...
Страница 58: ...58 Field Wiring Chapter 2...
Страница 96: ...94 Programming the VT1422A VT1529A B for Remote Strain Measurement Chapter 3...
Страница 162: ...160 Programming the VT1422A for Data Acquisition and Control Chapter 4...
Страница 224: ...222 Creating and Running Algorithms Chapter 6...
Страница 419: ...VT1422A Command Reference 417 Chapter 7 Notes...
Страница 420: ...418 VT1422A Command Reference Chapter 7 Notes...
Страница 425: ...Specifications 423 Appendix A Thermocouple Type E 200 800 C SCPs VT1501 02 03A...
Страница 426: ...424 Specifications Appendix A Thermocouple Type E 200 800 C SCPs VT1508 09A...
Страница 427: ...Specifications 425 Appendix A Thermocouple Type E 0 800 C SCPs VT1501A 02A 03A...
Страница 428: ...426 Specifications Appendix A Thermocouple Type E 0 800 C SCPs VT1508A 09A...
Страница 429: ...Specifications 427 Appendix A Thermocouple Type E Extended SCPs VT1501A 02A 03A...
Страница 430: ...428 Specifications Appendix A Thermocouple Type E Extended SCPs VT1508A 09A...
Страница 431: ...Specifications 429 Appendix A Thermocouple Type J SCPs VT1501A 02A 03A...
Страница 432: ...430 Specifications Appendix A Thermocouple Type J SCPs VT1508A 09A...
Страница 433: ...Specifications 431 Appendix A Thermocouple Type K SCPs VT1501A 02A 03A...
Страница 434: ...432 Specifications Appendix A Thermocouple Type R SCPs VT1501A 02A 03A...
Страница 435: ...Specifications 433 Appendix A Thermocouple Type R SCPs VT1508A 09A...
Страница 436: ...434 Specifications Appendix A Thermocouple Type S SCPs VT1501A 02A 03A...
Страница 437: ...Specifications 435 Appendix A Thermocouple Type S SCPs VT1508A 09A...
Страница 438: ...436 Specifications Appendix A Thermocouple Type T SCPs VT1501A 02A 03A...
Страница 439: ...Specifications 437 Appendix A Thermocouple Type T SCPs VT1508A 09A...
Страница 440: ...438 Specifications Appendix A 5k Thermistor Reference SCPs VT1501A 02A 03A...
Страница 441: ...Specifications 439 Appendix A 5k Thermistor Reference SCPs VT1508A 09A...
Страница 442: ...440 Specifications Appendix A RTD Reference SCPs VT1501A 02A 03A...
Страница 443: ...Specifications 441 Appendix A RTD SCPs VT1501A 02A 03A...
Страница 444: ...442 Specifications Appendix A RTD SCPs VT1508A 09A...
Страница 445: ...Specifications 443 Appendix A 2250 Thermistor SCPs VT1501A 02A 03A...
Страница 446: ...444 Specifications Appendix A 2250 Thermistor SCPs VT1508A 09A...
Страница 447: ...Specifications 445 Appendix A 5k Thermistor SCPs VT1501A 02A 03A...
Страница 448: ...446 Specifications Appendix A 5k Thermistor SCPs VT1508A 09A...
Страница 449: ...Specifications 447 Appendix A 10k Thermistor SCPs VT1501A 02A 03A...
Страница 450: ...448 Specifications Appendix A 10k Thermistor SCPs VT1508A 09A...
Страница 454: ...452 Specifications Appendix A...
Страница 480: ...478 VT1529A B Verification Calibration Appendix C...
Страница 484: ...482 Glossary Appendix D Notes...