OPTO 22 Mistic Protocol User guide

Type
User guide
MISTIC PROTOCOL
USER’S GUIDE
Form 270-100823 — August, 2010
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
Web: support.opto22.com
ii Mistic Protocol User’s Guide
Mistic Protocol User’s Guide
Form 270-100823 — August, 2010
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, the 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.
Mistic Protocol User’s Guide iii
TABLE OF CONTENTS
Welcome .................................................................................................. ix
Overview ............................................................................................................................................ ix
About This Manual .......................................................................................................................... ix
Document Conventions ...................................................................................................................x
About Opto 22 ................................................................................................................................. xi
Chapter 1: Introduction ...................................................................... 1-1
Overview ......................................................................................................................................... 1-1
Scope of Document ............................................................................................................. 1-1
I/O Unit Overview ................................................................................................................. 1-1
System Configuration.................................................................................................................. 1-2
Physical Layout ..................................................................................................................... 1-2
Communications .................................................................................................................. 1-2
Modular Construction ......................................................................................................... 1-2
Serial Data Transmission-Remote I/O Units.................................................................... 1-3
Parallel Data Transmission-Local I/O Units ..................................................................... 1-3
Protocol .................................................................................................................................. 1-3
Data Verification ................................................................................................................... 1-3
Features........................................................................................................................................... 1-4
Digital Commands ................................................................................................................ 1-4
Analog Commands ............................................................................................................... 1-6
Summary ........................................................................................................................................ 1-8
Chapter 2: Programming .................................................................... 2-1
Overview ......................................................................................................................................... 2-1
Error Messages ...................................................................................................................... 2-2
Summary ................................................................................................................................ 2-3
Building Command Messages ............................................................................................ 2-3
Numbers Representation in ASCII Protocol.................................................................... 2-3
8-Bit Checksum .................................................................................................................... 2-4
16-Bit CRC ............................................................................................................................. 2-4
16-Bit CRC Calculation Examples ................................................................................... 2-14
Carrying Out Message Transactions ....................................................................................... 2-15
Interpreting the Response ................................................................................................2-15
Interpreting Analog Data ................................................................................................. 2-16
Initializing a Mistic Network ............................................................................................2-17
Mistic Brain Board Jumper Settings ....................................................................................... 2-17
iv Mistic Protocol User’s Guide
Chapter 3: Technical Information ...................................................... 3-1
Digital I/O Units ............................................................................................................................ 3-1
Input/Output Timing............................................................................................................ 3-1
Input Latching ....................................................................................................................... 3-1
Input Counting ..................................................................................................................... 3-1
Quadrature Counting .......................................................................................................... 3-1
Pulse/Period Duration Measurement ............................................................................... 3-3
On Time/Off Time Totalization........................................................................................... 3-3
Frequency Measurement .................................................................................................... 3-3
Time Delay/Pulse Output .................................................................................................... 3-3
Analog I/O units ............................................................................................................................ 3-4
Analog Input/Output Timing ............................................................................................. 3-4
Offset and Gain ..................................................................................................................... 3-5
Input Averaging (Digital Filtering).................................................................................... 3-5
Totalization (Integration) .................................................................................................... 3-6
PID Loop Control .......................................................................................................................... 3-6
Event/Reaction Processing ......................................................................................................... 3-7
Interrupts........................................................................................................................................ 3-9
Event/Reaction Applications .................................................................................................... 3-10
Digital I/O Units .................................................................................................................. 3-10
Analog I/O Units ................................................................................................................. 3-10
System Throughput .................................................................................................................... 3-11
The G4LS Non-Multifunction Local Digital I/O Units.........................................................3-12
Chapter 4: Command Directory.......................................................... 4-1
COMMAND NAME ......................................................................... COMMAND CMD 4-2
Chapter 5: Digital Setup System Commands ..................................... 5-1
IDENTIFY TYPE ....................................................................................... COMMAND F 5-1
POWER-UP CLEAR ............................................................................... COMMAND A 5-4
REPEAT LAST RESPONSE ........................................................................ COMMAND ^ 5-7
RESET ....................................................................................................COMMAND B 5-10
RESET ALL PARAMETERS TO DEFAULT ................................................... COMMAND x 5-13
SET COMM LINK WATCHDOG MOMO AND DELAY ............................... COMMAND D 5-16
SET RESPONSE DELAY .......................................................................... COMMAND ~ 5-20
SET SYSTEM OPTIONS ........................................................................... COMMAND C 5-23
Chapter 6: Digital I/0 Configuration Commands .............................. 6-1
READ MODULE CONFIGURATION ........................................................... COMMAND Y 6-1
SET CHANNEL CONFIGURATION ............................................................. COMMAND a 6-4
SET I/O CONFIGURATION-GROUP ........................................................ COMMAND G 6-7
STORE SYSTEM CONFIGURATION ........................................................... COMMAND E 6-11
Mistic Protocol User’s Guide v
Chapter 7: Digital Read/Write, Latch Commands ............................. 7-1
CLEAR OUTPUT (DEACTIVATE OUTPUT).................................................. COMMAND e 7-1
READ AND OPTIONALLY CLEAR LATCHES GROUP .................................. COMMAND S 7-4
READ AND OPTIONALLY CLEAR LATCH ................................................. COMMAND w 7-7
READ MODULE STATUS ......................................................................... COMMAND R 7-10
SET OUTPUT MODULE STATE-GROUP ....................................................COMMAND J 7-13
SET OUTPUT (ACTIVATE OUTPUT) .......................................................... COMMAND d 7-16
Chapter 8: Digital Counter Frequency Commands .......................... 8-1
CLEAR COUNTER ................................................................................... COMMAND c 8-1
ENABLE/DISABLE COUNTER GROUP ..................................................... COMMAND H 8-4
ENABLE/DISABLE COUNTER ................................................................... COMMAND b 8-7
READ 16-BIT COUNTER ..................................................................... COMMAND m 8-10
READ 32-BIT COUNTER GROUP ............................................................ COMMAND T 8-13
READ 32-BIT COUNTER ......................................................................... COMMAND l 8-16
READ AND CLEAR 16-BIT COUNTER ..................................................... COMMAND O8-19
READ AND CLEAR 32-BIT COUNTER GROUP ....................................... COMMAND U 8-22
READ AND CLEAR 32-BIT COUNTER ..................................................... COMMAND n 8-25
READ COUNTER ENABLE/DISABLE STATUS ............................................ COMMAND u 8-28
READ FREQUENCY MEASUREMENT ........................................................COMMAND t 8-31
READ FREQUENCY MEASUREMENT-GROUP .......................................... COMMAND Z 8-34
Chapter 9: Digital Time Delay Pulse Output Commands ................. 9-1
GENERATE N PULSES ............................................................................. COMMAND i 9-1
READ OUTPUT TIMER COUNTER ............................................................ COMMAND k 9-5
SET TIME PROPORTIONAL OUTPUT PERIOD ............................................ COMMAND ] 9-8
SET TPO* PERCENTAGE ......................................................................... COMMAND j 9-11
START CONTINUOUS SQUARE WAVE ..................................................... COMMAND h 9-14
START OFF PULSE ................................................................................. COMMAND g 9-17
START ON PULSE ................................................................................... COMMAND f 9-20
Chapter 10: Digital Pulse/Period Measurement Commands ........... 10-1
READ 16-BIT PULSE/PERIOD MEASUREMENT ....................................... COMMAND q 10-1
READ 32-BIT PULSE/PERIOD GROUP ................................................ COMMAND W 10-4
READ 32-BIT PULSE/PERIOD MEASUREMENT ...................................... COMMAND p 10-7
READ AND RESTART 16-BIT PULSE/PERIOD ...........................................COMMAND s 10-10
READ AND RESTART 32-BIT PULSE/PERIOD .......................................... COMMAND r 10-13
READ AND RESTART 32-BIT PULSE/PERIOD GROUP ............................. COMMAND X 10-16
READ PULSE/PERIOD COMPLETE STATUS ............................................... COMMAND V 10-20
vi Mistic Protocol User’s Guide
Chapter 11: Digital Event/Reaction Commands .............................. 11-1
CLEAR EVENT/REACTION TABLE ............................................................. COMMAND _ 11-1
CLEAR EVENT TABLE ENTRY .................................................................... COMMAND \ 11-4
CLEAR INTERRUPT ............................................................................... COMMAND zB 11-7
ENABLE/DISABLE EVENT ENTRY GROUP ................................................ COMMAND { 11-9
ENABLE/DISABLE EVENT TABLE ENTRY ................................................. COMMAND N 11-13
READ AND CLEAR EVENT LATCHES ....................................................... COMMAND Q 11-16
READ EVENT DATA HOLDING BUFFER .................................................... COMMAND | 11-19
READ EVENT ENTRY ENABLE/DISABLE STATUS ...................................... COMMAND v 11-22
READ EVENT LATCHES ........................................................................... COMMAND P 11-25
READ AND OPTIONALLY CLEAR EVENT LATCH .....................................COMMAND zA 11-28
READ EVENT TABLE ENTRY ................................................................... COMMAND O 11-30
SET EVENT INTERRUPT STATUS ............................................................... COMMAND I 11-36
SET EVENT ON COMM LINK WATCHDOG TIME-OUT ............................ COMMAND y 11-39
SET EVENT ON COUNTER/TIMER >=..................................................... COMMAND L 11-42
SET EVENT ON COUNTER/TIMER <=..................................................... COMMAND } 11-45
SET EVENT ON MOMO MATCH .............................................................COMMAND K 11-48
SET EVENT REACTION COMMAND ....................................................... COMMAND M 11-51
Chapter 12: Analog Setup/System Commands ................................ 12-1
IDENTIFY TYPE ....................................................................................... COMMAND F 12-1
POWER UP CLEAR ............................................................................... COMMAND A 12-4
REPEAT LAST RESPONSE ........................................................................ COMMAND ^ 12-7
RESET ....................................................................................................COMMAND B 12-10
RESET ALL PARAMETERS TO DEFAULT ....................................................COMMAND J 12-13
SET COMM LINK WATCHDOG AND DELAY ........................................... COMMAND D 12-16
SET COMM LINK WATCHDOG TIME-OUT DATA ................................... COMMAND H 12-19
SET RESPONSE DELAY .......................................................................... COMMAND ~ 12-24
SET SYSTEM OPTIONS ........................................................................... COMMAND C 12-27
Chapter 13: Analog I/O Configuration Commands .........................13-1
CALCULATE AND SET ADC MODULE OFFSET ........................................ COMMAND d 13-1
CALCULATE AND SET ADC MODULE GAIN ........................................... COMMAND e 13-4
READ MODULE CONFIGURATION ........................................................... COMMAND Y 13-7
SET ADC MODULE OFFSET ................................................................... COMMAND b 13-11
SET ADC MODULE GAIN ...................................................................... COMMAND c 13-14
SET AVERAGING SAMPLE WEIGHT ........................................................ COMMAND h 13-17
SET CHANNEL CONFIGURATION ............................................................. COMMAND a 13-20
SET ENGINEERING UNIT SCALING PARAMETERS ..................................... COMMAND f 13-24
SET I/O CONFIGURATION-GROUP ........................................................ COMMAND G 13-27
SET TOTALIZATION SAMPLE RATE .......................................................... COMMAND g 13-32
SET TPO* RESOLUTION .......................................................................... COMMAND ] 13-35
STORE SYSTEM CONFIGURATION ........................................................... COMMAND E 13-38
Mistic Protocol User’s Guide vii
Chapter 14: Analog Read, Write, Output Commands ....................14-1
RAMP DAC OUTPUT TO ENDPOINT ...................................................... COMMAND Z 14-1
READ AND CLEAR I/O MODULE DATA ...................................................COMMAND s 14-4
READ AND CLEAR I/O MODULE DATA-GROUP ..................................... COMMAND S 14-8
READ I/O MODULE MAGNITUDE ........................................................... COMMAND r 14-13
READ I/O MODULE MAGNITUDE-GROUP .............................................COMMAND R 14-17
SET DAC MODULE MAGNITUDE, ENG. UNITS ...................................... COMMAND w 14-21
SET DAC MODULE MAGNITUDE, ENG. UNITS-GROUP........................ COMMAND W 14-24
SET DAC MODULE MAGNITUDE, COUNTS ............................................ COMMAND x 14-28
SET DAC MODULE MAGNITUDE, COUNTS-GROUP .............................. COMMAND X 14-31
Chapter 15: Analog Event/Reaction Commands ............................. 15-1
CLEAR EVENT/REACTION TABLE ............................................................. COMMAND _ 15-1
CLEAR EVENT TABLE ENTRY .................................................................... COMMAND \ 15-4
CLEAR INTERRUPT ............................................................................... COMMAND zB 15-7
ENABLE/DISABLE EVENT ENTRY GROUP ................................................ COMMAND { 15-9
ENABLE/DISABLE EVENT TABLE ENTRY ................................................. COMMAND N 15-13
READ AND CLEAR EVENT LATCHES ....................................................... COMMAND Q 15-16
READ EVENT DATA HOLDING BUFFER ....................................................COMMAND | 15-19
READ EVENT ENTRY ENABLE/DISABLE STATUS ...................................... COMMAND v 15-22
READ EVENT LATCHES ........................................................................... COMMAND P 15-25
READ AND OPTIONALLY CLEAR EVENT LATCH .....................................COMMAND zA 15-28
READ EVENT TABLE ENTRY ................................................................... COMMAND O 15-30
SET EVENT INTERRUPT STATUS ............................................................... COMMAND I 15-36
SET EVENT ON COMM LINK WATCHDOG TIME-OUT ............................ COMMAND y 15-39
SET EVENT ON I/O >= SETPOINT .........................................................COMMAND K 15-42
SET EVENT ON I/O <= SETPOINT ......................................................... COMMAND L 15-46
SET EVENT/REACTION COMMAND ....................................................... COMMAND M 15-50
Chapter 16: Analog PID Loop Commands........................................16-1
INITIALIZE PID LOOP .............................................................................. COMMAND i 16-1
READ ALL PID LOOP PARAMETERS ....................................................... COMMAND T 16-5
READ PID LOOP PARAMETER ................................................................ COMMAND t 16-11
SET PID LOOP CONTROL OPTIONS ......................................................... COMMAND j 16-15
SET PID LOOP DERIVATIVE RATE .......................................................... COMMAND n 16-20
SET PID LOOP GAIN .............................................................................. COMMAND l 16-23
SET PID LOOP INTEGRAL RESET RATE ..................................................COMMAND m 16-26
SET PID LOOP MAXIMUM RATE OF CHANGE ....................................... COMMAND u 16-29
SET PID LOOP MIN-MAX OUTPUT LIMITS ........................................... COMMAND p 16-32
SET PID LOOP MIN-MAX SETPOINT LIMITS ......................................... COMMAND o 16-35
SET PID LOOP PROCESS VARIABLE ....................................................... COMMAND q 16-38
SET PID LOOP SETPOINT ....................................................................... COMMAND k 16-41
viii Mistic Protocol User’s Guide
Appendix A: ASCII Character Table .................................................... A-1
Appendix B: Surge Protection For RS-422/485
Communication Links .......................................................................... B-1
Appendix C: Troubleshooting .............................................................. C-1
Mistic Protocol User’s Guide ix
WELCOME
OVERVIEW
A Mistic protocol distributed control system can have one or several computers or
dedicated input/output (I/O) processors controlling from one to several hundred
intelligent I/O units. The I/O units respond to a protocol that we call Mistic.
By performing most of the time-critical functions at the I/O unit level, system performance
is optimized and is relatively independent of overall system size. Digital functions such
as latching, counting, and time delays or pulse generation are performed by a 16-bit
processor dedicated to 16 or fewer I/O points. Analog PID loops, high/low limit
monitoring, and engineering unit conversions are performed by the analog Mistic brain
board.
This manual describes the communication protocol required to communicate with all
Mistic brain board types. Every Mistic command is fully explained and illustrated by a
programming example. Detailed explanations of the functions each command performs
will be helpful to users of our FactoryFloor software suite, as well as to users of our
MisticWare software driver. While it is possible to create code to talk directly to the Mistic
protocol brain boards, the use of a high-level language or our software driver is
encouraged for most applications.
ABOUT THIS MANUAL
This manual is organized as follows:
Chapter 1: Introduction — Features and configuration information
Chapter 2: Programming — Structure of commands and errors
Chapter 3: Technical Information — Command overview
Chapter 4: Command Directory — Lists all the commands
Chapter 5: Digital Setup System Commands
Chapter 6: Digital I/O Configuration Commands
Chapter 7: Digital Read/Write, Latch Commands
Chapter 8: Digital Counter Frequency Commands
Chapter 9: Digital Time Delay Pulse Output Commands
Chapter 10: Digital Pulse/Period Measurement Commands
xMistic Protocol User’s Guide
Chapter 11: Digital Event/Reaction Commands
Chapter 12: Analog Setup/System Commands
Chapter 13: Analog I/O Configuration Commands
Chapter 14: Analog Read/Write/Output Commands
Chapter 15: Analog Event/Reaction Commands
Chapter 16: Analog PID Loop Commands
Appendix A: ASCII Character Table
Appendix B: Surge Protection For RS-422/485 Communication Links
Appendix C: Troubleshooting
DOCUMENT CONVENTIONS
Bold typeface indicates text to be typed. Unless otherwise noted, such text may
be entered in upper or lower case. (Example: “At the DOS prompt, type
cd \windows.”)
Italic typeface indicates emphasis and is used for book titles.
(Example: “See the OptoControl User’s Guide for details.”)
File names appear in all capital letters. (Example: “Open the file TEST1.TXT.”)
Key names appear in small capital letters. (Example: “Press SHIFT.”)
Key press combinations are indicated by plus signs between two or more key
names. For example, SHIFT+F1 is the result of holding down the SHIFT key, then
pressing and releasing the F1 key. Similarly, CTRL+ALT+DELETE is the result of
pressing and holdingthe CTRL and ALT keys, then pressing and releasing the DELETE
key.
“Press” (or “click”) means press and release when used in reference to a
mouse button.
Menu commands are sometimes referred to with the MenuCommand
convention. For example, “Select FileRun” means to select the Run command
from the File menu.
Numbered lists indicate procedures to be followed sequentially.
Bulleted lists (such as this one) provide general information.
Mistic Protocol User’s Guide xi
ABOUT OPTO 22
Opto 22’s goal to deliver total control to industrial automation customers dates back
to its beginnings in 1974 with the introduction of optically-isolated solid-state relays.
Today, Opto 22 is the number one provider of I/O systems, with more than 60 million
points of I/O working reliably worldwide. After earning a reputation for consistent
innovation and leadership in automation hardware, Opto 22 realized it was time to take a
new approach to control software. In 1988, Opto 22 introduced the first flowchart-based
control programming language. Opto 22 continues to deliver successively more advanced
generations of hardware and software.
Opto 22 has targeted four key markets: Enterprise, Systems, Components, and Verticals.
Opto 22 provides bi-directional data exchange software for integrating manufacturing
data into the Enterprise Market, software-driven control solutions for the Systems Market,
hardware and drivers for the Components Market, and Vertical Market solutions for the
water, energy, and semiconductor industries.
All Opto 22 products are manufactured in the U.S. at the company’s headquarters in
Temecula, California, and are sold through a global network of distributors, system
integrators, and OEMs. Sales offices are located throughout the United States.
For more information, contact Opto 22, 43044 Business Park Drive, Temecula,
CA 92590-3614. Phone Opto 22 Inside Sales at 1-800-452-OPTO or Opto 22
headquarters at 951-695-3000. Fax us at 951-695-3095.
For fast delivery of marketing and technical documentation, visit our Web site at
www.opto22.com.
xii Mistic Protocol User’s Guide
Mistic Protocol User’s Guide
1-1
Introduction
Overview
Scope of Document
This manual describes the format of the data required to communicate with the family of Opto 22 I/O
(input/output) controllers using the Mistic protocol. The user of this manual may either be analyzing the
data created by a Mistic protocol controller in an effort to optimize the use of the high-level commands,
or will be creating the data in some other program written in a high-level language. Data is exactly the
same whether created by a Mistic protocol Opto 22 controller, a PC using our MisticWare I/O driver, or
from custom-designed software.
Data link topology, overall system design, and the layout and connection of specific I/O units is beyond
the scope of this document. Please refer to the individual hardware user’s guides for specific analog
and digital I/O units for this level of detail.
I/O Unit Overview
The Opto 22 Mistic protocol I/O units are a family of intelligent digital and analog input/output
controllers that operate as slave devices to a host computer. Physically, each Mistic
I/O unit is a modular
assembly that consists of a module mounting rack, a brain board, and a number of optically-isolated
analog or digital I/O modules.
The removable brain board contains a microprocessor that communicates with a Mistic processor or
with a host computer equipped with the proper interface card. The brain board controls the plug-in I/O
modules located on the I/O mounting rack.
Any combination of analog I/O modules may be plugged into an analog I/O unit and likewise, any
combination of digital I/O modules may be plugged into a digital I/O unit. Remote analog and digital I/O
units can then be combined on the same RS-485 serial data link providing endless combinations of
analog and digital I/O points. In a similar way, any combination of local analog and digital I/O units can
be combined on the same parallel data link.
Local analog and digital I/O units use flat ribbon cable for interconnections. The maximum cable length
for local I/O units is 200 feet. Local units should be used within the same equipment rack or enclosure
where cable runs can be kept short. The primary reason for choosing local I/O units (rather than remote)
is the much higher bus speed of 1.4 MHz. The remote bus speed is 115 kHz. The higher speed of the
CHAPTER 1
1-2
Mistic Protocol User’s Guide
local I/O unit allows data to be sent and received in a much shorter time interval. This is very important
for real-time control applications.
Remote I/O units communicate with the host computer over an RS-485 serial communications link. The
serial data link is composed of two twisted-pairs of cable (4 wires) that connect to each I/O unit. One
pair carries commands and responses and the other pair is used for a hardware interrupt from the I/O
units. It is possible to communicate with up to 256 individual I/O units on a single serial link for a total of
4,096 digital and analog I/O points.
The RS-485 data link offers excellent noise immunity and long cable lengths. The maximum cable length
for remote I/O units is 3,000 feet. Wiring costs are reduced by eliminating the need for bringing large
bundles of field wiring back to a central controller. Remote I/O units can be located where the actual
control is needed.
System Configuration
Physical Layout
The high cost of electrical wiring and the noise susceptibility of analog signals make it desirable to place
the control and monitoring points as close to the controlled device as possible. Remote I/O units offer
design flexibility, with as few as eight points or as many as 4,096 points in one physical location.
Considerable installation savings and improved system performance can be realized by placing the
control points (remote I/O units) close to the controlled device. The serial data link between adjacent
remote I/O units consists of two twisted pairs (4 wires) which makes it practical to have a remote I/O
unit located at each machine on a Opto 22 FactoryFloor®, at each heating or air conditioning unit in an
energy management application, or at each instrument in a data acquisition environment.
Each Mistic I/O unit must be assigned its own unique address (0 – 255).
Communications
Remote I/O units require only two twisted pairs for the communications link. Communications are half
duplex. The command and the response travel over the same twisted pair. The second twisted pair is
required for hardware interrupts.
In a multidrop configuration, the last I/O unit in the network can be up to 3,000 feet from the host
computer, even longer using a repeater, and up to 256 I/O units can be connected to a single serial port.
In this configuration, all of the remote I/O units are wired in parallel on the same serial data link. This
provides security against power failures at individual I/O unit sites. If power is lost on a remote I/O unit,
communications to that board are lost; but communication to the rest of the remote I/O units on the link
remains intact.
Modular Construction
Each Mistic I/O unit is composed of a mounting base with barrier strips, a brain board, and high-density,
optically-isolated analog or digital I/O modules. Please refer to individual I/O unit data sheets for specific
construction and connection details.
Mistic Protocol User’s Guide
1-3
Serial Data Transmission-Remote I/O Units
Remote I/O units are connected to the host computer via a two twisted-pair cable. One pair carries
command/response data and the other carries interrupts. Remote I/O units support the common baud
rates (110, 150, 300, 600, 1,200, 2,400, 4,800, 9,600, 19.2K, 38.4K, 57.6K, 76.8K, and 115.2K) which are
selectable via jumpers located on the remote I/O unit. Selection of baud rate often depends upon the
capabilities of the host port. Many host computers have a limited baud rate. Modems and radio links
often operate at 300, 1,200, or 2,400 baud. System throughput is increased by using the fastest available
baud rate.
Parallel Data Transmission-Local I/O Units
The local I/O units communicate with the host computer via a 34-conductor, flat-ribbon cable. Local I/O
units always operate at 1.4 MHz for high-speed data transfers. System throughput is increased by using
local I/O units. M4 integral I/O is always configured on the local bus.
Protocol
All I/O units use the same command set. For remote I/O units, two types of protocols are supported, (1)
ASCII and (2) binary. For local I/O units, only the binary protocol is supported. The binary protocol is used
for faster data transmission and ASCII protocol is used when it is desirable to be able to view the
commands and responses on an ASCII display terminal, usually an LCD or CRT type. Both protocols are
2-pass. The Mistic protocol requires the transmission of two messages on the serial data link every time
a command is executed. The host sends a command to a I/O unit and then receives a response message
acknowledging successful execution of the command along with any requested data, or an error
message indicating that the I/O unit detected an error in the command message and was unable to
execute it.
Data Verification
To ensure secure data transmission, every I/O unit command message and every response from a I/O
unit includes a data verification field. There are two data verification methods. They are as follows:
1. Checksum modulo 256 (8-bit). Two checksum characters are sent and received in ASCII protocol
and one byte in binary protocol.
2. CRC16. Four checksum characters are sent and received in ASCII protocol and two bytes in
binary protocol.
The above data verification methods are selected by means of jumpers on the Mistic I/O unit. In addition
to the jumpers, there is a command (Command C = “Set System Options”) that allows you to further
customize the CRC data verification method to match your system needs. This command is used to set
or clear bits in the Option Control Byte. The bits that affect the CRC calculation are described below:
1-4
Mistic Protocol User’s Guide
Option Control Byte
Bit 4 = CRC initialization value: 0 = 0000, 1 = FFFF.
Bit 5 = CRC method select: 0 = reverse, 1 = classical.
Bit 6 = CRC polynomial select: 0 = CRC16, 1 = CCITT.
The factory-default value for the Option Control Byte is 00. The default CRC data verification method will
be CRC16 reverse with an initial value of 0000.
The Option Control Byte is stored in EEPROM when command E is executed and is restored upon
power-up or when the RESET command is executed.
Features
System performance and throughput are increased by allowing the I/O unit to do as much processing as
possible, thereby reducing communication link activity and host computer processing. The following
summary of I/O unit capabilities will help to determine which tasks can be performed by the I/O unit.
Digital Commands
In addition to ON/OFF control, digital I/O units provide the following:
Input Latches
All input positions can be used to record momentary events. Each input has two associated latches that
can be read or cleared. One latch is positive-edge triggered (by an OFF-to-ON transition) and the other
latch is negative edge triggered (by an ON-to-OFF transition).
Time Delays
All output positions can function in the time delay mode. Outputs can be set to operate with four types of
delays.
Delay before turning OFF
Delay before turning ON
Pulse ON
Pulse OFF
Time delays are programmable with a resolution of 100 microseconds. Delay times of 429,497 seconds
(4.97 days) are possible (32 bits).
Pulse Generation
I/O units can be instructed to generate pulses on output channels as follows:
1. OFF Pulse.
2. ON Pulse.
Mistic Protocol User’s Guide
1-5
3. Generate N Pulses.
4. Generate Continuous Square (Rectangular) Waves.
5. Generate Continuous Pulses With Time Proportional Output Period and Programmable TPO
Percentage (Duty Cycle).
ON and OFF pulses are retriggerable. ON and OFF times are independently-programmable. You can set
any output channel to generate pulses with a fixed period and then vary the duty cycle with another
command (while period remains fixed). Pulses are programmable with a resolution of 100 microseconds.
Pulse durations of up to 429,497 seconds (4.97 days) are possible (32 bits). Both the ON time and the OFF
time must be greater than 1 millisecond for continuous square wave outputs. If the period of the square
wave function is less than 10 milliseconds, then only eight channels can be active at any one time.
Event Counting
All input positions can function as event counters to return a count of external events. The count ranges
from 0 to 4,294,967,296. All 32 bits can be read, or just the least significant 16 bits of the counter can be
read. Each of the event counters can be individually enabled, read, stopped, and cleared. Frequencies of
up to 25,000 Hz can be counted.
Pulse/Period Measurements
All of the input channels can measure the duration of a positive or negative pulse or a period. The input
channel can be programmed to measure positive pulses, negative pulses, or periods. Resolution is 100
microseconds. Measurements can be read and restarted at any time. The user can read all 32 bits or just
the least significant 16 bits of the measurement.
On Time/Off Time Totalization
All of the input channels can be configured to totalize the duration of ON or OFF pulses. Resolution is
100 microseconds.
Frequency Measurements
All of the input positions can be programmed to measure frequency. Sampling rates can be in increments
of 0.1 seconds or 1.0 seconds. Frequency measurements are 0 to 25 kHz.
Configuration and Status
The input or output status (on or off) and channel configuration can be read at any time.
Store System Configuration
System configuration and event/reaction entries may be stored in EEPROM and restored upon power-up
or reset.
Reset
A Reset command generates a hardware reset.
1-6
Mistic Protocol User’s Guide
Watchdog Timer
The I/O unit has a watchdog timer which will monitor the communications link. If the communications
link has no activity for a preset time interval, the I/O unit can set all outputs to a predetermined state.
Watchdog delay times may be from 200 milliseconds to 10.9 minutes. The watchdog function is disabled
unless enabled by command.
Event/Reactions
The I/O unit may be instructed to monitor the state of the I/O or the value of a counter channel and
take action if needed. Up to 256 events may be monitored. Each event has an associated latch which
is set when the event has occurred. These event latches may be read or read and cleared by command.
A reaction command may also be set to execute upon an event occurrence. Please see Chapter 3
(Technical Information) for a detailed explanation of the event/reaction processor.
Interrupts
The I/O unit may be instructed to generate a host CPU interrupt upon any event occurrence. Remote I/O
units require an additional twisted pair for interrupts. Local I/O units do not require any additional cables.
Analog Commands
Analog I/O units support input or output functions with a resolution of 12 bits. This provides a range from
0 to 4,095 counts. Additional capabilities include the following:
Offset and Gain Calibration
Each input channel may have an offset added and/or have a gain coefficient multiplied. This allows
calibration to be done by software control.
Engineering unit Scaling
Each analog I/O channel may be scaled to use the engineering units of the application, as well as the
12-bit range from 0 to 4,095. The engineering unit scaling is done automatically when the I/O channel is
configured with the I/O module type. Configuring a channel as a generic input or output allows the user
to set any scaling range from -32,768 to 32,767.
Input Averaging and Totalization
Each analog input channel may have an averaging function which allows for digital filtering of noisy
signals. Both input and output channels may be instructed to totalize (integrate) their respective data.
Averaging is done every 100 milliseconds. Totalization may be computed every 100 milliseconds or any
multiple thereof.
Mistic Protocol User’s Guide
1-7
Output Ramping
Output channels can be instructed to ramp to any set point within the range of the module.
Configuration and Status
The input or output status (value) and channel configuration can be read at any time.
Store System Configuration
System configuration, initial output values, event/reaction entries, and PID parameters may all be stored
in EEPROM and restored upon power-up or reset.
Reset
A Reset command generates a hardware reset.
Watchdog Timer
The I/O unit has a watchdog timer which will monitor the communications link. If the communications
link has no activity for a preset time interval, the I/O unit can set all outputs to a predetermined value.
Watchdog delay times may be from 200 milliseconds to 10.9 minutes. The watchdog function is disabled
unless enabled by command.
Event/Reactions
The I/O unit may be instructed to monitor the values of input or output data and take action if a preset
limit is exceeded. Up to 256 events may be monitored. Each event has an associated latch which is
set when the event has occurred. These event latches may be read or read and cleared by command.
A reaction command may also be set to execute upon an event occurrence. Please see Chapter 3
(Technical Information) for a detailed explanation of the event/reaction processor.
Interrupts
The I/O unit may be instructed to generate a host CPU interrupt upon any event occurrence.
PID Loop Control
Up to eight PID loops may be controlled by one I/O unit. The PID input (process variable) and the set point
can come from any input or output point on the I/O unit as well as from the host computer via the data
link. The PID output must be a channel on the I/O unit. Please see Chapter 3 (Technical Information) for a
detailed explanation of the PID function performed by the I/O unit.
1-8
Mistic Protocol User’s Guide
Summary
In laying out an installation, plan to route the RS-485 data link cable to all points where you need to
install remote I/O units now, and to all points where you may need control in the future.
Make provision to supply DC power to each I/O unit location, preferably with a local power supply.
If you are using Opto 22 panels, then the +24 VDC power supplies are a part of the Mistic panels.
Choose a baud rate and protocol compatible with your host computer, and make this information
available to the hardware installer — it is nessary when setting the jumpers on each remote I/O unit.
Assign a unique address to each I/O unit. Addresses may appear in any order from beginning to end of
the data link, however every address must be unique — no two controllers may share the same address.
There is no requirement for consecutive addresses; the entire range of addresses may be used. Try to
relate the address to a location or function.
Outline the functions of the application software. Take advantage of the Mistic I/O unit’s processing
capability to off-load host computer processing time and to reduce data link activity.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282
  • Page 283 283
  • Page 284 284
  • Page 285 285
  • Page 286 286
  • Page 287 287
  • Page 288 288
  • Page 289 289
  • Page 290 290
  • Page 291 291
  • Page 292 292
  • Page 293 293
  • Page 294 294
  • Page 295 295
  • Page 296 296
  • Page 297 297
  • Page 298 298
  • Page 299 299
  • Page 300 300
  • Page 301 301
  • Page 302 302
  • Page 303 303
  • Page 304 304
  • Page 305 305
  • Page 306 306
  • Page 307 307
  • Page 308 308
  • Page 309 309
  • Page 310 310
  • Page 311 311
  • Page 312 312
  • Page 313 313
  • Page 314 314
  • Page 315 315
  • Page 316 316
  • Page 317 317
  • Page 318 318
  • Page 319 319
  • Page 320 320
  • Page 321 321
  • Page 322 322
  • Page 323 323
  • Page 324 324
  • Page 325 325
  • Page 326 326
  • Page 327 327
  • Page 328 328
  • Page 329 329
  • Page 330 330
  • Page 331 331
  • Page 332 332
  • Page 333 333
  • Page 334 334
  • Page 335 335
  • Page 336 336
  • Page 337 337
  • Page 338 338
  • Page 339 339
  • Page 340 340
  • Page 341 341
  • Page 342 342
  • Page 343 343
  • Page 344 344
  • Page 345 345
  • Page 346 346
  • Page 347 347
  • Page 348 348
  • Page 349 349
  • Page 350 350
  • Page 351 351
  • Page 352 352
  • Page 353 353
  • Page 354 354
  • Page 355 355
  • Page 356 356
  • Page 357 357
  • Page 358 358
  • Page 359 359
  • Page 360 360
  • Page 361 361
  • Page 362 362
  • Page 363 363
  • Page 364 364
  • Page 365 365
  • Page 366 366
  • Page 367 367
  • Page 368 368
  • Page 369 369
  • Page 370 370
  • Page 371 371
  • Page 372 372
  • Page 373 373
  • Page 374 374
  • Page 375 375
  • Page 376 376
  • Page 377 377
  • Page 378 378
  • Page 379 379
  • Page 380 380
  • Page 381 381
  • Page 382 382
  • Page 383 383
  • Page 384 384
  • Page 385 385
  • Page 386 386
  • Page 387 387
  • Page 388 388
  • Page 389 389
  • Page 390 390
  • Page 391 391
  • Page 392 392
  • Page 393 393
  • Page 394 394
  • Page 395 395
  • Page 396 396
  • Page 397 397
  • Page 398 398
  • Page 399 399
  • Page 400 400
  • Page 401 401
  • Page 402 402
  • Page 403 403
  • Page 404 404
  • Page 405 405
  • Page 406 406
  • Page 407 407
  • Page 408 408
  • Page 409 409
  • Page 410 410
  • Page 411 411
  • Page 412 412
  • Page 413 413
  • Page 414 414
  • Page 415 415
  • Page 416 416
  • Page 417 417
  • Page 418 418
  • Page 419 419
  • Page 420 420
  • Page 421 421
  • Page 422 422
  • Page 423 423
  • Page 424 424
  • Page 425 425
  • Page 426 426
  • Page 427 427
  • Page 428 428
  • Page 429 429
  • Page 430 430
  • Page 431 431
  • Page 432 432
  • Page 433 433
  • Page 434 434
  • Page 435 435
  • Page 436 436
  • Page 437 437
  • Page 438 438
  • Page 439 439
  • Page 440 440
  • Page 441 441
  • Page 442 442
  • Page 443 443
  • Page 444 444
  • Page 445 445
  • Page 446 446
  • Page 447 447
  • Page 448 448
  • Page 449 449
  • Page 450 450
  • Page 451 451
  • Page 452 452
  • Page 453 453
  • Page 454 454
  • Page 455 455
  • Page 456 456
  • Page 457 457
  • Page 458 458
  • Page 459 459
  • Page 460 460
  • Page 461 461
  • Page 462 462
  • Page 463 463
  • Page 464 464
  • Page 465 465
  • Page 466 466

OPTO 22 Mistic Protocol User guide

Type
User guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI