Page 1
SNAP I/O MODULE INTEGRATION GUIDE Form 0876-160623—June 2016 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: support@opto22.com Web: support.opto22.com...
Page 2
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.
SNAP input/output (I/O) modules without a SNAP serial or Ethernet-based brain. This guide also applies to OEMs using SNAP I/O modules with an Opto 22 OEM brain such as the SNAP-ARL-ASDS. I/O module physical and electrical interfaces and specifications are included, as well as details of the protocols necessary for communication.
SNAP Mechanical Power Relay Output Module Data Sheet Communicating with SNAP I/O Modules Many SNAP I/O modules can be used either with or without an Opto 22 mounting rack and with or without an Opto 22 brain. If you are using a Linux-based OEM brain, you must use an Opto 22 rack, because the brain’s only method of communicating with analog and serial modules is via the ARCNET communication built into the rack.
Commands—Complete list of commands and the protocols they are used with, plus details of the data required for each command. For Help If you have problems using SNAP I/O modules and cannot find the help you need in this guide or on our Web site, contact Opto 22 Product Support. Phone:...
Page 10
FOR HELP SNAP I/O Module Integration Guide...
1 of the electrical connector. Using Modules with an Opto 22 Mounting Rack If you are using an Opto 22 mounting rack, the retention rail is built into the rack. The following graphic shows a mounting rack with the retention rail.
Using Modules without an Opto 22 Mounting Rack If you are not using an Opto 22 rack, lengths of retention rail suitable for mounting four modules or six modules are available from Opto 22 distributors. The rails come in packs of 25: •...
4-channel digital modules require only 5-volt power and TTL level data connections to signals D0 through D3 on pins 2, 4, 6, and 8. Like earlier Opto 22 digital modules, SNAP 4-channel digital modules use low-true logic (also called negative-true logic). A digital input point that is on returns a logic 0 signal.
“Module Addresses” on page 12 for details. 2. An Opto 22 AC37 adapter card connection is shown as typical. Any RS-485 serial port may be used. 3. Optional shielding may be used to reduce noise on communications. Shields must not be grounded on both ends of the communication link, but should be grounded on one end only.
5.5 VDC SNAP-AIV SNAP analog output modules have 12-bit resolution, supporting counts from 0 to 4095 for a total of 4096 counts. There are no under-range or over-range limits. Unipolar and bipolar modules both receive zero counts at low scale, as shown in the examples below:...
3: Communication Protocols Introduction Opto 22 4-channel digital I/O modules require no protocol; they are simply read or written to using 5 VDC signals. Analog, high-density digital (HDD), and serial I/O modules, however, are “smart” modules. Each one includes a processor. As shown in the table on...
+5 Volt Point Numbers Opto 22 point numbers on each module start with zero. The points on a four-channel analog input module, for example, are referred to as point 0, point 1, point 2, and point 3. SNAP I/O Module Integration Guide...
Serial Protocol Details Unlike earlier Opto 22 protocols (such as mistic), every message in the SNAP I/O serial protocol contains the address of both the source and the destination. A sequence identifier has also been added to keep track of sequences of commands and responses. This provision allows smart devices to perform with reduced communication overhead, resulting in higher performance.
The data verification field (DVF) is calculated on the complete binary message. (For ASCII, the complete binary message including DVF is converted to ASCII.) In the serial protocol, SNAP modules allow two types of data verification to be used on message transactions, checksum and CRC16.
Calculating a CRC16 CRC16 calculation is more complex. For CRC calculations, the method used is CRC16 Reverse, and the seed (or starting) value is zero. Please see Opto 22 form #270, the Mistic Analog and Digital Command Manual, for more information.
The next example is a response to the Command 52 sent above, which read the values of the two points on a SNAP-AIV analog input module. The response returns four 16-bit values, but since the module has only two points, only the upper four bytes are significant.
The physical connections required for ARCNET communication are built into the Opto 22 SNAP mounting rack. If you are using a SNAP-ARL-ASDS brain, you need to use the Opto 22 rack in order to communicate with analog and serial modules.
Sequence ID to distinguish it from the previous message. The response sequence ID identifies the message being responded to. Upper nibble is bank number (for SNAP modules, always 0); lower nib- Bank number and BNK / MST ble is Opto 22-defined classification of the message type.
Here is an example of a response to a Command 52 (Group Read) reading the values of the two points on a SNAP-AIV analog input module at address 8A. The response returns four 16-bit values, but since the module has only two points, only the upper four bytes are significant.
GLOBAL PROTOCOL DEFINITIONS Global Protocol Definitions The following tables define Opto 22 product categories, message types, and error responses. These tables apply to both serial and ARCNET protocols. Product Categories 0 - F (Hex) Reserved Numbers used by current products...
Analog Input Modules with Four Points or Less The following table shows module types and channel modes for SNAP analog input modules with four points or less. All numbers are shown in hex. Defaults are indicated by an asterisk (*). To change...
2 channels, –0.5 to +0.5 VDC (high impedance) * Default ** The SNAP-AIPM module monitors one device from point 0 (volts) and point 1 (amps). Points 2 and 3 return calculated values. See form #1453, the SNAP AIPM Modules Data Sheet, for details.
Page 30
** The SNAP-AIPM-3 and SNAP-AIPM-3V modules monitor three phases from points 0, 4, and 8 (volts) and points 1, 5, and 9 (amps). All other points return calculated values. See form #1453, the SNAP AIPM Modules Data Sheet, for details.
IMPORTANT: The commands in this chapter support the following serial communication modules only: • SNAP-SCM-232 Revision A modules (manufactured in June 2003 or after) with firmware R1.1e or higher. These modules support optional RTS/CTS flow control. • SNAP-SCM-232 modules manufactured before June 2003 with firmware R1.1o. These modules do not support RTS/CTS flow control.
41 Set TPO Period (SNAP-AOD-29 modules only) page 42 Write Outputs page 42 Read Status (TPO, Inhibit On/Off) (SNAP-AOD-29 modules only) page 43 Clear Serial Port Receive Buffer page 43 Read Serial Port CTS (SCM-232 Rev A modules only)
Page 35
Write Serial Port Configuration and Store to Flash page 48 Receive Line of Serial Data page 48 Send & Receive Serial Data page 49 Send Serial Data page 49 *HDD = high-density digital **SNAP-SCM-232 and SNAP-SCM-485-422 modules only SNAP I/O Module Integration Guide...
COMMAND DETAILS Command Details Read Number of Received Data Bytes Waiting Command 23 (SNAP-SCM-232 and SNAP-SCM-485-422 modules only) ARCNET protocol only. This command reads the quantity of bytes waiting in the serial port’s receive buffer. Command Data Required 1 byte...
For a similar command to use with 4-channel analog input modules, see “Set Channel Mode Command 3A,” above. Command Data Required 1 byte 1 byte Channel (point) number Data 1 byte Point configuration (see page Response Data Received No response data SNAP I/O Module Integration Guide...
Notes: Normal Arcnet command/response times are on the order of milliseconds, so 6 seconds without any Arcnet communication would indicate an abnormal condition. The command watchdog timer is available on most SNAP I/O modules manufactured after 2004. It is strongly recommended that you use command 40 with modules that support the command watchdog timer.
This command causes a soft reset of the module’s microprocessor. Like the automatic reset upon powerup, this Reset command must be followed by a Powerup Clear command (41) to restore normal operation. Command Data Required 1 byte Response Data Received No response data SNAP I/O Module Integration Guide...
COMMAND DETAILS Read Amount of Unused Space in Transmit Buffer Command 42 (SNAP-SCM-232 and SNAP-SCM-485-422 modules only) ARCNET protocol only. This command reads the number of bytes of available space in the specified serial port’s transmit buffer. This command can be used to prevent overrun of the buffer.
This command sets or resets the module’s serial port parameters for communication using the serial protocol. See “Serial Communication” on page Command Data Required 1 byte Data 1 byte Serial port configuration. See “Serial Communication” on page Response Data Received No response data SNAP I/O Module Integration Guide...
Read Module Firmware Version Command 49 (All modules except SNAP-SCM-232 and SNAP-SCM-485-422) This command is used for troubleshooting, usually with the help of Opto 22 Product Support; it reads the version number of the module’s firmware. Command Data Required 1 byte...
Group Read Command 52 (Analog 4-channel input and SNAP-AOD-29 TPO modules only) For analog input modules, this command returns four 16-bit values, corresponding to points 0–3 on the module. The data is unmodified from the ADC (analog-to-digital converter); however, offset and gain modifications are applied.
(Future use) Receive Serial Data Command 52 (SNAP-SCM-232 and SNAP-SCM-485-422 modules only) ARCNET protocol only. This command receives up to the number of serial bytes specified on the specified port, to a maximum of 249. This command does not look for an end-of-line (EOL) character. To receive a line of...
Command Data Required 1 byte Response Data Received 2 bytes Point 31 counter 2 bytes Point 30 counter Data 2 bytes Point 29 counter 2 bytes Point 28 counter etc. etc. to Point 0 SNAP I/O Module Integration Guide...
Cold junction counts for specified point Channel Write Command 56 (Analog output and SNAP-AOD-29 TPO modules only) On an analog output module, this command writes a 16-bit value (12 bits used) to the specified output channel (point) on the module.
Command 57 (SNAP-AOD-29 TPO modules only) This command sets the time-proportional output (TPO) period for a single channel (point) on a SNAP-AOD-29 output module. Use command 56 to set the TPO “on” time. Command Data Required 1 byte 1 byte...
Command 58 (SNAP-AOD-29 TPO modules only) This command reads an 8-bit value from the SNAP-AOD-29 TPO module. The 8-bit value contains the output status, the inhibit status, and the output status just prior to inhibit. Only the first six bits are used.
COMMAND DETAILS Read Serial Port CTS Command 66 (SNAP-SCM-232 Rev A modules only) Subcommand 72-63 ARCNET protocol only. This command reads the state of the CTS signal for the specified serial port. NOTE: If this command is used on a serial module with hardware prior to Rev A, an undefined command error is returned.
ARCNET protocol only. This command reads module type and hardware and firmware versions. NOTE: If this command is used on a serial module with older hardware (SNAP-SCM-232 prior to Rev A or SNAP-SCM-485), an undefined command error is returned. Command Data Required...
COMMAND DETAILS Read Serial Port Configuration Command 71 (SNAP-SCM-232 and SNAP-SCM-485-422 modules only) Subcommand 67 ARCNET protocol only. This command reads the port configuration for all serial ports on the module. Command Data Required 1 byte SCMD 1 byte Response Data Received...
CHAPTER 4: COMMANDS Write Serial Port Configuration Command 71 (SNAP-SCM-232 and SNAP-SCM-485-422 modules only) Subcommand 6E ARCNET protocol only. This command writes port configuration to all serial ports on the module. Configuration is not stored to flash; to write the configuration and store it to flash, use command 71 with subcommand (page 48).
COMMAND DETAILS Write Serial Port Configuration and Store to Flash Command 71 (SNAP-SCM-232 and SNAP-SCM-485-422 modules only) Subcommand 73 ARCNET protocol only. This command writes port configuration to all serial ports on the module and stores configuration to flash. If you don’t want to store to flash, use command 71 with subcommand 6E (page 47).
CHAPTER 4: COMMANDS Send & Receive Serial Data Command 73 (SNAP-SCM-232 and SNAP-SCM-485-422 modules only) ARCNET protocol only. This command transmits up to 247 data bytes out the specified serial port and immediately returns any data in the serial port’s receive buffer in response. This command is the same as using command...
, 15 message format data sheets for modules , 16 response format , 13 data verification , 20 BNK/MST , 14 serial protocol digital module description electrical specifications , 20 categories for products mechanical specifications SNAP I/O Module Integration Guide...
Page 58
, 10 Group Read power requirements , 39 , 1, 21 Group Write types identifying , 35 mounting rack , 20 hardware , 45 reading version serial modules supported help Opto 22 Product Support Product Support SNAP I/O Module Integration Guide...
Page 59
, 33 Reset SNAP-SCM-485 serial module resolution SNAP-SCM-485-422 serial module response specifications , 20 errors electrical , 19 message format (ARCNET protocol) mechanical , 16 message format (serial protocol) module data sheets , 10 power requirements SNAP I/O Module Integration Guide...
Page 60
, 42 Write Outputs , 47 Write Serial Port Configuration , 48 Write Serial Port Configuration and Store to Flash , 39, 41 writing to analog output under range SNAP I/O Module Integration Guide...
Need help?
Do you have a question about the SNAP and is the answer not in the manual?
Questions and answers