Download SNAP PID MODULE USER'S GUIDE

Transcript
SNAP PID MODULE
USER’S GUIDE
Form 1263-030703—July, 2003
43044 Business Park Drive • Temecula • CA 92590-3614
Phone: 800-321-OPTO (6786) or 951-695-3000
Fax: 800-832-OPTO (6786) or 951-695-2712
www.opto22.com
Product Support Services
800-TEK-OPTO (835-6786) or 951-695-3080
Fax: 951-695-3017
Email: [email protected]
Web: support.opto22.com
SNAP PID Module User’s Guide
Form 1263-030703—July, 2003
Copyright © 2001-2003 Opto 22.
All rights reserved.
Printed in the United States of America.
The information in this manual has been checked carefully and is believed to be accurate; however, Opto 22
assumes no responsibility for possible inaccuracies or omissions. Specifications are subject to change without
notice.
Opto 22 warrants all of its products to be free from defects in material or workmanship for 30 months from the
manufacturing date code. This warranty is limited to the original cost of the unit only and does not cover installation,
labor, or any other contingent costs. Opto 22 I/O modules and solid-state relays with date codes of 1/96 or later are
guaranteed for life. This lifetime warranty excludes reed relay, SNAP serial communication modules, SNAP PID
modules, and modules that contain mechanical contacts or switches. Opto 22 does not warrant any product,
components, or parts not manufactured by Opto 22; for these items, the warranty from the original manufacturer
applies. These products include, but are not limited to, OptoTerminal-G70, OptoTerminal-G75, and Sony Ericsson
GT-48; see the product data sheet for specific warranty information. Refer to Opto 22 form number 1042 for
complete warranty information.
Opto 22 FactoryFloor, Cyrano, Optomux, and Pamux are registered trademarks of Opto 22. Generation 4, ioControl,
ioDisplay, ioManager, ioProject, ioUtilities, mistic, Nvio, Nvio.net Web Portal, OptoConnect, OptoControl,
OptoDisplay, OptoENETSniff, OptoOPCServer, OptoScript, OptoServer, OptoTerminal, OptoUtilities, SNAP Ethernet
I/O, SNAP I/O, SNAP OEM I/O, SNAP Simple I/O, SNAP Ultimate I/O, and SNAP Wireless LAN I/O are trademarks of
Opto 22.
ActiveX, JScript, Microsoft, MS-DOS, VBScript, Visual Basic, Visual C++, and Windows are either registered
trademarks or trademarks of Microsoft Corporation in the United States and other countries. Linux is a registered
trademark of Linus Torvalds. Unicenter is a registered trademark of Computer Associates International, Inc. ARCNET
is a registered trademark of Datapoint Corporation. Modbus is a registered trademark of Schneider Electric.
Wiegand is a registered trademark of Sensor Engineering Corporation. Nokia, Nokia M2M Platform, Nokia M2M
Gateway Software, and Nokia 31 GSM Connectivity Terminal are trademarks or registered trademarks of Nokia
Corporation. Sony is a trademark of Sony Corporation. Ericsson is a trademark of Telefonaktiebolaget LM Ericsson.
All other brand or product names are trademarks or registered trademarks of their respective companies or
organizations.
ii
SNAP PID Module User’s Guide
Table of Contents
Introduction ............................................................................................................................1
SNAP-PID-V Applications................................................................................................1
Inputs and Outputs ..........................................................................................................2
Software Support ............................................................................................................2
What’s in this Guide?......................................................................................................2
For Help ...........................................................................................................................2
Quick Start..............................................................................................................................3
Check Brain Compatibility ...............................................................................................3
Determining Firmware Version ................................................................................4
Install the Module ...........................................................................................................4
Attach Input and Output Wiring......................................................................................5
Apply Power to the Rack .................................................................................................6
Configure the SNAP PID Module ....................................................................................6
Using ioManager Utility Software .........................................................................................7
Entering PID Values.........................................................................................................7
Using OptoENET PID Module Tuner Software.......................................................................8
System Requirements .....................................................................................................8
Installing the Software....................................................................................................8
Tuning a PID Loop............................................................................................................9
Step 1—Connect to the SNAP Ethernet Brain ........................................................9
Step 2—Configure PID Parameters .......................................................................10
Step 3—Run PID Calculations ...............................................................................12
Step 4—Optimize PID Loop ...................................................................................13
Saving PID Values to a Log File.....................................................................................14
Using the SNAP PID Module with OptoControl ...................................................................14
Using Analog Inputs ......................................................................................................14
Accessing PID Variables................................................................................................15
Finding a PID Module Memory Map Address........................................................15
Removing a SNAP PID Module ............................................................................................16
Troubleshooting....................................................................................................................16
Ethernet Brain Communications....................................................................................16
SNAP PID Module User’s Guide
iii
SNAP PID Module Access.............................................................................................16
SNAP PID Module Reference ...............................................................................................17
PID Velocity Algorithm ..................................................................................................17
PID Control Word...........................................................................................................17
Defining a PID Control Word..................................................................................18
Control Word Bits...................................................................................................18
PID Variables .................................................................................................................20
Variables Requiring Calculation.............................................................................20
Variables Not Requiring Calculation......................................................................22
Read-Only Variables...............................................................................................23
Status Flag Word...........................................................................................................24
Reading a Status Flag ............................................................................................24
Status Flag Bits ......................................................................................................24
Binary/Hexadecimal Conversion Chart .........................................................................25
Specifications .......................................................................................................................26
PID .................................................................................................................................26
Voltage Output ..............................................................................................................26
Current Output...............................................................................................................27
Setpoint/Process Variable Inputs..................................................................................27
Module and Power Requirements.................................................................................28
LED Indicators................................................................................................................28
iv
SNAP PID Module User’s Guide
Chapter 1
SNAP PID Module User’s Guide
Introduction
The SNAP-PID-V module is designed for users of Opto 22
SNAP Ethernet I/O™ systems with the
SNAP-B3000-ENET, SNAP-ENET-RTC, or
SNAP-WLAN-FH-ADS brain. The SNAP-PID-V monitors
input signals and adjusts output signals to control one
proportional-integral-derivative (PID) loop, performing
all necessary PID calculations in the module itself.
Before the introduction of the SNAP-PID-V module, using
a PID loop with SNAP Ethernet I/O systems required an
Opto 22 industrial controller running an OptoControl™
strategy or a remote computer running SCADA software.
For non-Ethernet I/O units, the multifunction B3000 brain
could be used. The SNAP-PID-V module makes this
equipment unnecessary, since all PID calculations are
made in the module independent of a controller or other
processor.
SNAP-PID-V
SNAP-PID-V Applications
Typical applications for the SNAP-PID-V module include temperature, pressure-level, flow, and
process control. The SNAP-PID-V is ideal for remote installations or other environments where
communication links are subject to interruption. Since PID calculations run locally on the I/O
module independent of a controller, brain, or other processor, PID loop control can continue even
if the communication link to the I/O system is broken.
The SNAP PID module is also useful in applications where multiple PID loops must be controlled
at one location. When multiple PID loop calculations run on a single industrial controller or
computer, a performance degradation can occur. When additional SNAP-PID-V modules are
added to a SNAP rack, however, all modules continue to perform PID loop calculations at a
constant speed without system degradation, providing a highly scalable solution. Up to twelve
SNAP-PID-V modules can be used on an Opto 22 16-module B-series mounting rack.
SNAP PID Module User’s Guide
1
INTRODUCTION
Inputs and Outputs
The SNAP-PID-V can use 0–10 VDC analog inputs for PID setpoint and process variables. Analog
inputs share a common reference and are not isolated from each other. PID output, sharing a
common negative terminal, provides 4–20 mA current and 0–10 VDC voltage outputs. (The PID
output value is calculated by the module and then sent simultaneously to both 4–20 mA and 0–10
VDC outputs as a percent of output scale.) Additionally, PID output can be configured for analog
or time-proportional-output (TPO) signals.
The standard SNAP removable top-mounted connector allows easy wiring of inputs and outputs.
LED indicators, shown on page 28, are provided to show PID calculation mode status (manual or
auto) and PID output signal status (analog or TPO).
Software Support
PID loop tuning and module configuration can be performed using OptoENET PID Module Tuner
software, which is available free of charge on the Opto 22 Web site (www.opto22.com). This
software plots PID values against time to provide visual feedback when tuning PID loops.
Additionally, the SNAP-PID-V can be accessed using OptoControl, Opto 22’s development tool for
industrial automation programming that is part of the FactoryFloor suite of industrial automation
software.
What’s in this Guide?
This guide assumes that you have some familiarity with tuning PID loops. Many commercial
resources are available for learning about this subject. To learn more about the SNAP Ethernet
brain used with the SNAP PID module, see Opto 22 form 1112, the SNAP Ethernet Brain User’s
Guide. This document can be downloaded from the Opto 22 Web site at www.opto22.com.
This guide includes the following sections:
•
Quick Start to get your PID module installed and connected quickly
•
Instructions for setting PID parameters using ioManager utility software or OptoENET PID
Module Tuner software
•
Wiring diagrams
•
Specifications.
For Help
If you have problems installing or using SNAP PID modules and cannot find the help you need in
this guide or on our Web site, you can call, fax, or e-mail Opto 22 Product Support.
2
SNAP PID Module User’s Guide
QUICK START
Phone:
800-TEK-OPTO (835-6786)
951-695-3080
(Hours are Monday through Friday,
7 a.m. to 5 p.m. Pacific Time)
Fax:
951-695-3017
Email:
[email protected]
Opto 22 Web site:
support.opto22.com
NOTE: Email messages
and phone calls to
Opto 22 Product Support
are grouped together
and answered in the
order received.
When calling for technical support, be prepared to provide the following information about your
system to the Product Support engineer:
•
Software and version being used
•
Ethernet brain firmware version
•
PC configuration
•
A complete description of your hardware, including:
– jumper configuration
– IP addresses and net masks for devices on the system
– accessories installed (such as expansion cards)
– type of power supply (brand and model)
– types of I/O units installed
– third-party devices installed (for example, barcode readers)
•
Specific error messages seen.
Quick Start
Check Brain Compatibility
The SNAP-PID-V module can be used with the SNAP-B3000-ENET, SNAP-ENET-RTC, or
SNAP-WLAN-FH-ADS Ethernet brain. Firmware version 3.0.2.0 or higher must be installed on the
Ethernet brain, which must be located on the same rack as the PID module(s).
NOTE: If you have an older SNAP Ethernet brain that uses firmware prior to version 3.0.2.0,
contact Opto 22 Product Support for assistance with firmware requirements for PID module
support.
Follow these steps to check the firmware version installed on a SNAP Ethernet brain. You will
need to know the brain’s IP address.
SNAP PID Module User’s Guide
3
QUICK START
Determining Firmware Version
1. On the PC, choose Start➞Programs➞Opto 22➞SNAP Ultimate
I/O➞ioManager➞ioManager.
The ioManager window opens.
2. Select Inspect from the Mode menu.
The Inspect window opens
3. Type the IP address of the brain in the field at the upper-left corner of the window and then
click the Status Read button.
4. Click Status Read in the Ethernet I/O Menu.
5. Scroll down until you see Kernel Version.
The kernel should be version 3.0.2.0 or higher.
Install the Module
SNAP-PID-V modules can be installed in any position on an Opto 22 B-series mounting rack. Do
not install more than twelve SNAP-PID-V modules on the same rack.
NOTE: SNAP PID modules draw considerably more power than a standard SNAP analog or digital
module. A SNAP-B16M, SNAP-B16MC, or SNAP-B16MC-P rack can handle a maximum of twelve
SNAP PID modules, plus the Ethernet brain and up to four other digital or analog modules. For
detailed power requirements, see the SNAP-PID-V module specifications on page 26. Make sure
you have sufficient power for the brain and all modules on the rack.
1. Remove the module from its
packaging.
2. Position the module over the
connector on the rack, aligning the
small slot at the base of the
module with the retention bar on
the rack. If it is next to another
module, make sure the male and
female module keys are aligned,
as shown at right.
3. Push straight down on the module
to snap it into position.
If you need to remove the module,
see page 16.
4
SNAP PID Module User’s Guide
QUICK START
Attach Input and Output Wiring
1. (Optional) If you want to use PID setpoint and process variable analog inputs from external
sources with the SNAP PID module, follow the wiring diagram shown on page 6 to connect
PID setpoint inputs to Channel 0 and process variable inputs to Channel 1.
Analog inputs share a common reference and are not isolated from each other.
2. Connect PID output wiring to the module as shown in the diagram on the following page.
PID output can be 4–20 mA current and 0–10 VDC voltage outputs, both of which share a
common negative terminal. PID output is calculated by the module and then sent
simultaneously to both current and voltage outputs as a percent of output scale. This PID
output can be analog or TPO signals (if TPO is selected, both current and voltage outputs
are switched from 0% to 100%).
SNAP PID Module User’s Guide
5
QUICK START
See the following wiring diagram for connection details.
.
Apply Power to the Rack
When you apply power to the rack, the top two LEDs on the SNAP-PID-V blink once. See “LED
Indicators” on page 28 for more information on LED functions.
Configure the SNAP PID Module
Choose one of two ways to enter PID values and set parameters for a SNAP-PID-V module:
6
SNAP PID Module User’s Guide
USING IOMANAGER UTILITY SOFTWARE
•
If you have previously calculated PID values and parameters, use ioManager. See “Using
ioManager Utility Software” on page 7 for instructions.
•
If you want to iteratively tune a PID loop, use OptoENET PID Module Tuner. This software
includes graphing features and is available free-of-charge from the Opto 22 Web site. See
“Using OptoENET PID Module Tuner Software” on page 8 for instructions.
IMPORTANT: PID module settings are not saved when you cycle power to the SNAP Ethernet
brain and the PID module. PID module settings cannot be saved to the brain's flash memory. If
you turn off power to these components, you will need to re-enter PID module settings using
either ioManager or the OptoENET PID Module Tuner software.
Using ioManager Utility Software
ioManager does not provide visual feedback of changes to PID values. You must first calculate
optimal PID values for your application using the PID velocity algorithm described on page 17 and
the PID variable formulas on page 20. After calculating these values, enter them in the
appropriate fields on the PID Module screen.
ioManager utility software was installed on your computer when the SNAP Ethernet brain was
installed and configured. See the SNAP Ethernet Brain User’s Guide for more information.
Entering PID Values
These instructions describe how to enter and modify PID values using ioManager’s Inspect mode.
You can also enter values as part of configuring and saving an I/O unit configuration file.
1. On the PC, choose Start➞Programs➞Opto 22➞SNAP Ultimate
I/O➞ioManager➞ioManager.
The ioManager window opens.
2. Select Inspect from the Mode menu.
The Inspect window opens
3. Type the IP address of the brain in the field at the upper-left corner of the window.
4. Click the PID button and from the submenu select Module.
5. From the PID Module Number drop-down menu, select the number matching the position of
the SNAP-PID-V module on the SNAP rack.
6. For each parameter in the Description column to be modified, enter a value in the corresponding
field in the Value column. Unless indicated, all parameters are entered in raw counts.
For parameter descriptions, see “SNAP PID Module Reference” on page 17.
7. Click Apply.
SNAP PID Module User’s Guide
7
USING OPTOENET PID MODULE TUNER SOFTWARE
Using OptoENET PID Module Tuner Software
OptoENET PID Module Tuner is an Opto 22 software application for Microsoft Windows that
works with the SNAP Ethernet brain to set PID values and other parameters for a SNAP-PID-V
module. The primary use of this software is to graph PID values against time, providing visual
feedback for tuning the PID loop that the module controls. OptoENET PID Module Tuner is
available free of charge from the Software downloads section of the Opto 22 Web site at
www.opto22.com/support.
You should be aware that OptoENET PID Module Tuner has the following restrictions:
•
No automatic tuning—The application does not automatically tune PID loops or
otherwise automatically set PID parameters. You must enter PID values and other settings
manually.
•
Works with one PID module at a time—A SNAP-PID-V module can control a single PID
loop, and OptoENET PID Module Tuner software works with only one SNAP PID module at
a time. Up to twelve SNAP-PID-V modules can be used on a 16-module SNAP rack,
however, and you can use OptoENET PID Module Tuner with different individual SNAP PID
modules by simply selecting a new module on the SNAP rack.
System Requirements
Here’s what you need to install and run OptoENET PID Module Tuner:
•
90 MHz or higher personal computer (200 MHz Pentium II or better recommended)
•
Microsoft Windows 95, Windows 98, Windows NT 4.0 (with latest Microsoft service pack
installed), or newer operating system
•
Microsoft Internet Explorer 5 or newer
•
At least 16 MB RAM for Windows 95 or Windows 98, or 32 MB RAM for Windows NT (64
MB or more recommended)
•
At least 8 MB of available hard disk space
•
VGA or higher resolution monitor (Super VGA recommended)
•
Mouse or other pointing device.
Installing the Software
After downloading the OptoENET PID Module Tuner installer from the Opto 22 Web site,
double-click the installer’s icon and follow the instructions that appear. By default, OptoENET PID
Module Tuner is installed with other Opto 22 Ethernet I/O software in the Opto22\OptoENET-IO
directory on your computer’s C: drive.
8
SNAP PID Module User’s Guide
USING OPTOENET PID MODULE TUNER SOFTWARE
Tuning a PID Loop
The following steps outline how to use OptoENET PID Module Tuner software to tune a PID loop
controlled by a SNAP PID module. Each step is described in more detail in the following sections.
For complete descriptions of SNAP-PID-V module variables and other parameters shown in
OptoENET PID Module Tuner, see “SNAP PID Module Reference” on page 17.
These instructions assume you have already gone through the Quick Start procedure earlier in
this guide.
Step 1—Connect to the SNAP Ethernet Brain
Step 2—Configure PID Parameters
Step 3—Run PID Calculations
Step 4—Optimize PID Loop
Step 1—Connect to the SNAP Ethernet Brain
1. To start OptoENET PID Module Tuner, from the Microsoft Windows Start Menu select
Programs➞Opto22➞OptoENET-IO➞OptoENET PID Module Tuner.
The OptoENET PID Module Tuner main window appears:
Enter P, I, D,
and setpoint
parameters
here
Enter IP
address and
other Ethernet
connection
parameters
here
Current values
from the PID
module are
shown here
Control Word and
Status Flag
displays
PID Calculation
Status indicator
Connection Status
indicator
2. In the Ethernet Connection group, enter the SNAP Ethernet brain’s IP address in the IP field.
SNAP PID Module User’s Guide
9
USING OPTOENET PID MODULE TUNER SOFTWARE
3. Leave the default Port number of 2001, unless you have changed the default Command
Processor port number for the SNAP Ethernet Brain. If this is the case, enter this port
number in the Port field.
4. Click Connect to establish a link to the SNAP Ethernet brain.
5. From the “Module #” drop-down menu in the Current PID Module Values section, select the
position of the SNAP-PID-V module on the SNAP rack.
Values associated with the module you selected should appear, and the connection status
indicator in the lower right-hand corner of the window turns green. If a SNAP-PID-V module
is not installed in the rack position you select, the value fields will display zero values.
6. Enter a scan rate for communicating with the SNAP Ethernet brain.
This rate determines how often OptoENET PID Module Tuner communicates with the SNAP
Ethernet brain. The default scan rate of 250 ms should be suitable for most 10/100 Mbps
Ethernet connections.
IMPORTANT: The Ethernet scan rate is not the same as the PID loop scan time. See “SNAP
PID Module Reference” on page 17 for more information on PID loop scan times.
Step 2—Configure PID Parameters
The PID parameters you enter will depend on your particular control application. OptoENET PID
Module Tuner default settings, however, usually provide a good starting point. For complete
descriptions of SNAP-PID-V module variables and other parameters shown in OptoENET PID
Module Tuner, see “SNAP PID Module Reference” on page 17.
1. Click the Options button in the Ethernet Connection section (lower left part of the window).
10
SNAP PID Module User’s Guide
USING OPTOENET PID MODULE TUNER SOFTWARE
The OptoENET PID Module Tuner Options window appears:
2. In the Limits section, enter setpoint, process variable, and output limit values.
3. In the Configuration section, enter PID loop base time and scan time values.
If needed for your PID control application, also enter values for TPO period, filter
exponential, output slew, and output deadband.
4. In the Control section, do the following:
a. To use an internal setpoint value, select the Setpoint Source checkbox. Deselect the
checkbox to use an external analog input for the setpoint.
b. To use an internal process variable, select the Process Source checkbox. Deselect the
checkbox to use an external analog input for the process variable.
c. To have PID output use a time-proportional (TPO) signal, select the TPO Output
checkbox. Deselect the checkbox to use a regular analog signal.
If TPO output is used, you should confirm that the TPO Period value in the Configuration
section is correct for your application.
d. To use the inverse of the PID output value, select the PID Inverse checkbox. Deselect
the checkbox to use a regular noninverted signal.
If Setpoint Source or Process Source is selected (that is, an internal setpoint or process
variable is used), values are displayed in raw counts. If Setpoint Source or Process Source
is not selected (that is, an internal setpoint or process variable is not used), values are from
0 to 10, corresponding to the 0–10 VDC analog input signal.
SNAP PID Module User’s Guide
11
USING OPTOENET PID MODULE TUNER SOFTWARE
Note that the hexadecimal control word in the Options window changes to reflect the
changes you make to control settings.
5. (Optional) To hide or display graphed values on the trend chart, click the View tab and in the
Pens section select or deselect the PV (Input), Setpoint, and Output checkboxes.
All values are graphed by default.
6. (Optional) To change the colors used for graphed values, click the View tab and click the
color box next to each value, select a color, and click OK.
7. Click OK to close the Options window.
8. In the OptoENET PID Module Tuner main
window, enter values for the following terms in
the corresponding fields:
•
•
•
•
P—Gain (proportional)
I—Integral
D—Derivative
SP—Setpoint
If you need to calculate starting P, I, D, and SP
values, use the PID velocity algorithm shown on
page 17. You can also start PID calculations using the default P, I, D, and SP values that
appear in these fields and then adjust the terms as you tune the PID loop.
9. Click Apply.
Step 3—Run PID Calculations
1. In the Ethernet Connection section of the main window, click Scan to start receiving PID
module values from the SNAP Ethernet brain.
The Connection Status indicator in the lower right-hand corner of the window turns green,
and the Trend chart starts graphing process variable, setpoint, and output values.
2. Click Auto Mode to start running PID calculations on the SNAP-PID-V module.
The PID calculation status indicator in the lower right-hand corner of the window turns
green.
PID Calculation Status indicator
Connection Status indicator
3. To view calculated PID values that are not shown in the main window, click Debug.
12
SNAP PID Module User’s Guide
USING OPTOENET PID MODULE TUNER SOFTWARE
The Debug window appears.
Step 4—Optimize PID Loop
1. Observe the graphed process variable (input), setpoint, and output values on the chart.
2. To see the coordinate values for a point on the graph, just click on that point.
Coordinate values appear near the cursor. To measure distances between two points, click
on the graph and then drag the mouse. Measurements will appear near the cursor.
Examples of viewing coordinate values and measuring distances appear below.
Coordinate values
Distance measurement
3. Enter new P, I, D, and SP values in the Tuning Parameters section if necessary, and then
click Apply.
4. Continue to observe the graphed values and change PID values until the PID loop is
optimized.
5. If you need to adjust PID loop scan time, base time, or the limit values you set earlier, do
the following:
a.
b.
c.
d.
e.
Click Manual Mode to stop PID calculations.
Click Options.
Change values in the Limits and Configuration sections as needed.
Click OK.
Click Auto Mode to start PID calculations again.
SNAP PID Module User’s Guide
13
USING THE SNAP PID MODULE WITH OPTOCONTROL
6. When the PID loop is correctly optimized, click Disconnect to close the link to the Ethernet
brain, and then select File➞Exit to close OptoENET PID Module Tuner.
IMPORTANT: Do not click Manual Mode before disconnecting the Ethernet link and closing
OptoENET PID Module Tuner. This will stop the PID calculations that are running on the
SNAP-PID-V module, and your PID loop will no longer be controlled by the PID module.
Saving PID Values to a Log File
You can use OptoENET PID Module Tuner to create a log file that contains process variable,
setpoint, output, and other PID values. To create the log file, do the following:
1. Select the Log File checkbox in the OptoENET PID Module Tuner main window.
2. In the file dialog box that appears, enter a name for the file, choose the location where you
want to save it, and then click Save.
Whenever PID values are graphed in the main window, OptoENET PID Module Tuner will
record the data listed below in an ASCII text file that you can open using a spreadsheet,
word processor, or other software application.
–
–
–
–
–
–
–
–
–
–
–
–
–
PID calculation date and time
Setpoint
Gain
Integral
Derivative
Current process variable
Last process variable
Oldest process variable
Current error
Last error
Output change
Output value
Time remaining to next scan/PID calculation
Using the SNAP PID Module with OptoControl
The SNAP-PID-V module can be used as an analog input module with Opto 22’s OptoControl
industrial automation software. OptoControl R3.1d or newer is required to use the SNAP-PID-V
with OptoControl. Contact Opto 22 Product Support for additional information. Contact
information appears on page 2.
Using Analog Inputs
In OptoControl you can configure two types of analog input points with the SNAP-PID-V. Both
types of input points can range from 0 to 100 percent; one type is scalable and the other is not.
14
SNAP PID Module User’s Guide
USING THE SNAP PID MODULE WITH OPTOCONTROL
Accessing PID Variables
PID variables from the SNAP-PID-V are stored in the SNAP-B3000-ENET’s memory map, and can
be accessed from OptoControl using the commands listed below. See Opto 22 form 725, the
OptoControl Command Reference, for more information about these commands.
•
Read Numeric Variable from I/O Memory Map
•
Write Numeric Variable to I/O Memory Map
•
Read Numeric Table from I/O Memory Map
•
Write Numeric Table to I/O Memory Map
Finding a PID Module Memory Map Address
To determine the hexadecimal memory map address for a particular PID module variable:
1. Open ioManager and select the SNAP Ethernet brain on the same rack as the PID module.
2. Click the PID button and select Module from the submenu.
3. At the top of the PID Module window select the PID module that will be used with
OptoControl.
The memory map address appears to the right of the variable’s description.
SNAP PID Module User’s Guide
15
REMOVING A SNAP PID MODULE
Removing a SNAP PID Module
To remove a SNAP PID module, use
the SNAP module tool that came with
the module.
1. Holding the SNAP module tool
as shown in the illustration at
right, insert it into the notch at
the base of the module.
NOTE: If you are facing the rack
with the brain on the left side,
the notch is on the back of the
module.
2. Squeeze the module tool
against the module to open the
release latch, and pull straight
up on the module to remove it.
Troubleshooting
If you encounter problems using the SNAP-PID-V, please review the information below for
solutions to common problems. If this information does not solve your problem, contact Opto 22
Product Support. Contact information is found on page 2 of this guide.
Ethernet Brain Communications
If you are having trouble establishing an Ethernet network connection with the SNAP Ethernet
brain, refer to the Troubleshooting section in Opto 22 form # 1112, the SNAP Ethernet Brain
User’s Guide. If Ethernet communications problems continue after you have tried the solutions in
that guide, contact Opto 22 Product Support for assistance.
SNAP PID Module Access
Check the following items if there are problems accessing the PID module on the SNAP rack:
•
16
Check that the correct kernel version is installed on the SNAP Ethernet brain. See “Check
Brain Compatibility” on page 3 for instructions on how to check the Ethernet brain’s kernel
version.
SNAP PID Module User’s Guide
SNAP PID MODULE REFERENCE
•
Confirm that the module is plugged firmly into the mounting rack. For applications where
vibration or thermal expansion and contraction may be a consideration, it may be beneficial
to use screws to attach the PID and other SNAP modules to the SNAP mounting rack.
•
If PID information doesn’t appear in the ioManager PID Module screen or when using
OptoENET PID Module Tuner, do the following:
– Check that the correct module location on the mounting rack is selected in ioManager’s
PID Module screen.
– Confirm that signal input and output wiring is correctly connected to the module’s
screw terminal connector. See “Attach Input and Output Wiring” on page 5 for wiring
information.
SNAP PID Module Reference
PID Velocity Algorithm
The SNAP-PID-V module uses the following PID velocity algorithm:
Change in output = Gain × (A + B – C)
where A = (Error at t0) – (Error at t1)
B = ((Error at t0) / Integral ratio)
C = (Derivative ratio × (PV input at t0) – (2 × PV input at t1) + (PV input at t2))
and Error = Setpoint – PV
t = Scan time (the time between setpoint and process variable readings)
t0 = Time when the scan timer reaches zero. This is when PID is calculated.
t1 = The last time the scan timer reached zero, or (t0 – t).
t2 = The second-to-last time the scan timer reached zero, or (t0 – (2 × t)).
PV = Process Variable (the input signal)
Integral ratio = Integral / Scan time
Derivative ratio = Derivative / Scan time
Setpoint and process variable readings are taken when the scan timer reaches zero and the PID
calculation is made.
PID Control Word
The SNAP-PID-V module’s control settings are configured by modifying a single hexadecimal
control word. When using ioManager software you need to use the control word to configure the
PID module. When using OptoENET PID Module Tuner, it isn’t necessary to enter a control word
since control settings are made using the software’s user interface.
SNAP PID Module User’s Guide
17
SNAP PID MODULE REFERENCE
Defining a PID Control Word
To determine a hexadecimal control word for a particular combination of control settings, do the
following:
1. In the table “Control Word Bits” on page 18, identify the bits that correspond to the
parameters you want to set.
2. For each bit you select, choose the binary value that corresponds to the control setting you
want.
3. Convert the binary values to hexadecimal to determine the PID control word.
For example, read the table below from top to bottom and right to left to see how you
might figure out a control word that sets the PID mode to Auto (that is, by setting bit 7 to 1).
Control word bits:
Binary data for each bit:
7654
0
7654
3210
(bits 1–7 are not used)
1000
0000
8
0
Hexadecimal value:
321
Enter this control word:
80
Note that the leading zeros do not need to be entered; in this example, entering “80” in the
Control Word field is sufficient. See “Binary/Hexadecimal Conversion Chart” on page 25 for a
table of 4-bit binary data and equivalent hexadecimal values.
Control Word Bits
18
Bit
Bit Name and Description
Default
To Modify,
Use Mode...
0
(not used)
n/a
n/a
1
(not used)
n/a
n/a
2
TPO Output
Sets PID output to use analog or TPO signals.
0 = Analog PID output. The analog output value is set to the Low
Output Limit.
1 = TPO PID output. The TPO output is set to the High Output
Limit.
0
(analog
output)
Manual
3
Process Variable Source
Sets an internal or external source for the process variable value.
0 = Process variable obtained from external analog source
connected to SNAP-PID-V channel 1.
1 = Process variable obtained from internal value.
0
(external
source)
Manual
SNAP PID Module User’s Guide
SNAP PID MODULE REFERENCE
Bit
Bit Name and Description
Default
To Modify,
Use Mode...
4
PID Inverse
Sets PID output to use an inverted or non-inverted signal.
0 = PID output is not inverted.
1 = PID output is inverted. Inversion occurs only after the PID
calculation has occurred. For the PID module, output limits and
outputs made in Manual mode are absolute values and are not
inverted.
0
(not
inverted)
Manual
5
(not used)
n/a
n/a
6
(not used)
n/a
n/a
7
PID Mode
Sets SNAP-PID-V module’s calculation mode (Auto/On or
Manual/Off).
0 = Manual mode (Off). The PID scan timer is stopped and reset.
Any current PID calculations are cancelled, and all PID variables
are reinitialized. PID output value is sent to either current or voltage
outputs. Changes to all PID variables and control bits are allowed,
as well as direct writes to PID output.
Note: If the Process Quality status flag bit is set, Auto mode cannot
be used until the flag is cleared.
1= Auto mode (On). The PID scan timer is active, and PID values
are calculated and executed. PID output value is sent
simultaneously to both current and voltage outputs as a percent of
the output scale. Changes to scantime variables are ignored, and
will result in an error. Changes to control bits are allowed except
where noted. Direct writes to PID output is not allowed.
Note: If the Process Quality status flag bit is set, PID output stops
and PID mode is forced to Manual.
0
(Manual/
Off)
n/a
0*
Setpoint Source
Sets an internal or external source for the setpoint value.
0 = Setpoint obtained from external analog source connected to
SNAP-PID-V channel 0.
1 = Setpoint obtained from internal value.
0
(external
source)
Manual or Auto
1*
(not used)
n/a
n/a
2*
(not used)
n/a
n/a
3*
(not used)
n/a
n/a
4*
(not used)
n/a
n/a
5*
(not used)
n/a
n/a
6*
(not used)
n/a
n/a
7*
(not used)
n/a
n/a
* Second 8-bit byte in control word
SNAP PID Module User’s Guide
19
SNAP PID MODULE REFERENCE
PID Variables
PID variables are used to hold the parameters that you enter using ioManager software, and also
to hold values calculated by the PID module. Unless otherwise indicated, all variables are
entered in raw counts.
Variables Requiring Calculation
If you use ioManager software to enter PID values and other settings for the SNAP-PID-V, you
must calculate in advance the variables listed in the following table. When using OptoENET PID
Module Tuner software, these calculations are done automatically.
20
Variable
Description
Scantime Base
(also called Scantime
Resolution)
This variable is used to calculate the PID loop basetime
using the following formula:
Basetime (sec.) = .01 x (1 + Scantime Base)
Enter the basetime value you want to use for your PID
loop in the formula and then solve for Scantime Base
using the following equation:
Scantime Base = (Basetime / .01) – 1
Enter the result in the Scantime Base field in
ioManager’s PID Module window.
Range: 0–255 (10 ms to 2.6 sec.)
100 ms
Manual
Scantime Mult
(also called Scantime
Multiplier)
This variable is used to calculate the PID loop scantime
using the following formula:
Scantime (sec.) = Basetime x (Scantime Mult + 1)
Enter the scantime value you want to use for your PID
loop in the formula and then solve for Scantime Mult
using the following equation:
Scantime Mult = (Scantime / Basetime) – 1
Enter the result in the Scantime Mult field in
ioManager’s PID Module window.
Range: 0–65535 (10 ms to 1.8 hr.)
10 sec.
Manual
TPO Period Mult
(also called TPO
Period Multiplier)
This variable sets the period of the PID module’s TPO
output using the following formula:
TPO Period = (1 + TPO Period Mult) x 256
Enter the TPO period value you want to use for your
PID loop in the formula and then solve for TPO Period
Mult using the following equation:
TPO Period Mult = (TPO Period / 256) – 1
Enter the result in the TPO Period Mult field in
ioManager’s PID Module window.
Range: 0–255 (2.56 sec. to 10.92 min.)
2.56 sec.
Manual
SNAP PID Module User’s Guide
Default
To Modify,
Use Mode...
SNAP PID MODULE REFERENCE
Variable
Description
Tune, IntegRatio
(also called the
Integral Ratio)
(IntegRatio) This variable sets the integral value used
for the PID module’s PID calculations using the
following formula:
IntegRatio = Integral / Scantime
Enter the integral and scantime values you want to use
for your PID loop and then solve for IntegRatio. Enter
the result in the Tune, IntegRatio field in ioManager’s
PID Module window.
Range: 0.000 to 255.996
4.000
Manual or
Auto
Tune, DerivRatio
(also called the
Derivative Ratio)
(DerivRatio) This variable sets the derivative value used
for the PID module’s PID loop calculations using the
following formula:
DerivRatio = Derivative / Scantime
Enter the derivative and scantime values you want to
use for your PID loop and then solve for DerivRatio.
Enter the result in the Tune, DerivRatio field in
ioManager’s PID Module window.
Range: 0.000 to 0.9992
0.000
Manual or
Auto
Filter Exponential
This variable sets the filter exponential used for the
Process filtering or Setpoint filtering equation using the
following formula:
For Process filtering, the input to the filter is the raw
Process Variable. The output of this filter is used for the
Process Variable in the PID calculation.
Range: 0–255
0
(no filter)
Manual or
Auto
For Setpoint filtering, the input to the filter is the raw
Setpoint value. The output of this filter is used for the
Setpoint value in the PID calculation.
Range: 0–255
0
(no filter)
Manual or
Auto
y
(t – 0)
= (b × y
Default
( t – 1)
To Modify,
Use Mode...
+ (1 – b) × y(t – 0))
where:
y(t–0) = raw input data
y(t–0) = current filtered answer
y(t–1) = last filtered answer
b = filter exponential
SNAP PID Module User’s Guide
21
SNAP PID MODULE REFERENCE
Variables Not Requiring Calculation
Values for the PID variables listed in the following table can be entered directly into ioManager
software. It is not necessary to calculate these values in advance.
Variable
Description
Output
PID output value for analog or TPO outputs.
For analog output, this variable is the PID output value
written to the analog outputs, subject to the applicable
output limits.
Range: 0–4095 (0–10 VDC or 4–20 mA)
To Modify,
Use Mode...
0
Manual
For TPO output, this variable is the TPO duty cycle.
Range: 0 to 100%
0%
Manual
Tune, Proportional
(also called
Proportional Term, P
term, or Gain)
This is one of the four key values for PID loop tuning
(Gain, Integral, Derivative, and Setpoint).
Range: 0.000 to 255.996
1.000
Manual or
Auto
Setpoint
(also called SP)
The Setpoint value used in the PID calculation. You can
specify a setpoint value or select an external source for
the value using OptoENET PID Module Tuner software
or ioManager’s PID Module window. See “Control Word
Bits” on page 18 for more information on PID module
control settings.
Range: 0 to 25000 (in raw counts)
0
Manual or
Auto
Process Variable
(also called P)
The Process Variable value used in the PID calculation.
You can specify a process variable value or select an
external source for the value using OptoENET PID
Module Tuner software or ioManager’s PID Module
window. See “Control Word Bits” on page 18 for more
information on PID module control settings.
Range: 0 to 25000 (in raw counts)
0
Manual or
Auto
0
Manual or
Auto
Setpoint Lo
Sets the Setpoint Lo limit. If the Setpoint input is less
(also called Setpt Low) than the Setpoint Lo limit, it is clamped to this limit. If
this condition occurs, the Setpoint Lo status flag will
also be set. The Setpoint Lo limit must be less than or
equal to the Setpoint Hi limit, or an error will occur.
Range: 0 to 25000 (in raw counts)
22
Default
Setpoint Hi
(also called Setpt
High)
Sets the Setpoint Hi limit. If the Setpoint input is greater
than the Setpoint Hi limit, it is clamped to this limit. If this
condition occurs, the Setpoint Hi status flag will also be
set. The Setpoint Hi limit must be greater than or equal
to the Setpoint Lo limit, or an error will occur.
Range: 0 to 25000 (in raw counts)
27500
Manual or
Auto
Process Lo
(also called PV Low)
Sets the Process Lo alarm. If the Process Variable input
is less than the Process Lo alarm, the Process Lo and
Process Quality flags are set. This occurs when the PID
is calculated. The Process Lo alarm must be less than
or equal to the Process Hi alarm.
Range: 0 to 25000 (in raw counts)
0
Manual or
Auto
SNAP PID Module User’s Guide
SNAP PID MODULE REFERENCE
Variable
Description
Default
To Modify,
Use Mode...
Process Hi
(also called PV High)
Sets the Process Hi alarm. If the Process Variable input
is greater than the Process Hi alarm, the Process Hi
and Process Quality flags are set. This occurs when the
PID is calculated. The Process Hi alarm must be greater
than or equal to the Process Lo alarm.
Range: 0 to 25000 (in raw counts)
27500
Manual or
Auto
Output Lo
(also called Output
Low)
Sets the Output Lo limit. If a PID output is calculated
that is below the Output Lo limit, the output is clamped
to the limit and the Output Lo flag is set. The Output Lo
limit must be less than or equal to the Output Hi limit.
Range: 0 to 4095
0
Manual or
Auto
Output Hi
(also called Output
High)
Sets the Output Hi limit. If a PID output is calculated that
is above the Output Hi limit, the output is clamped to the
limit and the Output Hi flag is set. The Output Hi limit
must be greater than or equal to the Output Lo limit.
Range: 0 to 4095
4095
Manual or
Auto
Output Slew Rate
Limits the maximum change in peak output that occurs
each time the PID is calculated. This variable can be
used to minimize PID overshoot when there is a large
change in a setpoint step. Changes to this limit take
effect the next time the PID is calculated.
Range: 0 to 4095
4095
Manual or
Auto
Output Limit
(also called Output
Limit Deadband)
This variable sets the minimum number of PID output
raw counts needed to cause the output to change. PID
changes that are less than or equal to the Output Limit
are ignored. This variable can be used to minimize wear
on control linkages. Changes to this limit take effect the
next time the PID is calculated.
Range: 0 to 4095
0
Manual or
Auto
Read-Only Variables
The following PID variables contain values that cannot be modified.
Variable
Description
Status Flag
Hexadecimal word that indicates the state of PID module status flags. See
“Status Flag Word” on page 24 for bit descriptions.
Current PID
Process Variable used for the most recent PID calculation.
Last PID
Process Variable used for the second most recent PID calculation.
Oldest PID
Process Variable used for the third most recent PID calculation.
Current PID Error
Calculated PID error (Setpoint – PV) used for the most recent PID calculation.
Last PID Error
Calculated PID error (Setpoint – PV) used for the second most recent PID
calculation.
Output Change
Calculated change in PID output between most recent PID calculation and the
second most recent PID calculation in raw counts.
SNAP PID Module User’s Guide
23
SNAP PID MODULE REFERENCE
Variable
Description
Output Value
Most recently calculated PID output value in raw counts.
Scantime Countdown
Time remaining until the next PID calculation is performed.
Status Flag Word
A status flag word indicates the state of certain PID module parameters. A status flag word is a
single hexadecimal word, similar to a PID control word, that displays the state of status flag bits.
These bits are read-only and cannot be modified. Status flag bits are primarily used with
ioManager’s PID Module window, since OptoENET PID Module Tuner software displays this
status information in the user interface.
Reading a Status Flag
To read a hexadecimal status flag word, do the following:
1. Break the 8-bit word into its two separate hexadecimal values.
2. Convert each hexadecimal value into its corresponding binary data.
3. Match the positions of each “1” in the binary data to a status flag bit.
The table below illustrates an example of these steps. Read the table from right to left to see
how you might interpret a status flag word.
Status flag word:
Hexadecimal value:
0 0 0 0 0 0 50
5
0
Binary data:
0101
0000
Status flag bits:
7654
3210
This status flag word shows that bit 4, the Output Lo flag, and bit 6, the TPO Status flag, are set.
See “Binary/Hexadecimal Conversion Chart” on page 25 for a table of binary data and equivalent
hexadecimal values.
Status Flag Bits
24
Bit
Flag Name and Description
0
Setpoint Lo
1 = Setpoint input is below the Setpoint Lo limit, and is clamped to that value for calculating PID
output. In Auto Mode, this flag is checked when PID output is calculated. If setpoint input re-enters
the normal range, the flag will clear at the next scan time.
SNAP PID Module User’s Guide
SNAP PID MODULE REFERENCE
Bit
Flag Name and Description
1
Setpoint Hi
1 = Setpoint input is above the Setpoint Hi limit and is clamped to that value for calculating PID
output. In Auto Mode, this flag is checked when PID output is calculated. If setpoint input re-enters
the normal range, the flag will clear at the next scan time.
2
Process Lo
1 = Process input is below the Process Lo limit and is not suitable for calculating PID output. In Auto
Mode, this flag is checked when PID output is calculated. When this flag is set, the Process Quality
flag is also set and the module is forced to Manual mode. The output will not change. After the
condition is fixed, you must change back to Auto Mode. The flag will clear when the PID output is
calculated.
3
Process Hi
1 = Process input is above the Process Hi limit and is not suitable for calculating PID output. In Auto
Mode, this flag is checked when PID output is calculated. When this flag is set, the Process Quality
flag is also set and the module is forced to Manual mode. The output will not change. After the
condition is fixed, you must change back to Auto Mode. The flag will clear when the PID output is
calculated.
4
Output Lo
1 = Output is clamped to the Output Lo clamp value. In Auto Mode, this flag is checked when PID
output is calculated. This flag is for indication only and will clear when the output is above the clamp
value.
5
Output Hi
1 = Output is clamped to the Output Hi clamp value. In Auto Mode, this flag is checked when PID
output is calculated. This flag is for indication only and will clear when the output is below the clamp
value.
6
TPO Status
1 = TPO is in the “On” portion of the TPO period.
0 = TPO is in the “Off” portion of the TPO period.
7
Process Quality
1 = Process input was not suitable for the PID calculation as it was calculated using the Hi/Lo
process limits. In Auto Mode, this flag is checked when PID output is calculated. If the flag is set, the
mode is forced to Manual. After the condition is fixed, you must change back to Auto Mode. The flag
will clear when the PID output is calculated.
If this flag is set after an initial powerup or reset command, the PID module failed to load variables
from its flash memory, and all configuration parameters and variables are at factory default settings.
Binary/Hexadecimal Conversion Chart
For using PID module control words and reading status flags, use the following chart to convert
binary data to and from hexadecimal (or “hex”) values:
Binary Data
Corresponding
Hex Value
Binary Data
Corresponding
Hex Value
0000
0
1000
8
0001
1
1001
9
0010
2
1010
A
0011
3
1011
B
SNAP PID Module User’s Guide
25
SPECIFICATIONS
Binary Data
Corresponding
Hex Value
Binary Data
Corresponding
Hex Value
0100
4
1100
C
0101
5
1101
D
0110
6
1110
E
0111
7
1111
F
Specifications
PID
Scan time range (programmable)
100 ms to 1.8 hrs. (default = 10 sec.)
Proportional range (gain)
0.000 to 255.996 (default = 1.000)
Integral range
0.000 to 255.996 (default = 4.000)
Derivative range
0.0000 to 0.9999 (default = 0.000)
PID output
Resolution
Deadband range
High/Low limits
12 bits
0 to 100% (default = 0%)
Low = 0 VDC or 4 mA (default = 0%)
High = 10 VDC or 20 mA (default = 100%)
Max. PID output step change
0 to 100% (default = 100%)
Analog PID outputs
0 to 10 VDC, 4 to 20 mA
TPO PID output
Resolution
Period range
On/Off levels
8 bits
2.56 sec. to 10.92 min.
0/10 VDC, 4/20 mA
Voltage Output
26
Range
0 to 10 VDC
Span
10 VDC
Resolution
2.44 mV
Response time
(% of span / ∆V / ∆time)
99.9% / 19.98 V / 3 ms
Load current
±5 mA min.
Short circuit output (current)
40 mA
SNAP PID Module User’s Guide
SPECIFICATIONS
Accuracy
0.1% of span
Gain temperature coefficient
50 ppm / ° C
Offset temperature coefficient
20 ppm / ° C
Current Output
Range
4 to 20 mA
Span
16 mA
Resolution
3.9 µA
Output at powerup
4 mA (before initialization)
Response time (% of span / ∆mA / ∆time)
99.9% / 15.98 mA / 3 ms
Accuracy
0.1% of span
Gain temperature coefficient
50 ppm / ° C
Offset temperature coefficient
20 ppm / ° C
Loop voltage (with 250 Ω loop resistance)
8 VDC min. to 32 VDC max.
Formula for max. loop resistance
Loop resistance = (loop voltage – 3) / .02
Max. loop resistance vs. loop supply
250 Ω @ 8 VDC min.
450 Ω @ 12 VDC
600 Ω @ 15 VDC
1050 Ω @ 24 VDC
1450 Ω @ 32 VDC max.
Setpoint/Process Variable Inputs
Range
0 to 10.000 VDC
Overrange
0 to 11 VDC
Resolution
400 µV
Data freshness (max.)
126.2 ms
(63.1 ms per channel)
DSP notch filter
10 Hz (–3 dB = 32 Hz)
Input filtering (analog front end)
T.C. = 2.5 ms
–3 dB @ 64 Hz
DC common mode rejection
> –120 dB
AC common mode rejection
> –120 dB @ 60 Hz
Max. survivable input
220 VAC/VDC
Max. operating common mode voltage
(field terminal to logic connector)
250 VAC/VDC
SNAP PID Module User’s Guide
27
SPECIFICATIONS
Accuracy (% full scale)
0.05%
Drift
Gain temperature coefficient
Offset temperature coefficient
30 ppm / ° C
15 ppm / ° C
Input resistance (single-ended)
1 M Ω (each channel) (Both inputs share
the same reference point.)
Module and Power Requirements
Isolation (inputs to analog outputs)
250 Vrms
Logic supply voltage
5.0 VDC
Logic supply current
250 mA DC
Max. number of modules per rack
12
Brain compatibility
SNAP-B3000-ENET
Operating temperature
Storage temperature
0° to 70° C
–30° to 85° C
LED Indicators
LED 1 on the SNAP-PID-V indicates PID calculation
mode. When lit, the PID module is in Auto Mode
and is calculating PID values. When not lit, the PID
module is in Manual Mode and is not running PID
calculations.
LED 3 on the PID module indicates TPO signal
status. The SNAP-PID-V supports both analog and
time-proportional output (TPO) PID output signals.
When LED 3 is lit, TPO PID output is being used.
When not lit, analog PID output is being used.
28
SNAP PID Module User’s Guide
SNAP-PID-V Top View