SuperLogics ADC-1R2 User Manual

ADC-1R2
I/O Module
Digital I/O
Analog I/O
SuperLogics
SuperLogics Inc. Phone 781-893-1600 300 Third Avenue Fax 781-893-0600 Waltham, MA 02451 Tech E-Mail support@superlogics.com
http://www.superlogics.com
Table of Contents
Introduction
Features .........................................................................................3
Quick Start ....................................................................................4
Communications
RS-232 Packet Information ...........................................................6
Commands and Responses
Command and Response Table ....................................................7
Command and Response Examples ............................................8
Analog Control Nibble ....................................................................9
Module Configuration
EEPROM Map .............................................................................10
EEPROM Map .............................................................................11
Sampling rates
Analog and digital ........................................................................12
Modes of Operation
Polled Mode .................................................................................12
Asynchronous Update Mode .......................................................12
Continuous stream Mode .............................................................13
Continuous stream Mode Configuration EEPROM Map ..............14
Continuous stream Mode Example ..............................................15
Digital I/O Technical Information
Digital I/O Characteristics ............................................................16
Digital I/O Port Configuration Example ........................................16
PWM Characteristics ...................................................................17
PWM Commands .........................................................................17
Analog I/O Technical Information
Analog I/O Characteristics ...........................................................18
Voltage References .....................................................................18
Analog Voltage Sampling ............................................................18
Analog Conversion ......................................................................19
Analog Offset Calibration .............................................................19
Analog Current Sampling ............................................................20
Analog Current Conversion .........................................................20
Digital & Analog I/O Port Specifications
Digital & Analog pin outs ..............................................................21
Module Specifications
PCB Illustrations ..........................................................................22
Dip switch and jumper settings ....................................................22
ADC-1R2 Series Module Specifications .......................................23
232 cabling and specifications .....................................................23
Peripherals
Analog Connection Board ...........................................................24
Signal Conditioner Board ............................................................24
DB15/DB25 Terminal Strip Board ...............................................24
Digital Interface Board ................................................................24
Introduction
Welcome to the SuperLogics ADC-1R2 Series of I/O modules. These modules using RS-232 communications are available in different configurations dependent on your needs and applications. In addition they are offered in an enclosure, or open allowing you the end user complete flexibility when determining the parameters for your project.
In addition SuperLogics offers a full line of peripheral attachment boards for analog signal conditioning and digital I/O interface. These boards conveniently plug into the main unit for ease of installation. See page 24.
Configurations for 232M200 models with enclosure are:
ADC-1R2-DIO 16 digital I/O ADC-1R2 16 digital I/O and 8 channels A/D conversion ADC-1R2-AOT 16 digital I/O and 8 channels A/D conversion and 2 channels D/A conversion
I/O Module features:
MPU: Microchip PIC16C65B EEPROM: Microchip 25C040 MPU Clock: 14.7456 Mhz Interface: RS-232 (single ended) Baud: 9600, 19200, 57600, 115200 (DIP switch selectable) LED: Bicolor diagnostic LED Watchdog: MPU has built-in watchdog timer POR: MPU contains timed Power On Reset circuitry Brownout: MPU brownout detection ciruictry built-in Temperature: 0° to 70°C (32° to 158°F) Commercial Temperature Range
-40° to 85°C (40° to 185°F) Industrial Temperature Range PCB: FR4 Power: 7.5Vdc to 15.0 Vdc (approx. 50 ma nominal power) Peripherals See the plug in peripheral section on page 24.
ADC-1R2 Series Features
16 Digital I/O lines
8 12 bit Analog Inputs
2 12 bit Analog Outputs
PWM Output
32 bit Pulse Counter 1 Mhz
RS-232 Full duplex
50’ max.
ADC-1R2
12 bit analog
acquisition
digital I/O lines
Quick Start Instructions
You need the following:
EZTerminal program available free on our website http://www.SuperLogics.com
An open COMPORT on your PC
Power supply PS9J (9VDC 400 ma unregulated)
A cable to connect your PC (C9F9M-6 6 foot serial cable)
Make these DIP switch settings for 115,200 baud SW1: ON SW2: ON (These are factory default settings, see page 21)
Launch the EZTerminal program
1. Double click the icon in whatever area you have put the program.
2. Under “Settings” then choose Comport and select your RS-232 port, 115,200 Baud Rate, 8 Data Bits, NO PARITY, and 1 Stop Bits.
3. Under “Settings” now choose “Terminal Settings”, and check the “Append LF to incoming CR” box, and “Local echo typed characters” check box.
4. You may change the color of the transmitted and received characters by going under “Settings” and selecting “Colors” then “Transmit” or “Receive” and pick the color of your choice.
Step 1
Steps 2 & 3
Your First Command Now that you have a EZTerminal session running, your ready to power up the ADC-1R2 Series I/O Module. After powering up your ADC-1R2 Series Module, EZTerminal will
receive a welcome message from the unit indicating you are ready to provide your first command.
RS-232 Firmware Version 3.1 Command:
Typethe letter V and the Enter Key
You should see V30 on the screen
NOTE: Make sure to type CAPITAL V, not lowercase v!
After your first command, see Commands and Responses section for more commands.
Screenshots and setup instructions performed running EZTerminal on a PC installed with Microsoft® Windows® XP Operating System.
Step 3
Step 4
Step 4
Step 2
Communications
The SuperLogics ADC-1R2 Series I/O Modules support RS-232 communications interface using simple ASCII commands. A carriage return (decimal code 13 or Hex code 0x0D) marks the end of each command. Line feeds (decimal code 10 or Hex code 0x0A) are ignored.
RS-232 Interface:
RS-232 operates Full Duplex
RS-232 modules can also enter Continuous Stream Mode whereby the module is
configured via EEPROM settings to continuously send data to output its current Digital, Counter or Analog readings.
RS-232 Command Format
NOTE
All numeric data is represent as ASCII Hexadecimal integers (values x/y in the
Command and Response table)
If a module receives an illegal or improperly formatted command, Error Response is
sent.
All ASCII characters are CASE SENSITIVE (use all capital letters!)
RS-232 Command Format
CR
carriage return
13 (0x0D hex)
Command/Response
ASCII
Commands and Responses v3.0 Firmware
Command
Sent by Host
Response
Sent by I/O Module
Description
V Vxy Firmware version x.y
I Ixxyy Input digital port status
xx = PORT1 yy = PORT2
Also returns current output port status
Oxxyy O Output digital port:
xx = PORT1 yy = PORT2)
Txxyy T Set digital direction:
xx = PORT1 yy = PORT2 bit set(1) = Input, bit clear(0) = Output
G Gxxyy Get current digital direction:
xx = PORT1 yy = PORT2 bit set(1) = Input, bit clear(0) = Output
N Nxxxxxxxx Get Pulse Counter
(xxxxxxxx 32 bit counter value)
M M Clear Pulse Counter
Qy Qyxxx Bipolar sample analog (y control nibble,
xxx analog value)
Uy Uyxxx Unipolar sample analog (y control niblle,
xxx analog value)
Lyxxx L D/A output (y channel setting 0 or 1,
xxx 12 bit D/A output)
K Kxx Get receive error count (xx current count)
J J Clear receive error count
Pxxyyy P PWM (xx = PWM frequency, yyy = PWM duty)
Wyyxx W Write EEPROM (yy address, xx value)
Ryy Rxx Read EEPROM (yy address in command, xx
value in reponse)
S S Start continuous stream mode
H H Halt continuous stream mode
Z Z Reset CPU
X Command error response
Commands and Responses
The following table illustrates actual command and response data for an RS-232 interface.
NOTE:
All numeric data is represent as ASCII Hexadecimal integers.
The symbol ↵ equates to a carriage return (decimal 13, hex 0x0D).
Command
Sent by Host
Response
Sent by I/O
Description
V V30
Module Firmware version 3.0
I IFF00
Input digital port [PORT1 bits0-7 ON] [PORT2 bits0-7 OFF] Note: this command also returns the current digital output
O007F O
Output digital port [PORT1 bits 0-7 OFF] [PORT2 bit 7 OFF, bits 0-6 ON]
TFF80 T
Set digital direction [PORT1 bits 0-7 INPUT] [PORT2 bit 7 INPUT, bits 0-6 OUTPUT]
G GFF80
Get current digital direction [PORT1 bits 0-7 INPUT][PORT2 bit 7 INPUT, bits 0-6 OUTPUT]
N N0000000F
Get pulse counter: Current count = 15
M M
Clear pusle counter: Current count = 0
Q1 Q100F
Bipolar analog control nibble = 0x1 Analog reading = 0x00F
U8 U840F
Unipolar analog control nibble = 0x8 Analog reading = 0x40F
L1800 L
D to A Output Channel 1 = 2.5 Volts
K K00
Current receive errors = 0
J J
Clear receive error count: Current receive errors
P4801F P
PWM freq = 50499 Hz, PWM duty = 10.6%
W0410 W
Write EEPROM Address 0x04 with value 0x10
R04 R10
Read EEPROM Adress 0x04 (value is 0x10)
S S
IFF00 Q100F IFF00 Q100F
START continuous stream mode See Modes of Operation section
This example illustrates continuous stream mode configured to continuously update with Input Digital Port command and Query Analog command with control 0x1. The module
continues until a command His received.
H H
HALT continuous stream mode
Z Z
Reset CPU (forces a watchdog timeout)
Loading...
+ 16 hidden pages