s3000/s4000 rtu user’s reference manual user's reference.pdf · 2007-01-23 · - 3 -...
TRANSCRIPT
S3000/S4000 RTU
User’s Reference Manual
Software Version 6.2.1
January 23, 2007
Copyright 1997-2007 Micro-Comm, Inc.
Table of Contents
Introduction ....................................................................................................................................................3Specifications and Sales Information .............................................................................................................4Board Connections and Jumpers ....................................................................................................................5Sample Wiring Diagram ................................................................................................................................6Expansion I/O Module Setup ....................................................................................................................... 11Display Module Operation ...........................................................................................................................12Software Description ...................................................................................................................................13Allen-Bradley DF1 and Modbus Protocol Support .....................................................................................16S4000 RTU Configuration Program .............................................................................................................17
Program Installation ...............................................................................................................................17RTU Information Screen ........................................................................................................................18Configuration Parameters .......................................................................................................................19Analog Labels and Scaling Factors ........................................................................................................22Output Timer Labels ..............................................................................................................................23Stop/Start Setpoint Labels ......................................................................................................................24User Variable Labels ..............................................................................................................................25Discrete I/O Labels ................................................................................................................................26RTU Script Language Editor .................................................................................................................27Data Table Viewer ..................................................................................................................................28Display Module Emulator ......................................................................................................................29Debug Terminal ......................................................................................................................................30
RTU Script Language Syntax ......................................................................................................................31Personality Module Memory Map ...............................................................................................................39
- 3 -
Introduction
This manual is intended to be the source of all information concerning the Micro-Comm S4000 RTU as well as the S3000 RTU. The S3000 RTU is a stripped-back S4000 having only 4 relay outputs and four 8-bit analog inputs.
The S4000 is a third-generation Micro-Comm RTU that currently runs software that makes it compatible with Micro-Comm CTU 7, 8 and 9 central software. CTU 7 and 8 are used in older card racks and CTU 9 runs in the C2000 single-board central. What this means is that the S4000 uses Enhanced Control Card data communications protocol. Please refer to the Control Card software description for information on this protocol. The following list summarizes the features and I/O capabilities in the S4000:
• Two completely separate Enhanced Control Card software modules - separate automote times etc.• A third Control Card module whose address is stored in the Personality Module - No automote control capability but can
be used to monitor another station for use in script• User programmable using a Windows or Macintosh software package (RTU Configuration)• The FLASH ROM may be reprogrammed with new versions of the core software• An RS-232 display module is supported for user displays and input• Adjustable baud rate, data bits, stop bits, PTT time and parity for radio communication• Adjustable Automote, LOS and Cycle times for backup control• Automote transmissions can be turned on or off• Adjustable controlling-RTU address• User entered relay output timer settings (both ON and OFF timers)• User entered stop/start settings for automote control or script language use• Display Labels for all analog inputs, discrete I/O and controlling RTU levels • Scaling factors and offsets (range and preset) for all analog displays• Adjustable pulse dividers for both pulse inputs• DF1 Half-Duplex Slave protocol option on the COM1 radio port• Modbus RTU Slave and Master protocol options on the COM1 radio port• RS-485 port for expansion I/O or Modbus RTU Master communication• RTU Script Language Programmability
Note: A later model S4000 utilizes a 32bit processor (like the S4500 PLC). This model, known as “Version 7”, runs much faster, has larger communication buffers and includes the following capabilities:• PID() function can have up to 8 loops running simultaneously• DF1 Half-Duplex Master and Modbus/TCP protocols added• Script main and subroutine sizes increased• User Memory expanded to 6000 words• Pulse input counters added to DI1-DI16 (PI3=DI1 - 50Hz max)• Added ECCTABLE() function to allow RTU to reply with up to 64 addresses • Added TSEC17-TSEC32 timer variables
I/O capabilities:(8) Relay outputs(8) Open-collector outputs(8) Relay read-back inputs(16) Discrete inputs (contact closure)(8) 12-bit analog inputs (0-20mA or 0-5volt dip switch selectable)(8) 8-bit analog inputs (4) are 0-5volt analogs AI9-AI12 on the terminal blocks (4) are internal: box temp., battery volts, battery current and receive signal strength(2) Pulse inputs - high speed(2) RS-232 communication ports - COM1 is the radio (COM1B=9pin monitor port, COM1A=25pin for radio cable) - COM2 is used for the display and programming (baud rate fixed at 9600) (1) RS-485 communication port
- COM3 is a 4-wire RS-485 port for I/O modules or for Modbus communication(1) Address input switches (12-bits)
- 4 -
I/O• 8 Form C Relay Outputs, 5A @ 250VAC • 8 Open Collector Outputs, 100mA @ 12VDC• 16 Optically Isolated Discrete Inputs, Dry Contact or Pulse Inputs• 2 Optically Isolated High Speed Pulse Input,
12.8KHz Resolution • 1 Pulse Amplification Circuit for Direct Connection to Flow Meter• 12 Analog Inputs 8ch, 12bit, 0-5V or 0-20mA Switch Selectable 4ch, 8 bit, 0-5V• 1 Analog Amplifier Circuit• 4 Additional On-Board Sensor Analog Inputs Box Temperature, 0-150°F Battery Current, ±10A System Voltage Receive Signal Strength
Communications• COM-1A, Radio Port 25pin Sub-D Male, RS-232 and RF signals• COM-1B, Radio Monitor Port 9pin Sub-D Male TxD, RxD, RTS, GND• COM-2, Front Panel Display 9pin Sub-D Male RS-232 w/flow control lines • COM-3, RS-485• Plug In RF MODEM 0-300, 600, 1200/2400 BAUD
CPU and Memory• 8bit MCU running 8MHz• 32K FLASH EPROM, Application Program• Up to 32.5K RAM, Data• 8.5K EEPROM, Configuration• 8K UVEPROM, BIOS
Power Source and Supplies• 120/240 VAC Power Input Isolation transformer
and Surge Suprestion• SOLAR charging circuit• Battery charging and backup circuit• 13.8VDC @ 8A Switching Power supply• 12 to 24VDC @ 200mA Sensor Excitation power supply
SCADA Systems: Water Distribution Control and Management Waste Water Control and Monitoring Golf Course Irrigation Agricultural Irrigation Gas and Oil Monitoring Electrical Distribution MonitoringLocal Control: Constant and Variable Speed Pump Stations Metering Stations Water and Waste Water Treatment Plants
The S4000 RTU is a reliable, full-feature Remote Terminal Unit. It is a "smart" unit providing both programmability and interchangeability through a plug-in memory module. As an integrated component of a Supervisory Control and Data Acquisition System (SCADA), the S4000 provides input and output (I/O) monitoring and control with simultaneous "distributed" (RTU to RTU) and "central" (CTU to RTU) type control operations. Its universal communications interface can provide robust control and data transfer via radio, dedicated line, phone line, and fiber optic communication media.
Part Number for Ordering: L15-L17A-0
Memory: 0 - 8K SRAM 1 - 8K Battery Backed SRAM w/Clock 2 - 32K SRAM 3 - 32K Battery Backed SRAM w/Clock
Applications:
Description: Specifications:
Modem: 0 - none (110-19200 baud RS-232) L17 - 0-300 baud radio modem L17A - 0-600 baud radio modem
Specifications and Sales Information
- 5 -
Board Connections and Jumpers
The diagram below shows where all I/O terminal blocks, communications ports, jumpers, switches and other important items are located.
COM2
COM1B
COM1A
Processor Board
Radio Modem
ON/OFF
AUX I/O
DTR12V
COM3
AA-OUT AGND
Analog Input Switches RTU Address Switches1
0
0-20mA
0-5V
TX+TX-RX+RX-SGND+12VGND
FLASH ROM
BIOS EPROM
RAM/CLOCK
Output Relays
- 6 -
Sample Wiring Diagram
GND
+24VAC
-24VAC
POWER CONNECTION:120VAC Power by Others - useseparate 15A circuit breaker.
120VAC/24VACTransformer
(by Micro-Comm)
15A-C B
S4000 RTU PANEL
L1
N
G
POWER CONNECTIONS - TB1
BATT+
BATT-
? A/Hr Battery
DISCRETE OUTPUTS - TB2/TB3
Pump #1 CallDO1-NO
DO1-C
DO1-NC
Discrete Ouput #1
Pump #2 CallDO2-NO
DO2-C
DO2-NC
Discrete Ouput #2
Pump #3 CallDO3-NO
DO3-C
DO3-NC
Discrete Ouput #3
DO6-NO
DO6-C
Telemetry Control - Fails Closed(wired in series with existing pressure backup"CALL")DO6-NC
Discrete Ouput #6
ECC #1
ECC #2
Valve #1 CallDO7-NO
DO7-C
DO7-NC
Discrete Ouput #7
Valve #2 CallDO8-NO
DO8-C
DO8-NC
Discrete Ouput #8
- 7 -
S4000 RTU PANEL
DISCRETE INPUTS - TB4/TB5DI1
COM
Aux.
Discrete Input #1Pump #1 Run
DI2
COM
Aux.
Discrete Input #2Pump #2 Run
DI3
COM
Aux.
Discrete Input #3Pump #3 Run
DI4
COM
Discrete Input #4
DI5
COM
Discrete Input #5
DI6
COM
Discrete Input #6
DI7
COM
Aux.
Discrete Input #7Valve #1 Open
DI8
COM
Aux.
Discrete Input #8Valve #2 Open
DI9
COM
Discrete Input #9
DI10
COM
Discrete Input #10(DI9-DI16 are IEM Inputs 1-8)
DI11
COM
Discrete Input #11
DI12
COM
Discrete Input #12
DI13
COM
Discrete Input #13
ECC #1
DI14
COM
Discrete Input #14
ECC #2
ECC #1
- 8 -
S4000 RTU PANEL
DI15
COM
Discrete Input #15
DI16
COM
Discrete Input #16
DISCRETE INPUTS - TB4/TB5
ANALOG INPUTS - TB7 thru TB9
24V-EX
AA+
AGND
Analog Input #1 with amplifier circuit
+
-
GND
Micro-Comm60 psi
Transducer
3 conductor shielded cable
shield connected to GND
AA-OUT
AI1
R-
R+
JUMPER
SpanResistor
AA-
AGND
JUMPER
Tank Level Transducer0-60 psi = 4-20mA
24V-EX
AI2
AGND
Analog Input #2
Discharge Pressure Transducer0-300 psi = 4-20mA
+
-
GND
Micro-Comm300 psi
Transducer
3 conductor shielded cable
shield connected to GND
PULSE INPUTS - TB6
3 conductor shielded cable12V-EX
PI1
GND
Pulse Input #1Electronic Flow Meter Head
+
Sig
Gnd
Flow MeterHead
(by others)
shield connected to GND
3 conductor shielded cable12V-EX
PI2
GND
Pulse Input #2Electronic Flow Meter Head
+
Sig
Gnd
Flow MeterHead
(by others)
shield connected to GND
ECC #2
ECC #1
ECC #1
- 9 -
S4000 RTU PANEL
RADIO CONNECTION - COM1A25 Pin Male Sub-D Connector
Pin 16
Pin 14Pin 19
12VDC
TXA
RXA
PTT
MotorolaModel SM50
Radio
BLK
12345678
RJ-45Jack
GND
GND RED
GRY
12 AWG BLK + Pwr- Pwr
Radio Connection: Radioconnected to S4000 using 8 conductor flat phone cable with 25 pin female Sub-D connectorto RJ-45 phone plug. Antennaconnected to lightning arrestor using RG8U coax.
Pin 13Pin 12
39KΩ Resistor
12VDC12 AWG RED
Pin 7GRN
GND TB1 MDL 4A
FUSE
Antenna
CoaxLightningArrestor
Station Address Dip Switch-SW2ECC #1 Address = ??
ECC #2 Address = ??
Switches 1-4 set RTU #2's first characterSwitches 5-8 set RTU #1's first characterSwitches 9-12 set both RTU's last character
RTU ADDRESSSELECTION SW2
1 5 9
ON = 1
OFF = 0
- 10 -
S4000 RTU PANEL
Discrete Output #7
AUXILIARY OUTPUTS25 Pin Female Sub-D Connector
Pin 4
Pin 5
Pin 6
Pin 7
Pin 8
Pin 9
Pin 10
Pin 11
Pin 12
Pin 13
Pin 16
Pin 17
Pin 18
Pin 19
Pin 20
Pin 21
Pin 22
Pin 24
Pin 25
Pin 23
Discrete Output #5
Discrete Output #3
Discrete Output #1
+13.8VDC
+13.8VDC
Software Output #1 (DO9)
+13.8VDC
+13.8VDC
Discrete Output #8
Discrete Output #6
Discrete Output #4
Discrete Output #2
?
?
?
?
?
?
?
?
Pump #1 Call Lamp
Door Mounted12VDC LED Lamps
Pin 4
Pin 9Pin 8
Pin 5Pin 6Pin 7
Pin 3Pin 2Pin 1
Pump #2 Call Lamp
Pump #3 Call Lamp
Telemetry Control Lamp
Valve #1 Call Lamp
Valve #2 Call Lamp
CDRXDTXDDTR or 13.8VDCSGDSRRTSCTSRI
FRONT PANEL DISPLAY-COM29 Pin Female Sub-D Connector
RED
SMT Displaywith keypadYEL
GRNWHTBLU
BLK
FRONT PANEL DISPLAY:Operator Interface with LCDdisplay and keypad. Displays local analogs, controllingtank's level, and provides access to control setpoints.
5416
23
RJ-11Jack
FRONT PANEL LAMPS & DISPLAY with KEYPAD
NOTE: Jumper on the Motherboard should be set to 12V to power the Display Module (not DTR)
Software Output #2 (DO10) Software Output #3 (DO11) Software Output #4 (DO12) Software Output #5 (DO13) Software Output #6 (DO14) Software Output #7 (DO15) Software Output #8 (DO16)
?
?
?
?
?
?
?
?
- 11 -
Expansion I/O Module Setup
Dip switches set both the address of the module and the baud rate used by the RS-485 connection to the RTU.
The EDI16 and EAO2 modules allow an RTU to have additional discrete inputs or analog outputs. These modules are connected to the RTU using the COM3 terminal block on the S3000/S4000. Both power and communication lines are provided by the RTU.
1 2 3 4 5 6 7 8
ON
TX+TX-RX+RX-SGND+12VGND
RTUTX+TX-RX+RX-SGND+12VGND
I/O Module
Switches 1-6 set the address:Module #1 = switches 1-6 offModule #2 = switch 1 on, 2-6 offModule #3 = switch 2 on, 1 and 3-6 offModule #4 = switch 1 and 2 on, 3-6 off
Currently the S3000/S4000 supports up to 4 EAO2 modules (8 analog outputs), up to 4 EDI16 modules (64 additional discrete inputs) and up to 4 EDI16 modules (64 additional discrete outputs).
The baud rate is set using switches 7 and 8:9600 baud = switches 7 and 8 off4800 baud = switch 7 off, switch 8 on2400 baud = switch 7 on, switch 8 off1200 baud = switches 7 and 8 on
The default baud rate used by the S3000/S4000 is 9600 baud. This can be changed in the RTU Configuration program is necessary.
(EAO2 Module)
- 12 -
Display Module Operation
The Micro-Comm display module allows the operator to view up to 16 analog levels, 16 discrete input conditions, 16 discrete output conditions, change stop/start setpoints, change output timer settings (both on and off delays) and view/change the script language user variables (X1-X24). In addition to these options there is a debug mode available that will let the operator turn on and off outputs, check inputs and view communications.
General Instructions:• Use the Up/Down arrows to move between categories (analog level displays, discrete inputs and
outputs, timer settings, stop/start setpoints and user variables)• Use the Right/Left arrows to move between items (which analog screen, timer output etc.)• Press ENTER to start entering a value for timers or setpoints.• Use the number keys to enter values. Use BKSP if you need to backspace.• Press ENTER when done with each entry.
Special Debug Mode:
• Type .456 to get into the view communications screen. All radio communication data will then appear on the display. Press the up arrow to get out of this mode.
NOTE: The display communicates with the S4000 using a serial cable (9 pin to RJ-11). The protocol options should be set to 9600 baud, 8 data bits, none parity, echo disabled. These are the factory defaults. To set a display back to factory defaults, hold down the PERIOD, ZERO and F1 keys during power up. Then press the F1 key to reload the defaults.
To set parameters, press the PERIOD, ZERO and F1 keys any time after power up.
1 2 3
4 5 6
7 8 9
. 0 SPACE BKSP ENTER
NOYES
TOWER LEVEL 12.9 FTDISCHARGE 120 PSI
- 13 -
Software Description
As stated in the introduction, the current software version consists of basically 2 full-blown Enhanced Control Cards and 1 extra Control Card for bringing back the remaining analogs and virtual I/O. The table below shows how the large amount of physical I/O in the S4000 was mapped into Control Card (“Micro-Comm RTU” Protocol) communication rules:
ECC #1 address selected with low 8-bits of addressS4000 Enhanced Control Card #1Relay outputs 1-6 Discrete outputs 1-6Discrete inputs 1-6 Discrete inputs 1-6Discrete inputs 9-16 Input Expansion Module inputs 1-8EDI Module #1 (1-16) Input Expansion Module inputs 9-24(future virtual discretes) Input Expansion Module inputs 25-32High 8-bits of analog inputs 1-6 Analog inputs A,B,C,D,E,FPulse Input #1 Pulse InputEAO Module #1 Analog Outputs 1-2
ECC #2 address selected with high 4-bits of address(for example, if S4000 address is PTH, RTU #2 will respond as PH)S4000 Enhanced Control Card #2Relay outputs 7,8 Discrete outputs 1,2Discrete inputs 7,8 Discrete inputs 1,2EDI Module #4 (1-4 DI65-DI68) Discrete inputs 3-6EDI Module #2 (1-16) Input Expansion Module inputs 1-16Relay read-backs 1-8 Input Expansion Module inputs 17-24Open collector outputs 1-8 status Input Expansion Module inputs 25-32High 8-bits of analog inputs 7-12 Analog inputs A,B,C,D,E,FPulse Input #2 Pulse InputEAO Module #2 Analog Outputs 1-2
ECC #3 address selected in Personality ModuleS4000 Enhanced Control Card #3EDI Module #4 (5-10 DI69-DI74) Discrete inputs 1-6Battery Voltage (AI13) Analog input ABox Temperature (AI14) Analog input BBatt. Current (AI15) Analog input CRec. Signal (AI16) Analog input DEDI Module #3 (1-16) Input Expansion Module inputs 1-16EDI Module #4 (1-16) Input Expansion Module inputs 17-32Software computations (PI3) Pulse InputEAO Module #3 Analog Outputs 1-2
- 15 -
NOTES:
1) Removable Personality ModuleImportant configuration data is written 3 times in the removable personality module (RPM). If 2 out of the 3 locations match, then the data is used otherwise default values are used. If the RPM is removed during operation, it will continue to use the current configuration data but if the power is cycled it will use all default values. A bit will be set in the reply to the CTU that will tell SCADAview when the RPM is not working (uses bit 6 in discrete input byte). The default values are generally the same as a normal control card (600 baud, ROM stored stop/start settings etc.) with the exception of the timer values. Both the ON and OFF timers will default to 120 seconds plus 20 seconds more for each output. Labels and scaling factors are also stored in the RPM. These as well as the configuration data are changed using the RTU Configuration program.
2) FLASH ROMThe main RTU program is stored in the FLASH ROM. When you need to update the S4000 software, you can use the RTU Config program along with the .S19 file containing the new program. Reprogramming the FLASH is a little dangerous and will result in the RTU not working at all if you stop the programming before it is finished.
- 16 -
Allen-Bradley DF1 and Modbus Protocol Support
The S3000/S4000 can use Allen-Bradley DF1 half-duplex slave protocol, Modbus RTU Slave and Modus RTU Master protocols. The information below describes what options are supported and how the I/O is mapped:
Modbus SpecificationsProtocol Mode: RTU Slave and MasterError Checking: CRC-16Function Codes Supported: Slave: 3-Read Holding Registers, 6/16-Preset Single/Multiple Registers Master: 1-Read Coil Status, 2-Read Input Status, 3-Read Holding Registers, 4-Read Input Registers, 15-Force Multiple Coils, 16-Preset Multiple Registers Note: Master messages are defined in the script using the MESSAGE function.
DF1 SpecificationsData Link Layer Protocol: DF1 Half-Duplex SlaveError Checking: CRC-16Message Packet Formats: SLC-500 Protected Typed Logical Reads/Writes
SLC-500 File Modbus RTU Physical I/O and Memory Registers
N9:0 r 40001 r Discrete Inputs DI1-DI16
N9:1 r 40002 r EDI #1 Discrete Inputs DI17-DI32
N9:2 r 40003 r EDI #2 Discrete Inputs DI33-DI48
N9:3 r 40004 r EDI #3 Discrete Inputs DI49-DI64
N9:4 r 40005 r EDI #4 Discrete Inputs DI65-DI80
N10:0 r/w 40006 r/w Discrete Outputs DO1-DO16
N10:1 r/w 40007 r/w EDO #1 Discrete Outputs DO17-DO32
N10:2 r/w 40008 r/w EDO #2 Discrete Outputs DO33-DO48
N11:0 r/w 40009 r/w EDO #3 Discrete Outputs DO49-DO64
N11:1 r/w 40010 r/w EDO #4 Discrete Outputs DO65-DO80
N12:0 - N12:7 r/w 40011-40018 r/w Analog Outputs 1-8 (12 bit)
N13:0 - N13:15 r 40019-40034 r Analog Inputs 1-16 (12 bit)
N14:0 - N14:2 r 40035-40037 r Pulse Input Registers PI1-PI3 (16 bit)
N15:0 - N15:23 r/w 40101-40124 r/w Stop/Start Setpoints 1-12 STOP1,START1,STOP2,START2 etc. (8 bit)
N16:0 - N16:49 r/w 40201-40250 r/w X Script User Variables X1-X50 (16 bit words)
N17:0 - N17:15 r 40301-40316 r Timer Variables TSEC1-TSEC16 (16 bit @ 35.55msec/bit)
N18:0 - N18:63 r 41000-41063 r PMEM Personality Memory (16 bit words)
N19:0 - N19:255 r 42000-42499 r NV Memory Locations 0-255 (0-499 for modbus) (16 bit words)
N20:0 - N20:49 r/w 43000-43049 r/w User Memory Locations (MREAD,MWRITE) 0-49 (16 bit words)
NOTES:
1) When a word location contains an 8 bit value from the RTU, only the word’s LSB is used (MSB will be zero).
2) The order of the SLC-500 integer files was made to match the order expected by the C2000 when mapping CTU I/O.
3) Some locations are read-only "r" and some are read-write "r/w" depending on the protocol.
- 17 -
Program Installation
Two versions of the RTU Configuration programs are available (one for Windows 95/98/NT/2000 and the other for Macintosh). The Windows version will be the one described and pictured in this manual, however the Macintosh version looks basically the same and the file format is identical.
To Install the Windows version, follow the steps below:
When upgrading to a new version of the program, go to the Control Panels in Windows95/NT and double-click on Add/Remove Programs. Look through the list and remove any old versions of RTU Configuration.
1) Insert the CD into the CD-ROM Drive.2) RUN the SETUP program located on the CD-ROM.3) Follow the prompts and do a typical install.4) After installation, the program icon will appear in the Start menu’s Program list.
When running the configuration program for the first time you will need to look in the communications setup screen to make sure you have the correct COM port number selected. The com port setup is located in the program’s “Setup” menu. Connection to the S4000 is by means of a Null-modem cable from the computer’s RS-232 port to the S4000 COM2 port (display port).
S4000 RTU Configuration Program
- 18 -
RTU Information Screen
The RTU Information screen contains version, date, checksums, user information, address switch settings as well as a picture of the RTU. This information about the RTU will be available after the user has read the Personality Module. The Job Name and Site Name fields can be changed if necessary and the User Name and Last Programmed will reflect who made the most recent change. All the “User” information is sent to the RTU whenever the personality data is uploaded.
- 19 -
Configuration Parameters
The screen below shows a sample RTU Configuration dialog box. This screen is where all the operational parameters stored in the Personality Module can be changed (radio communications parameters, output timer settings, automote control settings and stop/start setpoints).
To retrieve the personality data from an S4000, click on the blue down arrow icon or select Read Personality Data from the Transfer menu. After making changes, click the blue up arrow icon or select Program Personality Data from the Transfer menu.
- 20 -
Radio Communication ParametersModel Name The model name of the RTU being configured is selected and shown here. This will always change to reflect
the actual RTU whenever the personality data is retrieved. The S3000, S4000, O300 and M2000 are currently supported and different setup parameters may be available depending on the RTU. For instance the O300 (Onecard III) RTU does not have an ECC #2 so these options are hidden when programming an O300.
Protocol The protocol selection for the radio communications port (COM1). Options include Micro-Comm RTU (enhanced control card), Allen-Bradley DF1 Half-Duplex Slave, Modbus RTU Slave and Modbus RTU Master.
Baud Rate This selects the speed for the radio communications port (COM1). 110, 300, 600, 1200, 2400, 4800, 9600
and 19200 bps are supported.
Data Bits The number of data bits used by the radio port (5, 6, 7 or 8). This should be set to 7 for Micro-Comm RTU communications.
Parity Parity checking mode (Even, Odd or None). Even parity should be selected when using Micro-Comm RTU protocol.
Stop Bits The number of stop bits used by the radio port (1 or 2). This should be set to 2 for Micro-Comm RTU communications.
PTT Time in milliseconds that will occur after the radio is keyed and before the data is sent out the radio port. This should normally be set to 200 msec or more for Micro-Comm RTU communications using conventional radios. Data radios will allow for much lower PTT times (50 msec or less).
Station # For use with Modbus or DF1 protocols ONLY. This sets the station # for this RTU as used by the protocol.
COM2 Protocol Communication protocol used for the display module on COM2. This can be Micro-Comm, DF1 Half-Duplex Slave, Modbus RTU Slave or Modbus RTU Master.
COM3 Protocol Protocol used on the COM3 RS-485 port (S3000/S4000). This can be Micro-Comm I/O, Modbus RTU Slave or Modbus RTU Master. When using Modbus, the messages are defined in script using the MESSAGE() function.
COM3 Baud Rate Communications speed for the Micro-Comm I/O modules or for Modbus RTU Master communication. The default is 9600 baud.
Output Timer SettingsThe timer settings control how long the RTU will wait to energize or de-energize a relay output when it has been told to come on or go off. These timers will always be used regardless of the mode of operation - Micro-Comm CTU control, Automote (backup) control, Script Language, Modbus or DF1.
NOTE: When using Micro-Comm RTU protocol ECC #1 will use relay outputs 1-6 and ECC #2 will use relays 7 and 8 as it’s discrete outputs 1 and 2.
Stop/Start SetpointsThese setpoints are used by the RTU to control the outputs based on the controlling address’s analog input #1 when operating in backup control mode. In this way a pump station, for instance, can listen to the controlling tower and control the pumps based on tank level even if the Central Terminal Unit (CTU) has failed. The setpoints entered here are also available through the front panel display for operator entry. Stop/Start 1-5 are used for ECC #1 and Stop/Start 7-8 are used with ECC#2.
STOP / START 1-12Stop and Start setpoints 1 through 12 scaled using the analog selected in theStop/Start Labels screen.
- 21 -
ECC #1 and ECC#2 OptionsWhen using Micro-Comm RTU protocol, there are two separate ECC’s used for communication (two separate enhanced control card software modules). The options listed below are available on both ECCs:
Pulse Divider Sets the number of pulses that must occur before the ECC’s pulse input counter is incremented. Very high speed pulses must be divided down in CTU based systems because of the relatively slow polling times used and the fact that the pulse input counter is only 16bit. Normally this will be set to 1.
Controlling Address The 2-character address (HH-WW) of the station that will be listened to and used for control by this ECC. The controlling address’s analog input #1 can be shown on the display module and analog inputs #1, #2 and discrete inputs 1-6 can all be accessed from within the Script.
Relay Address The 2-character address (HH-WW) of the station that will be used as the relay site when the ECC sends it’s automote transmission. NOTE: Setting the address to HH will disable this option.
LOS Time The time in seconds that the ECC will wait for a central transmission before it gives up and turns off all the control outputs (1-6 for ECC#1 and 7-8 for ECC#2). This condition will also set a bit in memory that the Script Language code can use for control.
Automote Time The time in seconds that the ECC will wait for a central transmission before it begins controlling it’s outputs based on the controlling address’s analog input #1 along with the backup control setpoints. This condition will also set a bit in memory for the Script Language to use. This mode or operation is known as “Automote” or “Backup” control.
Automote Cycle The time in seconds between transmissions from this ECC when it has gone into automote.
Automote Transmit Whether or not this ECC will transmit it’s automote communications string.
Transmit ALL Data Autmote transmissions wil contain all the ECC’s data (not just analogs A,B and discretes).
Automote Control Whether or not this ECC will control it’s outputs when in automote. In some cases it may be desirable to do all the control from within a Script instead of allowing automote to do the control.
ECC #3 OptionsECC #3 is an extra enhanced control card module that will respond when using Micro-Comm RTU protocol. This RTU is used for bringing back extra analog inputs, 2 more EDI16 modules as IEMs, calculated pulse inputs (PI3 in the Script), or other calculated values.
RTU Address Any valid 2-character address (HH-WW) to be used by ECC #3. An address of HH will disable this option.
Monitor Address Any valid 2-character address (HH-WW) to be monitored by ECC #3. Analog inputs 1,2 and the discrete input byte from the monitor address can be used in script for control and/or display.
M2000 OptionsThe following options are only available when configuring a Micro-Comm M2000 RTU.
Enable Sleeping When checked, the RTU will go into low-power mode after it is polled from the central or sends an automote transmission.
Sleep Time (sec) When sleeping is enabled, the RTU will wake up and listen after this timer (seconds) has elapsed.
Stay Awake (sec) When sleeping is enabled, the RTU will stay awake this many seconds after being polled (in case it needs to do some relaying to other sites).
RS-485 I/O When checked, the RTU will use the RS-485 port for communication with Micro-Comm expansion I/O modules. If this option is not used, a Micro-Comm Display Module can be attached to the RS-485 port.
- 22 -
Analog Labels and Scaling Factors
To change analog labels and scaling factors, click on the blue water tower icon or select Analog Labels & Scales from the View menu. The labels and scales are retrieved/sent to the S4000 during reading/writing of the personality module.
Up to 16 analog levels can be displayed and they will always appear in the order entered in the setup screen. If an analog label is left blank it will not show up on the display.
When analog levels are displayed, the offset is first added to the analog value and the result is then multiplied by the range value. (This is the same as the SCADAview program).
- 23 -
Output Timer Labels
To change the 20 character output timer display labels, click on the wristwatch icon or select Timer Labels from the View menu. The labels are retrieved/sent to the S4000 during reading/writing of the personality module data.
NOTE: Output 6 is currently always used for Telemetry Control on ECC#1. Output 7 and 8 are ECC#2’s output 1 and 2.
- 24 -
Stop/Start Setpoint Labels
Stop/Start labels are used on the Display Module to allow the operator to change operational parameters such as Pump Stop/Start setpoints, High/Low alarms and Pump Restore/Cutoffs. Along with the 20 character label is a selection for what type of setpoints and which analog input # will be used for scaling and units.
Note: Lines where the label is left blank will not be accessible from the Display Module.
- 25 -
User Variable Labels
User variables are the 16-bit unsigned integer X1-X24 script language variables that can be used for any purpose. By entering a label in the User Variable Labels setup screen, the current value will be shown and can be changed on the Display Module.
- 26 -
Discrete I/O Labels
Labels for both 16 discrete inputs and 16 discrete outputs are user defined as of Version 3.0.0 of the S3000/S4000 software. These labels may be used to display pump calls, pump runs, valve positions, alarms etc. A 12-character label is used to name the input or output along with a 6-character ON label and a 6-character OFF label to describe the on or off state. If the input or output name is left blank it will not appear on the display and if no discretes are labeled the display will just skip over the entire section (inputs or outputs).
The screen below shows both the Discrete Input Labels and the Discrete Output Labels setup screen:
- 27 -
RTU Script Language Editor
To enter or edit the Script Language Code, click on the script icon or select Script Language Editor from the View menu. The screen shown below contains the Entry Alarm sample script included when installing the configuration software. This was loaded by selecting Open File... from the file menu and then double-clicking on the EntryAlm.S4C file.
Script language can be retrieved from the S4000 by clicking the Read button shown at the bottom of the editor window or by selecting Read RTU Script from the Transfer menu.
Lines starting with a single quote character are comments and do not get sent to the S4000 when programming. Comments are only saved in the .S4C configuration file.
After entering lines of code the user can click the Check button to make sure the syntax looks ok and to see how many bytes of code have been used. Currently the script code can’t be larger than 2048 bytes.
The code is then programmed into the S4000 personality module by clicking the Program button or by selecting Program RTU Script in the Transfer menu.
Script subroutines are edited by selecting the subroutine number from the list in the lower-left corner of the screen. Each subroutine can be read, programmed and checked separately using this editor.
- 28 -
Data Table Viewer
The Data Table Viewer screen allows the operator to see and change I/O variables, User variables and the Stop/Start setpoints in real-time when connected to an RTU. This screen can be very useful when debugging script language code.
Analog inputs and Stop/Start setpoints are displayed as 12-bit numbers (0-4095) or can optionally be scaled based on the range/offset values entered in the analog setup screen. Discrete inputs and outputs are shown as either 1 or 0 (on or off). The TSEC timers will show the number of seconds remaining (0-2330) and the X user variables will be displayed as 16-bit decimal numbers (0-65535).
When the “Force I/O” option is checked, the I/O variables shown in red may be changed to the desired value by clicking on the readout box, typing a new value and pressing enter. When the “Disable Script” option is also checked, the script will stop running and any I/O that it was controlling will then be accessible.
The Data Table has three extra screens that can be opened:“More RTU Information” shows the RTU model number, software version number and checksums. The current automote status bits for each ECC are also shown.“Output Timer Status” allows the user to see and change discrete outputs, relay output timer counts and settings and the current automote and override timer values.“User Memory” shows the current values for all 50 user memory locations (accessed in script with the MREAD and MWRITE functions).
- 29 -
Display Module Emulator
The display module is an optional hardware component to an S4000 RTU which allows an operator to see levels and change setpoints. When programming the S4000 with the RTU Configuration program the operator can use the Display Module Emulator screen to see what the display module would show. This is very useful since both the display module and the programming software must use the same port on the RTU (COM2).
- 30 -
Debug Terminal
The Debug Terminal screen allows the user to interact directly with the RTU over the programming port (COM2) or with other third-party equipment. It will display incoming data using ASCII, Modbus or DF1 mode based on the selection in the lower-left hand corner of the screen. Data logging can also be done by clicking on the “Log Data...” button and typing in a file name.
When connected to the RTU’s programming port (COM2), radio communications on COM1 can be monitored by typing “.456”.
- 31 -
RTU Script Language Syntax
Micro-Comm S3000/S4000 - RTU Script Language Rev. 6.1.6 – 4/22/2004
Numbers: 16-bit unsigned integers (0 to 65535) All computations are done with integer math.
Variables: DI1-DI16 Discrete inputs 1-16 (1=on, 0=off) DI17-DI32 EDI Module #1 discrete inputs DI33-DI48 EDI Module #2 discrete inputs DI49-DI64 EDI Module #3 discrete inputs DI65-DI80 EDI Module #4 discrete inputs DO1-DO8 Discrete outputs 1-8 using the timers DO1TD-DO8TD Discrete output 1-8 Timer Done (1=relay is energized) - read only DO9-DO16 Open collector outputs on the AUX connector 1-8 DO17-DO32 EDO Module #1 discrete outputs DO33-DO48 EDO Module #2 discrete outputs DO49-DO64 EDO Module #3 discrete outputs DO65-DO80 EDO Module #4 discrete outputs AI1-AI16 Analog inputs 1-16 (12bit 0-4095) T1AI1, T2AI1 ECC#1, ECC#2 controlling site’s AI1 (from hearing a reply) - read only T1AI2, T2AI2 ECC#1, ECC#2 controlling site’s AI2 (from hearing a reply) - read only T1DI1-T1DI6 Discrete inputs from ECC#1’s controlling site - read only T2DI1-T2DI6 Discrete inputs from ECC#2’s controlling site - read only T1PI1, T2PI1 ECC#1, ECC#2 controlling site’s PI1 (from hearing a reply) - read only AO1-AO8 EAO Module 1-4 analog outputs (12bit 0-4095) PI1,PI2 ECC#1, ECC#2 pulse input counters (16bit) - read/write PI3 ECC#3 virtual pulse input counter - read/write TSEC1-TSEC16 General purpose seconds timers (count down, settable from 0 to 2330 seconds) STOP1-STOP12 Stop setpoints accessed from display (converted to 12bit) - read only START1-START12 Start setpoints accessed from display (converted to 12bit) - read only X1-X50 User variables (16bit) - read/write L1-L5 Local subroutine variables (16-bit) – read/write inside subroutines
Operators: + addition - subtraction * multiplication / division % remainder | OR (bitwise or) & AND (bitwise and) ! NOT (logical not - not 1=0 and not 0=1) ^ XOR (bitwise exclusive or) == is equal to (tests for equality) <> not equal to (tests for inequality) < less than > greater than <= less than or equal to >= greater than or equal to = assignment (sets a variable equal to something)
- 32 -
Functions:AIN(x) Returns the 12-bit analog input value for input #x. The analog input number can be 1-16.
AITOPI(ai#,pi#,420flag) Sets the parameters for the real-time analog input to pulse converter. Setting ai# or pi# to 0 disables this option. The 420flag tells the converter which analog input scale to use (0=0-5volt or 1=4-20ma). Both analog modes use a pulse counter scale of 0 to 64 pulses per second.
ai# - analog input # (1 to 16) pi# - pulse input # (1 to 3) 420flag – analog scale Example: AITOPI(3,1,1) Converts a 4-20ma signal on AI3 to a pulse of 0-64pps on PI1. Note: The analog input must be a “real” input since this function uses the raw input value. Up to 3 real-time converters can be running at once – one for each pulse input.
AOUT(x,y) Writes the 12-bit value y to analog output #x. Analog outputs 1-8 are currently supported using (4) EAO2 modules.
AUTOMOTE(ecc#) Causes the given ECC# (1 or 2) to transmit it’s automote string immediately. The given ECC# must be set up for Automote Transmit and must have already gone into automote.
DIN(x) Returns the value for discrete input #x. The returned value will be 0 if the input is off and 1 if the input is on. Discrete inputs 1-80 are currently supported (16 on-board and up to 4 EDI16 RS-485 I/O modules).
DOUT(x,y) Energizes or de-energizes output #x based on the value y. The value of y should be 0 to turn off an output and 1 to turn it on. Discrete outputs 1-8 are relays and will therefore use the On and Off timer settings. Discrete outputs 9-16 are the open collector outputs which have no timers associated with them. Discrete inputs 1-80 are currently supported (16 on-board and up to 4 EDO16 RS-485 I/O modules).
EXIT() or EXIT(x) Exits the script immediately without processing any more lines. This can be used to bypass whole sections of code based on some condition. It can also be used to exit a subroutine and optionally return a value (x) to the main script.
FPSCL(mloc,fl,fh,sl,sh) Returns a scaled value given a floating-point number at mloc, the min/max floating point value (fl and fh) and the min/max scaled value (sl and sh). The “mloc” is the starting memory location for the floating-point number since floating-point numbers are 2-words long. This function can be used along with the MESSAGE command to convert floating-point numbers in a PLC to unsigned integer values we can deal with.
For example, if a Modbus speaking PLC has a floating point number located at 40001, the following two lines of script could be used to read and convert it to integer:
MESSAGE(3,0,1,40001,0,2,3000) X1=FPSCL(3000,0,1,0,4095) This example assumes the range is 0-1 for the floating-point register and we are converting
it to 0-4095.
IF(x,y,z) If x is true evaluate y else evaluate z (else is optional). Multiple statements may be used for y or z by separating them with a colon. i.e. IF(DI1, DO1=1:DO2=1, DO1=0:DO2=0)
MCOPY(src, dst, nwords) Copies data from one location in the RTU to another given the following parameters: src - start memory location for the source data dst - start memory location for the destination data nwords - the number of words (16bit values) to copy Note: A memory location in the RTU will correspond to it’s Modbus reference location
shown in the S4000 DF1-Modbus table minus 40000. Supported memory locations include all the I/O data (1-37), X Variables (201-250) and User Memory Locations (3000-3049).
Example: To copy the first 16 discrete inputs to X2, the command is MCOPY(1,202,1)
- 33 -
MESSAGE(port, type, addr, ref, offset, npts, mloc, timeout) Sets up an entry in the message polling table with the following parameters: Modbus RTU Master Messages (type 0 and 1) port - com port number (1,2 or 3) type - message type (0=Modbus RTU Read, 1=Modbus RTU Write) addr - address of the modbus slave device (1 to 247) ref - modbus reference location in the slave to start reading or writing offset - offset added to the reference location to start reading or writing npts - number of data points (bits or words) to read/write (20 words max.) mloc - RTU memory location for the data (this will be our modbus slave reference minus
40000; for the I/O 1-37, X Variables 201-250 and User Memory 3000-3049) timeout - amount of time in milliseconds the RTU will wait for a response
Micro-Comm Read/Write Messages (type 2) port - com port number (1) type - message type (2=Micro-Comm RTU Read/Write) addr - address of the station being polled (0-255 where HH=0, WW=255) ref – relay station address (0-255) offset – antenna relay mask (0=no antenna switching, 1=output #1 etc.) npts - number of data words to read (8 words max.) mloc - RTU memory location for the data (same as above for modbus). The first 2 words
will always be the output data (discrete output byte and analog output #1). The data read from the station will be located at words 3-10 depending on how many words are being requested with the npts parameter. The data order for the entire buffer is shown below:
Word #1: Discrete Outputs 1-6 Word #2: Analog Output #1 Word #3: Discrete Inputs 1-16 Word #4: Analog Inputs #1 Word #5: Analog Inputs #2 Word #6: Analog Inputs #3 Word #7: Analog Inputs #4 Word #8: Analog Inputs #5 Word #9: Analog Inputs #6 Word #10: Pulse Input #1 Note: Analog Output #1 is converted to 8bit for transmission and all analog Inputs are
converted to 12bit after being received.
MREAD(x) Returns the 16bit value stored in user memory location x (0-49).
MWRITE(x,y) Writes the 16bit variable or constant y to the user memory location specified by x (locations from 0-49 are supported).
NVREAD(x) Reads and returns the 16bit value stored in non-volatile memory location x (0-499).
NVWRITE(x,y) Writes the 16bit variable or constant y to the non-volatile memory location specified by x (locations from 0-499 are supported - non-volatile memory is the Personality Module in the S3000/S4000).
PID(t,ai#,ao#,p,i,d,mn,mx,st) Sets the parameters for the real-time PID module. Setting ao# to 0 disables the PID. t = target setpoint (0-4095) ai# = analog input # used (1-16) ao# = analog output # used (1-8) p = proportional term x 1000 (0-65535) i = integral term x 1000 (0-65535) d = derivative term x 1000 (0-65535) mn = minimum analog output (0-4095) mx = maximum analog output (0-4095) st = starting value for analog output (0-4095)
- 34 -
PMEM(x) Returns a byte from the RAM copy of the personality module configuration (locations 0-127). First pass bit, automote status, setpoints, timer settings, real-time clock etc. can all be read from here. Refer to the personality module memory map for more info.
SCALE(x,rl,rh,sl,sh) Scales the variable x given the minimum/maximum raw value and the minimum/maximum scaled value. X is changed to the new scaled value.
SKIP(x) Skips the next x number of lines in the script. Used to jump over sections of script based on some condition. i.e. IF(DI1,SKIP(4)) would skip the next 4 lines whenever discrete input #1 is on.
SQR(x) Returns the square root of x.
SUB1(x)-SUB4(x) Calls a subroutine and returns the EXIT(x) value to the main script routine. Currently up to 4 subroutines are supported. Values can be passed to a subroutine using the following syntax: SUB1(x1,x2,x3,x4,x5) Where x1 through x5 are 16bit integer variables or constants passed by value to the subroutine. They become local variables referenced as L1 through L5 from within the subroutine. Example: The following shows the main script and a subroutine. The subroutine totals up the three values passed and returns the result to the main script. The main script stores the result in the X1 variable.
Main Script Subroutine #1 X1=SUB1(1,2,3) L4=L1+L2+L3 EXIT(L4)
T1AIN(x) Returns the value of the controlling address’s analog inputs (1 to 6) for ECC#1. T1AIN(1) and T1AIN(2) will be the same as variables T1AI1 and T1AI2. NOTE: Expanded analog input data is only buffered by the RTU when it hears a reply containing “all station data”.
T2AIN(x) Same as above for ECC#2’s controlling station.
T1DIN(x) Returns the value of the controlling address’s discrete inputs (1 to 32) for ECC#1. Discrete inputs DI1-DI6 and DI9-DI32 match the physical or scripted inputs at the controlling station. T1DIN(1)-T1DIN(6) will be the same as T1DI1-T1DI6. T1DIN(7) will return the controlling station’s personality module fail flag. T1DIN(8) will return the controlling station’s override flag. NOTE: Expansion discrete input data is only buffered by the RTU when it hears a reply containing “all station data”.
T2DIN(x) Same as above for ECC#2’s controlling station.
TIME(x) Returns the system time value based on the item number requested. The items available are as follows: (Note: Items 1-7 require a clock chip to be installed. The time and date are set whenever the configuration is programmed).
0 – Seconds since power-up (rolls over at 65535) 4 – Year (0-99) 1 – Day of the week (Sunday = 1) 5 – Hours (0-23) 2 – Month (1-12) 6 – Minutes (0-59) 3 – Day (1-31) 7 – Seconds (0-59)
NOTE: Some functions are only available on the S3000/S4000 RTU. In particular the AIN(), AOUT, DIN(), DOUT() and MESSAGE() functions will not work on an M2000 or the O300 Onecard III. When the RTU configuration program compiles the script, it will warn the operator if a function is not available.
- 35 -
General Script Examples:AI3=AI16 copy analog input 16 to analog input 3 (writes over the physical AI3)PI3=PI1+PI2 add pulse counters 1,2 and put result in ECC#3’s pulse counter (add flows)DO1=DI1 turn relay #1 on/off based on discrete input #1DO1=!DI1 turn on relay #1 if input #1 is off and vice versaDI16=DO1TD set discrete input 16 to 1 if output #1 is on and timed outDO2=DI1 | DI2 turn relay #2 on if input #1 or input #2 is onDO11=T1DI1 turn open collector #3 on/off based on ECC#1’s controlling site input #1AO1=T1AI1 set analog output#1 (I/O expansion module) to equal ECC#1’s controlling site levelIF(AI2>2048,DO1=1) turn on relay output#1 if analog gets above half scaleIF(AI2<1024,DO1=0) turn off relay output#1 if analog gets below 1/4 scale
High Discharge Cutoff Example:IF(AI1>START3,DO3=1) turn output #3 on if above the start (alarm) setpoint IF(AI1<STOP3,DO3=0) turn output #3 off if below the stop (restore) setpoint NOTE: Relay and open collector outputs are latched on when set to 1. The script must be set them back to zero to shut off.Timed Output Example:IF(!DI1,TSEC1=5) if input #1 is not on, reset the seconds timer to 5 secondsIF(DI1&(TSEC1>0),DO1=1,DO1=0) if input #1 is on and the timer is not timed out, turn on output #1 otherwise turn
output #1 off.
300# Transducer - Using a 0-255 PSI Range:SCALE(AI2,819,3604,0,4095) the 4-17.6mA range of a 300psi transducer is scaled to 0-255psi (0-4095 is used as the
scaled min and max since analogs are divided by 16 before being sent back as 8bit. All analogs are treated as 12bit in the script.)
Entry Alarm Example:IF(DI3,X1=0:TSEC1=120) Operator Present discrete input #3 resets the alarm flag and the exit timer IF(!TSEC1&!DI4,X1=1) If the exit timer times out and the doors are not closed, set the alarm flagIF(!X1,TSEC2=120) Reset the alarm timer if there is no alarmIF(!TSEC2,DO9=1,DO9=0) If the alarm timer times out, turn on the alarm lamp or hornNOTES: This Entry Alarm uses a 2 minute exit timer and a 2 minute alarm timer Input #3 = operator present/armed keyswitch input (1=operator present) Input #4 = door switches (1=all doors closed) Output #9 = Entry alarm output (lamp or just sent back to the CTU)
- 36 -
Micro-Comm Script Language - RTU Processing Flow Chart
Much like a PLC processing ladder logic, the script is executed in a continuous loop.All I/O is read and written outside of the script so all changes made to inputs or outputswill actually occur when the script finishes.
Read Inputs
(analogs, pulses, discretes)
Run Script
Write Outputs
(start timers etc.)
Respond to Interrogations
Update the User Display
Local Automote Control Groups
General Housekeeping...
- 37 -
DI1 DO1
Ladder LogicScript Language
Micro-Comm Script Language - Ladder Logic Comparisons
DO1=DI1&DI2DI2
DI1 DO1IF(DI1&DI2,DO1=1)
DI2L
DI1 DO1DO1=!DI1|DI2
DI2
DI1 DO1DI2DO1=!DI1&DI2
DI1 DO1IF(!DI1&!DI2,DO1=0)
DI2U
The following is a list of Script Language instructions and their corresponding Ladder Logic equivalent. The Ladder Logic shown is similar to Allen-Bradley SLC-500 instructions.
- 38 -
Ladder LogicScript Language
MOVMOVESource
Dest
AI1
AI2
AI2=AI1
SCALE(X1,819,4095,0,4095)
SCPScale w/ParametersInputInput Min.Input Max.Scaled Min.Scaled MaxScaled Output
AI1819
X1
409504095
X1=AI1
GEQGRTR THAN OR EQUALSource
Dest
AI1
2048
DO1
IF(AI1>=2048,DO1=1) L
- 39 -
Personality Module Memory Map
Addr Description Addr Description
0 - Radio Port Baud Rate 64 - ECC#2 Automote Control Address
1 - ON Timer for output #1 MSB (timer res = 35.55 msec) 65 - ECC#2 Automote Xmit Control (b0=xmit, b1=send all)
2 - ON Timer for output #1 LSB (0-65535 = 0-2330 sec) 66 - ECC#2 Automote Time (MSB)
3 - ON Timer for output #2 MSB 67 - ECC#2 Automote Time (LSB)
4 - ON Timer for output #2 LSB 68 - ECC#2 Automote Cycle Time (MSB)
5 - ON Timer for output #3 MSB 69 - ECC#2 Automote Cycle Time (LSB)
6 - ON Timer for output #3 LSB 70 - ECC#2 Analog Output #1 (from CTU)
7 - ON Timer for output #4 MSB 71 - ECC#2 Address (from switches)
8 - ON Timer for output #4 LSB 72 - ECC#2 LOS Time (MSB)
9 - ON Timer for output #5 MSB 73 - ECC#2 LOS Time (LSB)
10 - ON Timer for output #5 LSB 74 - ECC#2 Status Byte (b0=LOS,b1=Automote,b2=Override)
11 - ON Timer for output #6 MSB 75 - ECC#2 Automote control flag (1=disable)
12 - ON Timer for output #6 LSB 76 - ECC#2 Discrete Output Image byte (from CTU)
13 - ON Timer for output #7 MSB 77 - ECC#2 Automote Relay Address
14 - ON Timer for output #7 LSB 78 - ECC#2 Analog Output #2 (from CTU)
15 - ON Timer for output #8 MSB 79 - Radio Port Parity, Data Bits (UART-MR1A)
16 - ON Timer for output #8 LSB 80 - Radio Port Stop Bits (UART-MR2A)
17 - OFF Timer for output #1 MSB 81 - Radio Port PTT Delay (x10 msec increments)
18 - OFF Timer for output #1 LSB 82 - Radio Port Protocol (1=MC-RTU, 2-DF1, 3-Modbus)
19 - OFF Timer for output #2 MSB 83 - Station # (for DF1 or Modbus slave)
20 - OFF Timer for output #2 LSB 84 - ECC#3 Station Address
21 - OFF Timer for output #3 MSB 85 - ECC#3 Discrete Output Image byte (from CTU)
22 - OFF Timer for output #3 LSB 86 - ECC#3 Monitor Address
23 - OFF Timer for output #4 MSB 87 - ECC#3 AI1 Level (0-255) from Monitor Address
24 - OFF Timer for output #4 LSB 88 - ECC#3 AI2 Level (0-255) from Monitor Address
25 - OFF Timer for output #5 MSB 89 - ECC#3 Discrete Input Byte from Monitor Address
26 - OFF Timer for output #5 LSB 90 - Product ID # (21=M2000, 15=S4000, 1=O300, 16=S3000)
27 - OFF Timer for output #6 MSB 91 - Software Date Month (convert to Hex for display)
28 - OFF Timer for output #6 LSB 92 - Software Date Year (convert to Hex for display)
29 - OFF Timer for output #7 MSB 93 - FLASH Checksum (LSB)
30 - OFF Timer for output #7 LSB 94 - FLASH Checksum (MSB)
31 - OFF Timer for output #8 MSB 95 - EPROM Checksum (LSB)
32 - OFF Timer for output #8 LSB 96 - EPROM Checksum (MSB)
33 - Stop Level #1 97 - Software Major Version Number (Ascii)
34 - Start Level #1 98 - Software Minor Version Number (Ascii)
35 - Stop Level #2 99 - Software Build Version Number (Ascii)
36 - Start Level #2 100 - Realtime Clock - Day of Week (1-7)
37 - Stop Level #3 101 - Realtime Clock - Month (1-12)
38 - Start Level #3 102 - Realtime Clock - Day (1-31)
39 - Stop Level #4 103 - Realtime Clock - Year (0-99)
40 - Start Level #4 104 - Realtime Clock - Hours (0-23)
41 - Stop Level #5 105 - Realtime Clock - Minutes (0-59)
42 - Start Level #5 106 - Realtime Clock - Seconds (0-59)
43 - Stop Level #7 107 - Realtime Clock - Status (1=RTU has clock module)
44 - Start Level #7 108 - Script Status Byte (b0=First Pass bit)
45 - Stop Level #8 109 - Stop Level #6
46 - Start Level #8 110 - Start Level #6
47 - ECC#1 Pulse Input PI1 Divider 111 - Stop Level #9
48 - ECC#1 Automote Control Address 112 - Start Level #9
49 - ECC#1 Automote Xmit Control (b0=xmit, b1=send all) 113 - Stop Level #10
50 - ECC#1 Automote Time (MSB) 114 - Start Level #10
51 - ECC#1 Automote Time (LSB) 115 - Stop Level #11
52 - ECC#1 Automote Cycle Time (MSB) 116 - Start Level #11
53 - ECC#1 Automote Cycle Time (LSB) 117 - Stop Level #12
54 - ECC#1 Analog Output #1 (from CTU) 118 - Start Level #12
55 - ECC#1 Address (from switches) 119 - M2000 Solar Mode Byte (1=use solar sleep options)
56 - ECC#1 LOS Time MSB 120 - M2000 Solar Sleep Seconds (MSB)
57 - ECC#1 LOS Time LSB 121 - M2000 Solar Sleep Seconds (LSB)
58 - ECC#1 Status Byte (b0=LOS,b1=Automote,b2=Override) 122 - M2000 Solar Stay Awake Seconds (MSB)
59 - ECC#1 Automote control flag (1=disable) 123 - M2000 Solar Stay Awake Seconds (LSB)
60 - ECC#1 Discrete Output Image byte (from CTU) 124 - RS-485 (M2-1=IO,0=Disp) (S4-0,1,2=IO,3=MB Slave,4=MB Master)
61 - ECC#1 Automote Relay Address 125 - EDI and EAO Module Status Bits
62 - ECC#1 Analog Output #2 (from CTU) 126 - COM3 bps 17=19200,18=9600,19=4800,20=2400,21=1200
63 - ECC#2 Pulse Input PI2 Divider 127 - COM2 Protocol (1-MC Display,2-DF1,3-MB Slave,4-MB Master)