Creating and Running Algorithms 201
Chapter 6
How the Example PIDA
Operates
A PID algorithm is to control a bath temperature at 140°F. With the Setpoint
at 140 and the process variable (PV) reading 130, the value sent to the output
is a positive value which drives the digital output to 1 (heater on). When the
process value reading reaches 140, the "error term" would equal zero so the
value sent to the digital output would be 0 (heater off). Fine so far, but as the
bath temperature coasts even minutely above the setpoint, a small negative
value will be sent to the digital output which represents a boolean true value.
At this point the output will again be 1 (heater on) and the bath temperature
will continue to go up rather than down. This process is now out of control!
Modifying the
Example PIDA
This behavior is easy to fix. Simply modify the example PIDA algorithm
source code (supplied with the VT1422A in the file PIDA.C) and then define
it as an algorithm. Use the following steps:
1. Load the source file for the example PIDA algorithm into a text
editor.
2. Find the line of code near the end of PIDA that reads:
outchan = Error * P_ I_out + D_factor * (Error - Error_old)
and insert this line below it:
if ( outchan <= 0 ) outchan = 0; /* all values not positive are now zero */
3. Going back to the beginning of the file, change all occurrences of
"inchan" to the input channel specifier desired (e.g., I100).
4. As in step 3, change all occurrences of "outchan" to the digital output
channel/bit identifier desired (e.g., O108.B0).
5. Now save this algorithm source file as "ONOFFPID.C."
Algorithm to Algorithm Communication
The ability for one algorithm to have access to values from another can be
very important particularly in more complex control situations. One of the
important features of the VT1422A is that this communication can take
place entirely within the algorithms' environment. The application program
is freed from having to retrieve values from one algorithm and then send
those values to another algorithm.
Communication
Using Channel
Identifiers
The value of all defined input and output channels can be read by any
algorithm. Here is an example of inter-algorithm channel communication.
Содержание 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...