64
M1550 PLC User’s Reference Manual Revised: September 28, 2007 Copyright © 2007 Micro-Comm, Inc.

M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

M1550 PLC

User’s Reference Manual

Revised: September 28, 2007

Copyright © 2007 Micro-Comm, Inc.

Page 2: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

Table of Contents

Introduction ....................................................................................................................................................3Specifications and Sales Information .............................................................................................................4Sample Wiring Diagram ................................................................................................................................6Installation Requirements ............................................................................................................................15Lithium Battery Replacement ......................................................................................................................16Expansion I/O Module Setup .......................................................................................................................17Display Module Operation ...........................................................................................................................18Allen-Bradley DF1 and Modbus Protocol Support .....................................................................................19M1550 Configuration ...................................................................................................................................20

Program Installation ...............................................................................................................................20RTU Information Screen ........................................................................................................................21Configuration Parameters .......................................................................................................................22Analog Labels and Scaling Factors ........................................................................................................26Output Timer Labels ..............................................................................................................................27Stop/Start Setpoint Labels ......................................................................................................................28X Variable Labels ...................................................................................................................................29Discrete I/O Labels ................................................................................................................................30User Memory Screens ............................................................................................................................31User Memory Database Editor ...............................................................................................................32RTU Script Language Editor .................................................................................................................33Revision Notes Editor ............................................................................................................................34Data Table Viewer ..................................................................................................................................35Display Module Emulator ......................................................................................................................36Debug Terminal ......................................................................................................................................37

Script Language Syntax ...............................................................................................................................38Personality Module Memory Map ...............................................................................................................57Station and Group Data Structure ................................................................................................................58Station Data Flow Diagram .........................................................................................................................59Station Address Table ...................................................................................................................................60RTU32 Protocol Message Types ..................................................................................................................61RTU Protocol Message Types ......................................................................................................................62Control Group Flowchart .............................................................................................................................63Message Type Table .....................................................................................................................................64

Page 3: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 3 -

Introduction

This manual is intended to be the source of all information concerning the Micro-Comm M1550 PLC. The M1550 is a fifth-generation Micro-Comm controller similar to the M1500 PLC, but with a faster processor, more memory, ethernet port and an additional COM4 port.

I/O capabilities:(4) Form C Relay Outputs(4) Open-collector outputs (COM1 pins used for radio switching)(8) Discrete inputs (contact closure), (2) high speed pulse, (6) low speed pulse(4) Analog Inputs (12bit, 0-20mA or 0-5volt dip switch selectable)(2) Additional 12bit analog inputs, Temperature, System Voltage(2) Analog Outputs (0-20mA)(3) RS-232 / RS-485 communication ports - COM1 25pin port for radio cable - COM2 9pin port normally used for the display module and programming - COM4 9pin port RS-232/RS-485(1) Ethernet 10/100baseT (RJ-45) port (1) RS-485 communication port

- COM3 is a 4-wire RS-485 port for I/O modules or PLC communication

Page 4: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 4 -

Specifications and Sales Information

FULLY PROGRAMMABLE WITH PLUG-IN MEMORY MODULE

MICRO-COMM, MODBUS RTU AND ALLEN-BRADLEY DF1 PROTOCOLS

OPTIONAL FRONT PANEL DISPLAY & EXPANDABLE I/O

RADIO, PHONE LINE, & FIBER OPTIC COMMUNICATIONS

SIMULTANEOUS RTU-RTU & CTU-RTU COMMUNICATIONS

PLUG-IN TERMINAL BLOCKS

MODEL M1550

T he M1550 PLC is a reliable, full-featured Programmable Logic Controller. 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 M1550 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, Ethernet, dedicated line, phone line, and fiber optic com-munication media.

APPLICATIONS

SCADA Systems: Water Distribution Control and Management Waste Water Control and Monitoring Golf Course Irrigation Agricultural Irrigation Gas and Oil Monitoring Electrical Distribution Monitoring

Local Control: Water Booster Pump Stations Sewage Lift Stations Constant and Variable Speed Pump Stations Metering Stations Water and Waste Water Treatment Plants

FEATURES

I/O• 4 Form C Relay Outputs• 4 Open Collector Outputs• 8 Optically Isolated Discrete Inputs (2 are also High Speed Pulse Inputs)• 4 Analog Inputs, 0-5V or 0-20mA • 2 Additional On-Board Sensor Analog Inputs Box Temperature, System Voltage• 2 Analog Outputs, 0-20mA• 2 High-Speed pulse inputs (uses DI7/DI8)

Communications• COM1, Radio Port, RS-232 and RF signals• COM2, Display,/Programming, RS-232• COM3, RS-485, Expansion I/O• COM4, RS-232/RS-485• COM5, Ethernet, 100Base-TX• RF MODEM, 0-300, 600, or 1200 BAUD

Power Source• 12 VDC Power Input

ORDER INFORMATION

Part#L61-L17 0-300 baud FSK modemL61-L17A 600 baud FSK modemL61-L17B 1200 baud FSK modem

Micro-Comm Automation has been providing process control solutions for more than 25 years.

Call us at (913) 390-4500 to place your order or to speak to a sales and ser-vice representative. Or, visit us online at www.micro-comm-inc.com

PROGRAMMABLE LOGIC CONTROLLER (PLC)

Page 5: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 5 -

ORDER INFORMATION:

L61-XXXX

Modem: L17 - 0-300 baud FSK modem L17A - 0-600 baud FSK modem L17B - 1200 baud FSK modem

Micro-Comm, Inc. • 15895 S Pflumm Rd • Olathe, KS 66062 • (913) 390-4500 • fax: (913) 390-4550 • www.micro-comm-inc.com

M1550 PLCI/O

• 4 Form C Relay Outputs, 4A @ 250VAC General Use (4A @ 30VDC Resistive) B300 Pilot Duty, Relay contact to coil isolation 4000Vrms• 4 Open Collector Outputs, 100mA @ 12VDC (COM1 pins) Internal clamping diode to 12V• 8 Optically Isolated Discrete Inputs, Dry Contact or Open Collector to GND, Optically Isolated, 4mA Wetting Current, 12VDC Wetting Voltage 2 High Speed Pulse Inputs (inputs DI7 and DI8) 0-1000Hz, 50% duty cycle, contact closure or open collector to GND 6 Low Speed pulse inputs (inputs DI1-DI6) 0-50Hz, 50% duty cycle, contact closure or open collector to GND• 4 Analog Inputs, 12bit, 0-5V or 0-20mA, 0.1% accuracy, 0.001%/degC temp. coefficient, +/- 24V over voltage on any one Analog Input• 2 Additional On-Board Sensor Analog Inputs, 12bit Box Temperature, 0-150°F System Voltage, 0-25.5V• 2 Analog Outputs, 0-20mA, 12 bit, 0.25% accuracy 900 ohm maximum loop resistance

POWER SOURCE AND SUPPLIES

• Power Supply 12VDC Isolated Source with 8A Fuse, Use 14 AWG Supply Connections• Power Input 10.5-15VDC, 12VDC Nominal, 8.0A • Resistive Loads Only, DC Use• The sum of the load currents must be 7.5A or less• COM1 (pins 9,10,11) 10.5-15VDC, 4.0A• COM2 (pin 4) 10.5-15VDC, 2.0A• COM3 (12V) 10.5-15VDC, 2.0A• COM4 (pin 4) 10.5-15VDC, 2.0A• 24VDC @ 20mA per Terminal, Sensor Excitation power supply• Temperature Range -40 to 50 degC (-40 to 122 degF) Surrounding Air Temp• Internal Battery Lithium 3V, 1200mAh, 2/3A Size (Real-Time Clock and NVRAM)

CPU AND MEMORY

• 32bit MCU running 25MHz• 1MB FLASH, Application Program• 1MB RAM, Data• 9MB Serial FLASH, Configuration

COMMUNICATIONS

• COM1, DB25M, RS-232 and RF signals• COM2, DB9M, RS-232 w/flow control lines • COM3, RS-485 4 wire, Pluggable Terminal Block• COM4, RS-232/RS-485, 9pin Sub-D• COM5, Ethernet, 100Base-TX, RJ-45• Plug In RF MODEM FSK 0-300, 600, or 1200 BAUD

DIMENSIONS

• Height 9.75”• Width 6.85”• Depth 3.35” (with personality module)• Weight 2.3 lb

FIELD WIRING

• Use Copper Conductors Only, 60°C• Wire Range, 12-26 AWG• Wire Strip Length, 0.310”• Recommended Tightening Torque, 0.79 N-m / 7.0 lb-in.

Page 6: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 6 -

Sample Wiring Diagram

MICRO-COMMM1550 RTU

SITE NAME:M1550

PROJECT:

Project Name

MICRO-COMM JOB#:Project #

STATUS:Status

LAST REVISED:

11/8/06

CHECKED BY: DATE:

CREATED:3/8/04

DRAWN BY:

Project Manager

FILENAME:M1550.VSD

15895 S. Pflumm Rd. Olathe, KS 66062 Phone (913) 390-4500 Fax (913) 390-4550 (C) Copyright 2006 Micro-Comm, Inc.

PAGE:1 OF 16

CONNECTIONS & CONTACTS BY OTHERS(All dashed lines indicate customer/contractor connection)

BACK-UP BATTERYPS1230 3A/h = 6 hoursPS12120 12A/h = 24 hours

POWER CONNECTION:120V/Single Phase/60Hz Power byOthers - use separate 15A circuitbreaker.

L1

N

G

L1

N

RED

BLU

15A-CB

RED

BLU

1

2

8

7

5

6

WHT

BLK

GNDGRN

3

F1 - 3.5Amp MDL

F2 - 3.5Amp MDL

DISCRETE OUTPUTS

?DO1-NO

Discrete Ouput #1DO1-NC

DO1-C

?DO2-NO

Discrete Ouput #2DO2-NC

DO2-C

?DO3-NO

Discrete Ouput #3DO3-NC

DO3-C

?DO4-NO

Discrete Ouput #4DO4-NC

DO4-C

+12VDC

GND

POWER CONNECTIONS

MEAN WELL AD15512VDC POWER SUPPLY

All 120VAC Control Circuits must be provided with a Disconnect.All Control Circuit Wiring must not be less than No. 14 AWG.Discrete Output & Discrete Input wiring must be in seperate conduits.

(By Others)

F3 - 8.0 Amp MDL

10.5-15VDC Power Input, 8A

- 4 Form C Relay Outputs- 8A @ 250VAC General Use- 8A @ 30VDC Resistive- B300 Pilot Duty

13.8 Vdc Output, 10A

Page 7: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 7 -

SITE NAME:M1550

PROJECT:

Project Name

MICRO-COMM JOB#:Project #

STATUS:Status

LAST REVISED:

11/8/06

CHECKED BY: DATE:

CREATED:3/8/04

DRAWN BY:

Project Manager

FILENAME:M1550.VSD

15895 S. Pflumm Rd.Olathe, KS 66062Phone (913) 390-4500 Fax (913) 390-4550(C) Copyright 2006 Micro-Comm, Inc.

PAGE:2 OF 16

CONNECTIONS & CONTACTS BY OTHERS(All dashed lines indicate customer/contractor connection)

DISCRETE INPUTS

Discrete Input #1?(contact by others)?(contact by others) Discrete Input #2

GND

Discrete Input #3?(contact by others)?(contact by others) Discrete Input #4 DI4

Aux

DI3Aux

DI2Aux

DI1Aux

GND

Discrete Input #5?(contact by others)?(contact by others) Discrete Input #6

GND

Discrete Input #7?(contact by others)?(contact by others) Discrete Input #8 DI8/PI2

Aux

DI7/PI1Aux

DI6Aux

DI5Aux

GND

PULSE INPUTS3 conductor shielded cable12VDC

DI7/PI1

GND

Pulse Input #1/DI7

FLOWElectronic Flow Transmitter0-????GPM/0-????Pulses(by others)

(R)+12

(G) Out

(B) Com

Sensus Act-PakHigh Speed Pick-

Up transmitter(by others)

shield connected to GND

RED

WHT

BLK

3 conductor shielded cable12VDC

DI8/PI2

GND

Pulse Input #2/DI8

FLOWElectronic Flow Transmitter0-????GPM/0-????Pulses(by others)

(R)+12

(G) Out

(B) Com

Sensus Act-PakHigh Speed Pick-

Up transmitter(by others)

shield connected to GND

RED

WHT

BLK

- 8 Optically Isolated Discrete Inputs.- Dry Contact or Pulse Inputs (1-6).- High Speed Pulse Inputs DI7 & DI8.

MICRO-COMMM1550 RTU

(continued from previous page)

Note: PI3-PI8 = DI1-DI6 (up to 50Hz)

Page 8: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 8 -

SITE NAME:M1550

PROJECT:

Project Name

MICRO-COMM JOB#:Project #

STATUS:Status

LAST REVISED:

11/8/06

CHECKED BY: DATE:

CREATED:3/8/04

DRAWN BY:

Project Manager

FILENAME:M1550.VSD

15895 S. Pflumm Rd.Olathe, KS 66062Phone (913) 390-4500 Fax (913) 390-4550(C) Copyright 2006 Micro-Comm, Inc.

PAGE:3 OF 16

CONNECTIONS & CONTACTS BY OTHERS(All dashed lines indicate customer/contractor connection)

ANALOG OUTPUTS

Analog Output #1Tag: Analog Output.Name: ????0-???? = 4-20mA(???? by Micro-Comm)

AO1

GND Analog Output #1

+

-Analog Device

3 conductor shielded cable

shield connected to GND atMicro-Comm side ONLY.

RED

BLK

Analog Output #2Tag: Analog Output.Name: ????0-???? = 4-20mA(???? by Micro-Comm)

AO2

GND Analog Output #2

+

-Analog Device

3 conductor shielded cable

shield connected to GND atMicro-Comm side ONLY.

RED

BLK

ANALOG INPUTS

Tank Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(transducer by Micro-Comm)

24V

AI1

GND

Analog Input #1

+

-

GND

Micro-Comm??psi

Transducer

3 conductor shielded cable

shield connected to GND

RED

BLK

GRN

Tank Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(transducer by Micro-Comm)

24V

AI2

GND

Analog Input #2

+

-

GND

Micro-Comm??psi

Transducer

3 conductor shielded cable

shield connected to GND

RED

BLK

GRN

Tank Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(transducer by Micro-Comm)

24V

AI3

GND

Analog Input #3

+

-

GND

Micro-Comm??psi

Transducer

3 conductor shielded cable

shield connected to GND

RED

BLK

GRN

Tank Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(transducer by Micro-Comm)

24V

AI4

GND

Analog Input #4

+

-

GND

Micro-Comm??psi

Transducer

3 conductor shielded cable

shield connected to GND

RED

BLK

GRN

1 2 3 4

0-5V

0-20mA

ANALOG INPUT

- 4 Analog Inputs, 12bit.- 24Vdc @ 20mA per output, 80mA Total- 0-20mA/0-5V DIP Switch Selectable.- Reverse Voltage and Surge protection.

- 2 Analog Outputs, 12-Bit DAC- 0-20mA.- 900Ohm Maximum Loop Resistance.

MICRO-COMMM1550 RTU

(continued from previous page)

Page 9: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 9 -

BANK

#1

CURR

ENT

LIM

IT 1

.0A

CONNECTIONS & CONTACTS BY OTHERS(All dashed lines indicate customer/contractor connection)

12V

DO1

DO2

DO3

DO4

DO5

12V

DO6

DO7

12V

DO8

DO9

12V

12V

DO10

DO11

DO12

DO13

12V

DO14

DO15

12V

DO16

12V

L48 EDO Operational Specifications1. 16 Open Collector Outputs2. Internal Diode Clamping for Inductive Loads3. 10.5-15 Vdc Power Input3. 12Vdc & Max 1.6A Power Output5. Reverse Voltage & Surge protection6. Temp. Range -40° to 50° C

L48-DiscreteOutput Module

#1

1

1 2 3 4 5 6 7 8

ALL SWITCHES OFF FOR EDO #1

0

BANK

#1

CURR

ENT

LIM

IT 1

.0A

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

9 5??

9 5??

9 5??

9 5??

R1

R2

R3

?(contact by others)

?(contact by others)?(contact by others)

?(contact by others)

?(contact by others)?(contact by others)

?(contact by others)?(contact by others)

R1

?

?

?

?

?

?

?

R2

R3

R4

?

?

?

?

?(contact by others)?(contact by others)

?(contact by others)?(contact by others)

?

1413

1413

1413

1413

SITE NAME:M1550

PROJECT:

Project Name

MICRO-COMM JOB#:Project #

STATUS:Status

LAST REVISED:

11/8/06

CHECKED BY: DATE:

CREATED:3/8/04

DRAWN BY:

Project Manager

FILENAME:M1550.VSD

15895 S. Pflumm Rd.Olathe, KS 66062Phone (913) 390-4500 Fax (913) 390-4550(C) Copyright 2006 Micro-Comm, Inc.

PAGE:4 OF 16

EXPANSION RS-485 COM3Terminal Block

MICRO-COMMM1550 RTU

(continued from previous page)

+12V

GND

TX-

RX-

RX+

TX+

SGND

+12V

GND

RX-

TX-

TX+

RX+

SGND

W HT

GRN

ORG

BLK

DRAIN

RED

BLU12Vdc, 2.0A

Page 10: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 10 -

SITE NAME:M1550

PROJECT:

Project Name

MICRO-COMM JOB#:Project #

STATUS:Status

LAST REVISED:

11/8/06

CHECKED BY: DATE:

CREATED:3/8/04

DRAWN BY:

Project Manager

FILENAME:M1550.VSD

15895 S. Pflumm Rd.Olathe, KS 66062Phone (913) 390-4500 Fax (913) 390-4550(C) Copyright 2006 Micro-Comm, Inc.

PAGE:5 OF 16

CONNECTIONS & CONTACTS BY OTHERS(All dashed lines indicate customer/contractor connection)

COM

DI1

L47-DiscreteInput Module #1 DI2

DI3

DI4

DI5

COM

DI6

DI7

COM

DI8

DI9

COM

COM

DI10

DI11

DI12

DI13

COM

DI14

DI15

COM

DI16

COM

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

?(contact by others)

L47 AIM Operational Specifications1. 16 Discrete Inputs, Optically Isolated2. Temp Range -40° to 50° C3. DIN Rail Mountable Enclosure4. 10.5-15 VDC Supply5. Reverse Voltage and Surge protection

1

1 2 3 4 5 6 7 8

ALL SWITCHES OFF FOR EDI #1

0

MICRO-COMMM1550 RTU

(continued from previous page)

+12V

GND

TX-

RX-

RX+

TX+

SGND

+12V

GND

RX-

TX-

TX+

RX+

SGND

W HT

GRN

ORG

BLK

DRAIN

RED

BLU

EXPANSION RS-485 COM3Terminal Block

12Vdc, 2.0A

Page 11: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 11 -

CONNECTIONS & CONTACTS BY OTHERS(All dashed lines indicate customer/contractor connection)

24V

AI1

GND

Analog Input #1

RED

BLK

GRN

24V

AI2

GND

Analog Input #2

24V

AI3

GND

Analog Input #3

24V

AI4

GND

Analog Input #4

24V

AI5

GND

Analog Input #5

24V

AI6

GND

Analog Input #6

24V

AI7

GND

Analog Input #7

24V

AI8

GND

Analog Input #8

L45 AIM Operational Specifications1. 8 Ch, 16 bit Analog Inputs2. 10.5-15 Vdc Supply3. 12Vdc to 24Vdc, 160mA Int. P.S.4. 0-20mA/0-5V DIP Switch Select.5. Reverse Voltage & Surge protection6. Temp. Range -40° to 50° C

L45-Analog InputModule #1

Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(Transducer by Micro-Comm)

SHIELD WIRE GROUNDED AT PLC ONLY

3 conductor shielded cable +

-

GND

Micro-Comm??psi

Transducer

Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(Transducer by Micro-Comm)

SHIELD WIRE GROUNDED AT PLC ONLY

3 conductor shielded cable +

-

GND

Micro-Comm??psi

Transducer

Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(Transducer by Micro-Comm)

SHIELD WIRE GROUNDED AT PLC ONLY

3 conductor shielded cable +

-

GND

Micro-Comm??psi

Transducer

Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(Transducer by Micro-Comm)

SHIELD WIRE GROUNDED AT PLC ONLY

3 conductor shielded cable +

-

GND

Micro-Comm??psi

Transducer

Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(Transducer by Micro-Comm)

SHIELD WIRE GROUNDED AT PLC ONLY

3 conductor shielded cable +

-

GND

Micro-Comm??psi

Transducer

Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(Transducer by Micro-Comm)

SHIELD WIRE GROUNDED AT PLC ONLY

3 conductor shielded cable +

-

GND

Micro-Comm??psi

Transducer

Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(Transducer by Micro-Comm)

SHIELD WIRE GROUNDED AT PLC ONLY

3 conductor shielded cable +

-

GND

Micro-Comm??psi

Transducer

Level TransducerTag: Tank Level .Name: Tank Level0-60 psi = 4-20mAModel L5N???(Transducer by Micro-Comm)

SHIELD WIRE GROUNDED AT PLC ONLY

3 conductor shielded cable +

-

GND

Micro-Comm??psi

Transducer

1

1 2 3 4 5 6 7 8

ALL SWITCHES OFF FOR EAI #1

0

SITE NAME:M1550

PROJECT:

Project Name

MICRO-COMM JOB#:Project #

STATUS:Status

LAST REVISED:

11/8/06

CHECKED BY: DATE:

CREATED:3/8/04

DRAWN BY:

Project Manager

FILENAME:M1550.VSD

15895 S. Pflumm Rd.Olathe, KS 66062Phone (913) 390-4500 Fax (913) 390-4550(C) Copyright 2006 Micro-Comm, Inc.

PAGE:6 OF 16

MICRO-COMMM1550 RTU

(continued from previous page)

+12V

GND

TX-

RX-

RX+

TX+

SGND

+12V

GND

RX-

TX-

TX+

RX+

SGND

W HT

GRN

ORG

BLK

DRAIN

RED

BLU

EXPANSION RS-485 COM3Terminal Block

12Vdc, 2.0A

Page 12: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 12 -

SITE NAME:M1550

PROJECT:

Project Name

MICRO-COMM JOB#:Project #

STATUS:Status

LAST REVISED:

11/8/06

CHECKED BY: DATE:

CREATED:3/8/04

DRAWN BY:

Project Manager

FILENAME:M1550.VSD

15895 S. Pflumm Rd.Olathe, KS 66062Phone (913) 390-4500 Fax (913) 390-4550(C) Copyright 2006 Micro-Comm, Inc.

PAGE:7 OF 16

CONNECTIONS & CONTACTS BY OTHERS(All dashed lines indicate customer/contractor connection)

L46-AnalogOutput Module #1

L46 EAO Operational Specifications1. 4 Channel, 4-20mA Output2. Temp Range -40° to 50° C3. DIN Rail Mountable Enclosure4. 10.5-15 VDC Supply5. Reverse Voltage and Surge protection6. 2.5kV Isolation per Channel7. 24Vdc Internal Isolated Loop Power

AO1+AO1-

AO2+AO2-

AO3+AO3-

AO4+AO4-

Analog Input #14-20mA=0-??

SHIELD WIRE GROUNDEDAT PLC ONLY

(By OTHERS)

-+

Analog Input #24-20mA=0-??

SHIELD WIRE GROUNDEDAT PLC ONLY

(By OTHERS)

-+

Analog Input #34-20mA=0-??

SHIELD WIRE GROUNDEDAT PLC ONLY

(By OTHERS)

-+

Analog Input #24-20mA=0-??

SHIELD WIRE GROUNDEDAT PLC ONLY

(By OTHERS)

-+

1

1 2 3 4 5 6 7 8

ALL SWITCHES OFF FOR EAO #1

0

MICRO-COMMM1550 RTU

(continued from previous page)

+12V

GND

TX-

RX-

RX+

TX+

SGND

+12V

GND

RX-

TX-

TX+

RX+

SGND

W HT

GRN

ORG

BLK

DRAIN

RED

BLU

EXPANSION RS-485 COM3Terminal Block

12Vdc, 2.0A

Page 13: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 13 -

Pin 4

Pin 9Pin 8

Pin 5Pin 6Pin 7

Pin 3Pin 2Pin 1DCD

RXDTXDDTR - 13.8Vdc, 2.0ASGDSRRTSCTSRI

FRONT PANEL DISPLAY - COM29 Pin Female Sub-D Connector

RS-232 w/flow controlMicro-Comm

Displaywith keypad

FRONT PANEL DISPLAY:Operator Interface with LCDdisplay and keypad. Displayslocal analogs, controlling tank 'slevel, and provides access tocontrol setpoints. Utilizes12VDC power and RS232communications

RJ-11Jack

61

45

16

23

TxDRxD+12COM

CTSRTS

GRN/WHTBLU

ORG/WHTGRN

ORGBLU/WHT

SITE NAME:M1550

PROJECT:

Project Name

MICRO-COMM JOB#:Project #

STATUS:Status

LAST REVISED:

11/8/06

CHECKED BY: DATE:

CREATED:3/8/04

DRAWN BY:

Project Manager

FILENAME:M1550.VSD

15895 S. Pflumm Rd.Olathe, KS 66062Phone (913) 390-4500 Fax (913) 390-4550(C) Copyright 2006 Micro-Comm, Inc.

PAGE:8 OF 16

MotorolaModel CM200

Radio

RADIO CONNECTION - COM125 Pin Male Sub-D Connector

RS-232 and RF Signals

TXA

RXA

PTT

GND

+ Pwr- Pwr

Radio Connection: Radioconnected to M1500 using 8conductor flat phone cable with15 pin male connector to theRadio Accessory Connector.Antenna connected to lightningarrestor using Beldon 9913coax. Antenna

- PWR- PWR

+ PWR+ PWR

39K Ohms

Pin 16

Pin 14Pin 19

Pin 1

Pin 13Pin 12

Pin 9

Pin 7

Pin 10

Pin 25

WHT/ORG

WHT/GRN

CoaxLightningArrestor

Ground Rod Connection:Lightning Arrestor Ground Lug connected to a

Seperate 10FT Ground Rod using 12 gauge wire.(By Others)

WHT/BLUEBLUE

REDBLACK

GAINGAIN

CONNECTIONS & CONTACTS BY OTHERS(All dashed lines indicate customer/contractor connection)

12

1516

RADIO ACCESSORYCONNECTOR

72

3

11

10.5 - 15Vdc , 4.0A

CAT 5E CABLE T-568A PINOUT1-WHT/GRN

2-GRN3-WHT/ORG

4-BLU5-WHT/BLU

6-ORG7-WHT/BRN

8-BRN

ETHERNET 10BaseT-COM5RJ 45 Connector

Pin 4

Pin 8

Pin 5Pin 6Pin 7

Pin 3Pin 2Pin 1NC

NCRX-NCNCRX+TX-TX+

Pin 4

Pin 9Pin 8

Pin 5Pin 6Pin 7

Pin 3Pin 2Pin 1DCD

RXDTXDDTR - 13.8Vdc, 2.0ASGDSRRTSCTSRI

RS-232 - COM49 Pin Female Sub-D Connector

RS-232 w/flow control

MICRO-COMMM1550 RTU

(continued from previous page)

Page 14: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 14 -

SITE NAME:M1550

PROJECT:

Project Name

MICRO-COMM JOB#:Project #

STATUS:Status

LAST REVISED:

11/8/06

CHECKED BY: DATE:

CREATED:3/8/04

DRAWN BY:

Project Manager

FILENAME:M1550.VSD

15895 S. Pflumm Rd.Olathe, KS 66062Phone (913) 390-4500 Fax (913) 390-4550(C) Copyright 2006 Micro-Comm, Inc.

PAGE:9 OF 16

CONNECTIONS & CONTACTS BY OTHERS(All dashed lines indicate customer/contractor connection)

RADIO CONNECTION - COM125 Pin Male Sub-D Connector

39K Ohms

WHT/ORG

WHT/GRN

WHT/BLUE

BLUE

REDBLACK

+12VDCGND Motorola

Model CM200Radio #1

+ Pwr- Pwr

Radio Connection: Radioconnected to Radio Switchusing a L20C, RJ45 phone plugto 16 pin DIN cable. Antennaconnected to lightning arrestorusing Beldon 9913 coax.

18 18 18 18

TXA

RXA

PTT

GND

- PWR- PWR

+ PWR+ PWR

Pin 16

Pin 14Pin 19

Pin 1

Pin 13Pin 12

Pin 9

Pin 7

Pin 10

Pin 25

GAINGAIN

TXA

RXA

PTT

GND

- PWR

+ PWR+ PWR

Pin 16

Pin 14Pin 19

Pin 25

Pin 9

Pin 7

Pin 10

RADIO #1 RADIO #2 RADIO #3 RADIO #4

Ground Rod Connection:Lightning Arrestor Ground Lug connected to a Seperate

10FT Ground Rod using 12 gauge wire.(By Others)

Pin 21Pin 22Pin 23Pin 24

RADIO #1RADIO #2RADIO #3RADIO #4

12

1516

RADIO ACCESSORYCONNECTOR

72

3

11

CABLE DB25F TO DB25F, 500/550/1500 TO RADIO SWITCH 36"

CABL

E RJ

45 T

O 1

6PIN

DIN

, 500

/550

/150

0 TO

RAD

IO #

1

CABL

E RJ

45 T

O 1

6 PI

N DI

N, 5

00/5

50/1

500

TO R

ADIO

#2

CABL

E RJ

45 T

O 1

6 PI

N DI

N, 5

00/5

50/1

500

TO R

ADIO

#3

L54 RADIO SWITCH

Antenna

CoaxLightningArrestor

+12VDCGND Motorola

Model CM200Radio #2

+ Pwr- Pwr

12

1516

RADIO ACCESSORYCONNECTOR

72

3

11

+12VDCGND Motorola

Model CM200Radio #3

+ Pwr- Pwr

12

1516

RADIO ACCESSORYCONNECTOR

72

3

11

+12VDCGND Motorola

Model CM200Radio #4

+ Pwr- Pwr

12

1516

RADIO ACCESSORYCONNECTOR

72

3

11

6 MDL

6 MDLREDBLACK

6 MDLREDBLACK

6 MDLREDBLACK

CABL

E RJ

45 T

O 1

6 PI

N DI

N, 5

00/5

50/1

500

TO R

ADIO

#4

Antenna

CoaxLightningArrestor

Antenna

CoaxLightningArrestor

Antenna

CoaxLightningArrestor

Pin 1

- PWRBLACKBLACK

REDRED

MICRO-COMMM1550 RTU

(continued from previous page)

Page 15: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 15 -

The installation of the M1550 shall comply with all local and national fire and electrical codes, i.e. NFPA 70, National Electric Code. In order to provide proper fire and electrical shock protection, the M1550 shall be powered from an isolated power source, use 14 AWG supply wiring provided with an 8A over current protection fuse. The fuse shall be located at the secondary of the source to properly protect the power supply secondary conductors.

Field wiring should use 60°C copper conductors. The pluggable terminal blocks will accept 12-26 AWG wire. The wire should be stripped 0.310” and the terminal block tightened to the recommended torque, 0.79 N-m (7.0 lb-in.) Use appropriate gauge wire for the control circuit loads. Minimum 22 AWG wire is recommended for the Discrete Inputs. Minimum 22 AWG, twisted, shielded wire is recommended for the Analog Inputs and Analog Outputs. 14 AWG wire is recommended for the Discrete (Relay) Outputs. DC control signals should be segregated from AC power and AC control wiring by using separate wire ducts and separate conduit.

The M1550 is an open type device that requires an appropriate enclosure, suitable to the installation site. The surrounding air temperature of the M1550 should not exceed 50°C (122°F).

Installation Requirements

Page 16: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 16 -

Lithium Battery Replacement

The internal lithium battery is a technician replaceable item.

Caution: the lithium battery used in this device may present a fire or chemical burn hazard if mistreated. Do not recharge, disassemble, heat above 100°C (212°F) or incinerate. Replace battery with Panasonic, Part No. BR-2/3A or Micro-Comm Part No. BAT-004-3 only. Use of another battery may present a risk of fire or explosion.

To replace the battery, remove all power to the unit. Caution – power to the relay contacts may be sup-plied from other equipment. Un-plug all of the terminal blocks and communications cables. Un-mount the unit and remove the four screws on the sides of the unit. Place the unit on a clean working surface and lift the mounting base from the face plate. The battery is located in the center of the face plate, clipped into the battery holder labeled J15. Use a small blade screwdriver to pry the battery clip to the side and up. Then pry on the other side to fully remove the battery clip. At this point the battery is held in place by the battery holder contact spring force and it is simple to remove the battery with your fingers. Place a new battery in the battery holder, matching the orientation of the “+” and “-“ markings on the battery to the battery holder. Replace the battery clip by pressing it into place. Mate the mounting base to the face plate and re-install the four screws. Re-mount the unit and plug all of the cables back into the unit.

Dispose of the battery properly. Keep away from children. Do not disassemble and do not dispose of in fire.

Page 17: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 17 -

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, EDO16, EAI8 and EAO4 modules allow an RTU to have additional discrete or analog inputs/outputs. These modules are connected to the RTU using the COM3 RS-485 port on the M1550.

1 2 3 4 5 6 7 8

ON

TX-TX+

RX-

RX+

GND

M1550 COM3TX+TX-RX+RX-SGND+12VGND

I/O Module

Switches 1-7 set the address (binary):Module #1 = switches 1-7 OFFModule #2 = switch 1 ON, 2-7 OFFModule #3 = switch 2 ON, 1,3-7 OFFetc.

The baud rate is set using switch 8:9600 baud = switch 8 off19200 baud = switch 8 on

The default baud rate used by the RTU is 9600 baud. This can be changed in the RTU Configuration 32 program if necessary. The normal COM3 Mirco-Comm I/O polling loop will take around 2.6 seconds to update all modules at 9600 or around 0.7 seconds at 19200 baud. Micro-Comm I/O protocol on COM3 currently supports (4) EDI16, (4) EDO16, (4) EAO4 and (2) EAI8 modules.

All modules use Modbus RTU protocol and will be communicated with automatically using the “Micro-Comm I/O” protocol or can be communicated with manually using the MESSAGE() or MIOMSG() functions in script.

(EAI8 Module)

SGND+12V

Page 18: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 18 -

Display Module Operation

The Micro-Comm display module allows the operator to view up to 32 analog levels, 32 discrete input conditions, 32 discrete output conditions, change up to 32 stop/start setpoints, change all 8 output timer settings (both on and off delays) , view/change the user variables (X1-X32) and view/change user memory with up to 64 screens. 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, user variables and user memory screens)• 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 Modes:• Type .123 to get into the debug mode. Then hit the ENTER key to see a menu of choices.• 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.• Type .741 to temporarily go from CTU32 mode to display mode. Note: This will only work if

“hankshake” is disabled ahead of time since the RTS line will normally be off - see setup below.

NOTE: The display communicates with the RTU 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 and then press the F1 key to load the defaults. The default for “handshake” is “enabled” (this will need to be disabled if you plan to use the temporary display mode described above).

To change these 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

Page 19: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 19 -

Allen-Bradley DF1 and Modbus Protocol Support

The M1550 can use Allen-Bradley DF1 or Modbus RTU protocols. The information below describes what protocol options are supported and how the data is mapped to physical I/O or memory locations in the RTU:

DF1 SLC-500 File Modbus 4x Reg Modbus I/O PLC I/O and Memory RegistersN9:0 r 4x0001 r 10001-10016 r Discrete Inputs DI1-DI16

N9:1 r 4x0002 r 10017-10032 r EDI #1 Discrete Inputs DI17-DI32

N9:2 r 4x0003 r 10033-10048 r EDI #2 Discrete Inputs DI33-DI48

N9:3 r 4x0004 r 10049-10064 r EDI #3 Discrete Inputs DI49-DI64

N9:4 r 4x0005 r 10065-10080 r EDI #4 Discrete Inputs DI65-DI80

N9:5 r 4x0006 r 10081-10096 r DI81-DI96

N9:6 r 4x0007 r 10097-10112 r DI97-DI112

N9:7 r 4x0008 r 10113-10128 r DI113-DI128

N9:8 r 4x0009 r 10129-10144 r DI129-DI144

N9:9 r 4x0010 r 10145-10160 r DI145-DI160

N10:0 r/w 4x0011 r/w 00001-00016 r/w Discrete Outputs DO1-DO16

N10:1 r/w 4x0012 r/w 00017-00032 r/w EDO #1 Discrete Outputs DO17-DO32

N10:2 r/w 4x0013 r/w 00033-00048 r/w EDO #2 Discrete Outputs DO33-DO48

N10:3 r/w 4x0014 r/w 00049-00064 r/w EDO #3 Discrete Outputs DO49-DO64

N10:4 r/w 4x0015 r/w 00065-00080 r/w EDO #4 Discrete Outputs DO65-DO80

N10:5 r/w 4x0016 r/w 00081-00096 r/w DO81-DO96

N10:6 r/w 4x0017 r/w 00097-00112 r/w DO97-DO112

N10:7 r/w 4x0018 r/w 00113-00128 r/w DO113-DO128

N10:8 r/w 4x0019 r/w 00129-00144 r/w DO129-DO144

N10:9 r/w 4x0020 r/w 00145-00160 r/w DO145-DO160

N11:0 – N11:4 r/w DO81-DO160

N12:0 - N12:63 r/w 4x0021-4x0084 r/w 30001-30064 r AO1-AO64

N13:0 - N13:63 r 4x0085-4x0148 r 30065-30128 r AI1-AI64

N14:0 - N14:31 r/w 4x0149-4x0180 r/w 30129-30160 r PI1-PI32

N15:0 - N15:63 r/w 4x0601-4x0664 r/w Stop/Starts 1-32 STOP1,START1,STOP2,START2 etc.

N16:0 - N16:191 r/w 4x0201-4x0424 r/w X Variables X1-X224 (16 bit words)

N17:0 - N17:63 r 4x0701-4x0764 r Timer Variables TSEC1-TSEC64 (16 bit @ 1sec/bit)

N19:0 - N19:15 r/w 4x1201-4x1216 r/w ON/OFF Timer Settings (ON1,OFF1,ON2,OFF2 etc.)

N20:0 - N20:99 r/w 4x3000-4x3099 r/w User Memory Locations 0-99 (16 bit words)

N21:0 - N21:99 r/w 4x3100-4x3199 r/w User Memory Locations 100-199

N22:0 - N22:99 r/w 4x3200-4x3299 r/w User Memory Locations 200-299

… … …

N109:0 - N109:99 r/w 4x11900-4x11999 r/w User Memory Locations 8900-8999

Modbus SpecificationsProtocol Mode: Modbus RTU Master/Slave and Modbus/TCPError Checking: CRC-16Function Codes Supported: 1-Read Coil Status, 2-Read Input Status, 3-Read Holding Registers, 4-Read Input Registers, 5/15-Force Single/Multiple Coils, 6/16-Preset Single/Multiple Registers

DF1 SpecificationsData Link Layer Protocol: DF1 Half-Duplex Master/Slave, DF1 Full-Duplex or DF1 Radio ModemError Checking: CRC-16Message Packet Formats: SLC-500 Protected Typed Logical Reads/Writes PLC-5 Word Range Read/Write PLC-2 Physical Read/Write Basic Command Set - Unprotected Read/Write

Page 20: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 20 -

Program Installation

RTU Configuration 32 is required for programming the M1550 PLC.

RTU Configuration 32 is currently available for Windows NT/2000/XP and Mac OS X.

To Install the Windows version, follow the steps below:

When upgrading to a new version of the program, go to the Control Panels in Windows 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 at the serial port setup screen to make sure you have the correct COM port number selected. The port setup is located in the program’s “Edit - Preferences...” menu. Connection to the RTU is by means of a Null-modem cable from the computer’s RS-232 port to the RTU’s COM2 port (display port).

M1550 Configuration

Page 21: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 21 -

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.

Page 22: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 22 -

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 RTU, 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.

Page 23: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 23 -

RTU Configuration Parameters

Model Number The model of the RTU being configured is selected and shown here.

Protocol The protocol selection for the radio communications port (COM1). Options include Micro-Comm RTU32, DF1 Half-Duplex Slave, DF1 Half-Duplex Master, DF1 Full-Duplex, DF1 Radio Modem, Modbus RTU Slave, Modbus RTU Master or Modbus/TCP.

Baud Rate This selects the speed for the radio communications port (COM1). 110, 300, 600, 1200, 2400, 4800,

9600, 19200, 38400, 57600 and 115200 bps are supported.

Parity Parity checking mode (Even, Odd or None). Even parity should normally be selected when using Micro-Comm RTU protocol.

Data Bits The number of data bits used by the radio port (5, 6, 7 or 8). This should normally be set to 7 for Micro-Comm RTU communications.

Stop Bits The number of stop bits used by the radio port (1 or 2). This should normally 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 250 msec or more for Micro-Comm RTU communications using conven-tional radios. Data radios will allow for much lower PTT times (50 msec or less).

Enable Modem When this option is checked, the M1550 will turn on the internal 600 (or 110) baud radio modem. Leave this box un-checked when using an external radio modem.

Ant. Outputs The range of 8 discrete outputs to use when a remote is doing Antenna/Radio switching. RTU32 proto-col can only specify an 8 bit mask so this selection allows it to be applied to outputs 1-8 or 9-16.

Ant. Default Discrete ouput number to leave on for Radio #1 when doing Antenna/Radio switching at a remote.

Station # For use with Modbus or DF1 protocols ONLY. This sets the station # for this RTU as used by the proto-col on all of the communication ports.

COM2 Protocol Communication protocol used on COM2. This can be Micro-Comm Display, Micro-Comm RTU32, Micro-Comm CTU32, DF1 Half-Duplex Slave or Master, DF1 Full-Duplex, DF1 Radio Modem, Modbus RTU Slave or Master, Modbus/TCP, Web Server, EtherNet/IP SLC and EtherNet/IP CLX (compact logix).

COM2 Baud This selects the speed for the COM2 port. The default is 9600 baud for compatibility with the Micro-Comm Display Module.

COM2 PTT Time in msecs that will pass after RTS is turned on and before data is sent out COM2. The default is 0 which will leave the RTS turned on all the time.

COM3 Protocol Communication protocol used on COM3. This can be Micro-Comm I/O, DF1 Half-Duplex Slave or Master, DF1 Full-Duplex, DF1 Radio Modem, Modbus RTU Slave or Master, Modbus/TCP, Micro-Comm Display, Micro-Comm RTU32, CTU32, EtherNet/IP SLC and EtherNet/IP CLX (compact logix).

COM3 Baud Communications speed for the Micro-Comm I/O modules or for Modbus RTU / DF1 communication. The default is 9600 baud.

Page 24: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 24 -

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, Script Lan-guage, Modbus or DF1.

Stop/Start Setpoints 1-32These setpoints can be labeled and accessed from the Micro-Comm Display module and then used in script for control.Stop and Start setpoints are scaled using the analog selected in the Stop/Start Labels screen.

Use 8-bit Remote SetpointsThis option will force the remote setpoint protocol (used by SCADAview) to use 8-bit (LSB) values. This may be required if the central is a C2000 or earlier.

Pulse Dividers These sets the number of pulses that must occur before the pulse input counter is incremented. Normally this will be set to 1.

COM4 Settings The options for COM4 are similar to that of COM1 with the additional “Mode” option.

Page 25: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 25 -

Ethernet (COM5) Settings The options for the ethernet port are configured with the screen shown below:

Protocol The protocol selection for the Ethernet Port (COM5). Options include Micro-Comm RTU32, DF1 Half-Duplex Slave, DF1 Half-Duplex Master, DF1 Full-Duplex, DF1 Radio Modem, Modbus RTU Slave, Modbus RTU Master, Modbus/TCP, Micro-Comm CTU32, Web Server, EtherNet/IP SLC and EtherNet/IP CLX (compact logix).

Mode This selects whether COM5 will be a TCP Server, TCP Client or UDP Mode (client/server).

IP Address TCP/IP Address of the M1550 PLC on the network.

Subnet Mask Selects the class of the local network (usually either 255.255.255.0 or 255.255.0.0)

Gateway The address of the local network router (if any).

Reverse-Poll Enabling reverse-poll when using CTU32 protocol will allow multiple computers (up to 4 using client mode) to receive status updates.

Local TCP Port Port number used when we are a TCP Server. Our default is 4001. It will be forced to 44818 when using EtherNet/IP. It should also be changed to 502 when using Modbus/TCP protocol.

Max. Connect The maximum number of clients that can connect to us when we are a TCP Server (1 - 4).

Destination IPs If the mode is a TCP Client, these are the addresses and port numbers that the PLC will connect to.

Local Listen Port Port number on which we will receive data from the other PLCs when using UDP Mode. This can be the same port as used for transmitting data. (4001 is our default).

UDP Ranges When using UDP Mode, these ranges of IP addresses and port numbers will all be sent data when the PLC transmits. Note: Do not include the PLC’s own IP Address in these ranges.

The “Network Search” button will scan the local network for our PLCs.

Page 26: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 26 -

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 RTU during reading/writing of the personality module configuation data.

Up to 32 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 raw analog value and the result is then multiplied by the range value. (This matches the Micro-Comm SCADAview program). A Range/Preset calculator (shown below) can be displayed by right-clicking and selecting the menu option.

Page 27: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 27 -

Output Timer Labels

To change the 20 character output timer display labels, click on the clock icon or select Timer Labels from the View menu. The labels are retrieved/sent to the RTU during reading/writing of the configuration data. These labels are normally used for pumps and provide both ON and OFF delays entered on the Micro-Comm Display Module.

Note: Lines where the label is left blank will not be accessible from the Display Module.

Page 28: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 28 -

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 setpoint (Stop/Start, High/Low etc.) 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.

Page 29: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 29 -

X Variable Labels

User variables are the 16-bit unsigned integer X1-X32 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.

Page 30: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 30 -

Discrete I/O Labels

Labels for both 32 discrete inputs and 32 discrete outputs are user defined in the RTU Configuration 32 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 the Discrete Input Labels setup screen:

Page 31: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 31 -

User Memory Screens

User memory screens allow for display and entry of data stored in user memory (locations 0-15999 in the M1550). The raw data type can be either 16 bit or 32 bit (using 2 consecutive user memory locations) and can be displayed as numeric, discrete labels or binary numbers.

The user memory screens are accessed by arrowing all the way down to the bottom row of the Micro-Comm display.

The sample screens below show how a 32bit flow total could be displayed and how a pump HOA selector could be configured.

Page 32: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 32 -

User Memory Database Editor

The User Memory Database screen provides the capability of reading, programming and editing all user memory locations (0-15999) as well as saving and loading a comma seperated (.CSV) database file. This file could then be used for data logging/trending or saving a backup copy of important data such as flow totals, runtimes etc. The screen shown below is accessed from either the Utilities menu or by selecting “Read User Memory” from the Transfer menu.

Right-clicking on this screen will bring up a menu with options to “Read User Memory”, “Program User Memory”, “Save CSV File...” and “Load CSV File...”. Double-clicking on a cell will put it into edit mode and a new integer value can be entered. The data will be displayed and entered in decimal unless the “Display User Memory and X Variables in Hex” is selected in the preferences.

This screen can also be made to show “live” data like the user memory data table viewer by selecting the “Auto-Refresh User Memory Database Window” option in the application preferences.

NVRAM DatabaseIn addition to the User Memory Database, there is also a very similar NVRAM Database window which can be used to download and save data from the RTU’s personality module. This could be used for long-term data logging since it currently supports 65000 words of data. The script commands NVREAD, NVWRITE and NVCOPY are used to manage this data.

Page 33: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 33 -

RTU Script Language Editor

To enter or edit the Script Language Code, click on the script icon or select “Script Editor” from the View menu.

Script language can be retrieved from the RTU 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 RTU when programming. Comments are saved in the .S5C configuration file and can optionally be saved to the RTU in place of the revision notes.

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 main script code can’t be larger than 16894 bytes.

The code is then programmed into the RTU 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. Currently each subroutine can be up to 2110 bytes.

Page 34: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 34 -

Revision Notes Editor

To enter or edit the Revision Notes for the RTU, click on the notepad icon or select Revision Notes from the View menu. The screen below shows some sample notes - they can be script comments, software description, revision history, variable tables or anything else desired.

The Read and Program buttons are used to retreive or store the notes in the personality module. Revision notes are also saved in the .S5C configuration file.

If the option “Use Commented Script for Revision Notes” is turned on in the preferences, this screen will be filled in with the current commented script whenever it is opened. It can then be programmed into the personality module in addition to the un-commented (compiled) script. The user will also then be asked if the commented script should be programmed whenever the configuration or compiled script is programmed. Commented scripts can be read back from an RTU and imported into the actual script by right-clicking and selecting the “Import Commented Script” menu option (shown below).

Page 35: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 35 -

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. The User Memory data table can display all user memory (a range of 64 locations at a time) and will allow for changing these values.

Analog inputs and Stop/Start setpoints are displayed as raw 12-bit numbers (0-4095) or can optionally be scaled based on the range/offset values entered in the analog setup screen. Pressing the “S” key on this display will toggle scaling on and off. Discrete inputs and outputs are shown as either 1 or 0 (on or off).

When the “Force I/O” option is selected, 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.

Page 36: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 36 -

Display Module Emulator

The display module is an optional hardware component to a M1550 PLC which allows an operator to see levels and change setpoints. When programming the M1550 with the RTU Configuration 32 software the operator can use the Display Module Emulator screen to see what the display module would show. This can be very useful since both the display module and the programming software may be using the same com port on the RTU.

Page 37: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 37 -

Debug Terminal

The Debug Terminal screen allows the user to interact directly with the RTU over the programming port (COM2 or COM3) or with other third-party serial equipment. It will display incoming data using ASCII, Modbus or DF1 mode based on the “Display Mode” selection in the lower-left hand corner of the screen. Protocol analysis of master messages (requests) can be done by selecting “RTU32-Decode”, “Modbus-Decode” or “DF1-Decode”.

Data logging can also be done by clicking on the “Log Data...” button and typing in a file name.

Radio communications on COM1 can be monitored on COM2 - COM5 by clicking on the “COM1” button, COM2 can be monitored on COM3-COM5 by clicking the “COM2” button etc,etc.

The “Debug” button will enter a hardware debugging mode where outputs can be turned on and off, inputs can be read, the clock can be set etc. Press the Enter key when in this mode to get a menu.

Page 38: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 38 -

Script Language SyntaxRTU32 Script Language Reference Rev. 2.2.3 – 6/1/2007

Numbers: 16-bit unsigned integers (0 to 65535) - all computations (except in special functions) are done using unsigned integers.

Variables: DI1-DI160 Discrete inputs 1-160 (1=on, 0=off) DO1-DO160 Discrete outputs 1-160 DO1TD-DO8TD Discrete output 1-8 Timer Done (1=relay is energized) DI1RT-DI16RT Runtimes for DI1-DI16 (tenths of hours) DI1RC-DI16RC Cycle counters for DI1-DI16 (# of starts) DO1RT-DO8RT Runtimes for DO1-DO8 (tenths of hours) DO1RC-DO8RC Cycle counters for DO1-DO8 (# of starts) AI1-AI64 Analog inputs 1-64 (AI1-AI16 are on-board, AI17-AI24 are the EAI8 module) AO1-AO64 Analog outputs 1-64 (AO1-AO8 are EAO8 modules 1-4) PI1-PI64 Pulse input 16bit counters (PI1-PI18 are physical, PI19-PI64 are script-only) TSEC1-TSEC224 General purpose seconds timers (count down, 0 to 65535 seconds) STOP1-STOP32 Stop setpoints (16bit) - read only START1-START32 Start setpoints (16bit) - read only X1-X224 User X variables (16bit) - read/write Xx.0-Xx.15 Bit referencing of user X variables (returns 0 or 1) - read/write M0-M15999 User memory variables (16bit) - read/write Mx.0-Mx.15 Bit referencing of user memory variables (returns 0 or 1) - read/write L1-L16 Local subroutine variables (16bit) - read/write Lx.0-Lx.15 Bit referencing of local subroutine variables - read/write T1AI1-T1AI8 LISTEN() address #1’s analog input data T2AI1-T2AI8 LISTEN() address #2’s analog input data T1DI1-T1DI32 LISTEN() address #1’s discrete input data T2DI1-T2DI32 LISTEN() address #2’s discrete input data T1PI1,T2PI1 LISTEN() address #1,#2 raw pulse inputs or flow rates FIRSTPASS Set to a “1” on the first pass of script execution (read-only) POWERFAIL Set to a “1” and held to 2 minutes when a power fail is detected (volts<13.05) MEMLOCK Used to lock (set to “1”) user memory from being changed by communications (default=1) MIOLOCK Used to lock MIOMSG message instruction table in place (set to “1”) MSGLOCK1-MSGLOCK5 Used to lock MESSAGE tables in place (per COM port) TSEC[x] array variable - indirect referencing for TSEC1-TSEC224 X[x] array variable - indirect referencing for X1-X224 M[x] array variable - indirect referencing for M0-M15999

Operators: + addition ++ post increment (must follow a variable) - subtraction -- post decrement (must follow a variable) * 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)

Page 39: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 39 -

Functions:

AFAIL(af#, rawvalue, lowlevel, flsecs, ftcsecs) Returns an analog sensor fail condition alarm based these parameters: af# - a unique analog fail function number (1-64) rawvalue - the current analog value passed-in prior to scaling lowlevel - the level at which a sensor-fail condition will be triggered flsecs - number of seconds before a fail-low will occur ftcsecs - number of seconds before a fail-to-change will occur Note: The function will return a “1” for fail-low, a “2” for fail-to-change and “3” if both of these conditions exist. Using a zero value for flsecs or ftcsecs will disable that type of alarm. Example: X1=AFAIL(1, AI1, 818, 10, 0) ‘returns a “1” if analog input is below 819 for 10 secs

AHIGH(ah#, alevel, highlevel, restore, failsecs, restsecs) Returns a “1” when there is an analog “high” condition given these parameters: ah# - a unique analog-high function number (1-64) alevel - the current analog level to be tested highlevel - setpoint at which the high-level should occur (after nsecs) restore - setpoint at which the high-level will clear (after nsecs) failsecs - # of seconds the level needs to be at or above the high level before alarming restsecs - # of seconds the level needs to be at or below the restore setpoint before the alarm clears Note: Setting both the highlevel and restore setpoints to zero will clear and disable the alarm.

AIN(ai# [,nsamples [,stime [,value]]]) Returns the value for a given analog input number given these parameters: ai# - analog input # (1-64) nsamples - optional number of samples to average (1-64 or 0 for no averaging) stime - optional time between the samples used in the average (in seconds) If stime is not given or is set to zero, the sample time will be approximately 250msec. value - optional value to set the analog input to, ignoring the other parameters Example: AI2=AIN(1,8,4) ‘averages the last 8 values for AI1, sampled every 4 seconds

AITOPI(ai#, pi#, 420flag) Sets the parameters for the real-time (background task) analog-to-pulse converter. Setting the ai# to 0

will disable the converter for the given pi#. The 420flag parameter tells the converter to use 4-20ma (819-4095) or 0-5volts (0-4095) for the input range. The pulse counter is incremented at a rate of 0 to 64 pulses per second based on the most recent analog input sample value.

ai# - analog input # (1 - 64) pi# - pulse input # (1 - 64) 420flag - analog scale (0=0-5volt, 1=4-20ma) Example: AITOPI(3,1,1) ‘converts a 4-20ma signal on AI3 to a pulse of 0-64pps on PI1

ALOW(al#, alevel, lowlevel, restore, failsecs, restsecs) Returns a “1” when there is an analog “low” condition given these parameters: al# - a unique analog-low function number (1-64) alevel - the current analog level to be tested lowlevel - setpoint at which the low-level should occur (after nsecs) restore - setpoint at which the low-level will clear (after nsecs) failsecs - # of seconds the level needs to be at or below the low level before alarming restsecs - # of seconds the level needs to be at or above the restore setpoint before the alarm clears Note: Setting both the lowlevel and restore setpoints to zero will clear and disable the alarm.

AOUT(ao# [,value]) Writes the the given value to the analog output #. Also returns the value of the given analog output #. If the value parameter is not given, it just returns the current value.

Page 40: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 40 -

BMSK([b0,...b15]) Returns an unsigned integer value with bits set as given in the parameters. This can be useful when creating and passing pump enable bit masks to the GROUP() function.

Example: X9=BMSK(X1,X2,X3,X4) This would set X9 equal to “15” if X1,X2,X3 and X4 are all equal to “1”.

BSET(mloc, bnum, bval) Sets a bit in memory referenced with mloc to a given value (0 or 1). A memory location in the RTU will correspond to it’s Modbus reference location shown in DF1-Modbus table minus 40000. Supported memory locations include all the I/O data (1-166), X Variables (201-424) and User Memory Locations (3000-11999).

BSHIFT(x, nbits, dir) Returns the value x shifted left or shifted right by the given number of bits (1-16). The value of dir specifies the direction of the shift (0=left, 1=right). Example: X1=BSHIFT(X2,8,1) This would return the MSB of X2 (X2 shifted 8 bits to the right)

BTST(mloc, bnum) Returns the value of a bit referenced with mloc given the bit number (0-15). (see the BSET function above)

CGBACKUP(gnum, nvloc) This function will back-up the given control group’s data (all 25 words) to the NVRAM location nvloc

(personality module) whenever a change is made to the group data. It will also restore the data from NVRAM to the control group if it detects invalid data (RAM failure or new RTU board?).

CGLEVEL(gnum, saddr1, ai#, saddr2, ai#, [...saddr8, ai#]) This function will return the lowest of the enabled controlling levels given the group # and a list of

station addresses and analog input numbers (1-8 or 9 for flow rate). It can be used in conjuction with the GROUP() function to allow multiple controlling levels. If no analog is enabled, a value of 65535 will be returned for pump-up groups, 0 for pump-down groups.

Example: X1=CGLEVEL(1,192,1,193,1) This would return the level from TH-AI1 or TI-AI1 depending on which level is lowest and is enabled

(not inhibited) in control group #1.

DIN(x [,value]) Returns the value for discrete input #x. The returned value will be 0 if the input is OFF and 1 if ON. If the optional parameter “value” is included, it will set the given discrete input to this value.

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 will use the On and Off timer settings. This function also returns the current value of the output. If the optional parameter y is not given, it just returns the current value of the given output #.

DPVPFLOW(dp, dpe, vp, vpe, vsize, vtype, rexp) This function will return a flow rate given the differential pressure, valve position, valve size and type.

The following parameters are required: dp = given differential pressure dpe = exponent multiplier for dp (dp*10dpe) vp = given valve position (usually 0-100%) vpe = exponent multiplier for vp (vp*10vpe) vsize = valve size - valid sizes are 4,6,8,10,12,14 or 16 inches vtype = valve type (always 1 for now - Cla-Valve) rexp = result exponent multiplier (result*10rexp) Example: X1=DPVPFLOW(1000,-1,700,-1,16,1,0) returns a value of 32189.

Page 41: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 41 -

ENTRYALARM(doors, opresent, alarmtime, exittime) The entry alarm function will return a value of “1” after a given door switch condition is tripped

and a timer times out without being acknowledged with the operator present signal. The following parameters are used:

doors = door switches (1=all closed) or a variable meaning that all is secure opresent = operator present key switch input or variable used to disarm (1=disarmed) alarmtime = time in seconds after doors are tripped and before the alarm condition is returned exittime = time in seconds allowed for the operator to exit after arming the system Example: DI5=ENTRYALARM(DI4,DI3,120,120)

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.

FOR(var, start, end, step, statements) This provides for-next loop functionality using a loop variable and executing the given statements a

number of times (up to 100 iterations). The parameters are: var = control variable to be incremented in the loop start = starting value for the variable end = ending value for the variable step = number to add to the variable each interation (usually 1) statements = multiple statements separated by “:” to be executed each interation Example: FOR(X1,1,8,1,AOUT(X1,0):DOUT(X1,0):TSEC[X1]=0)

FPCONV(x, xexp, uloc) Converts the given integer value x to floating point using the exponent multiplier - x*10xexp

The result is stored at the given user memory location (32 bits are required to store the floating point number, so uloc and uloc+1 are both used).

Example: FPCONV(12345,-2,100) ‘this stores a value of 123.45 in M100,M101

FPSCL(uloc, fl, fh, sl, sh [,wswap]) Returns a scaled value given a floating-point number at uloc, min/max floating point value (fl and fh)

and the min/max scaled value (sl and sh). The uloc is the starting memory location for the floating-point number (since floating-point numbers are 2 words in length). This function is normally used along with the MESSAGE command to convert floating-point numbers from a PLC to unsigned integer values. The optional parameter “wswap” will swap the 2 words before doing the calculation if it is set to a “1”. This may be necessary when looking at floating point numbers obtained from certain controllers such as Modicon PLCs.

For example, if a Modbus speaking PLC has a floating point number located at 40001/40002, the following two lines of script could be used to read and convert it to unsigned integer:

MESSAGE(3,0,1,40001,0,2,3000) X1=FPSCL(3000,0,1,0,10000,1) ‘convert from 0-1 floating-point to 0-10000 integer, swap words

FPTOLONG(fpuloc, longuloc, wswap) Converts a 32 bit floating point number to an unsigned long integer given the parameters: fpuloc = user memory location of the float longuloc = user memory location for the unsigned long (2 words) wswap = swaps the floating point words before conversion if set to “1” Example: FPTOLONG(2000,2002,0) ‘convert float at M2000 to unsigned long at M2002

GOTO(x) Jumps to the given label x marked in script by a line containing the LABEL(x) function. Note: Only forward jumps are allowed to prevent endless loops. Also, if the label does not exist, the

script or subroutine will exit. Example: IF(X1>10,GOTO(100)) X1=X1+1 LABEL(100) X2=X2+1

Page 42: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 42 -

GROUP(gnum, uloc, genable, gtype, clevel, psaddr, npumps, spump, penables, failsecs [,psaddr2, npumps2, spump2, psaddr3, npumps3, spump3, psaddr4, npumps4, spump4]) Control groups are used in conjuction with SCADAview 32 to do all the housekeeping for pump status,

alternation, fail generation etc. - similar to C2000 (CTU7-CTU9) based groups. The parameters are as follows:gnum group number (1-128)uloc memory location for the start of the crontol group data structuregenable group enable flag (1=enable, 0=disable) - group will alternate when disabledgtype group type (1=normal, 2=normal + RTU HOAs, 3=discrete given # of pumps, 4=discrete given # of pumps + RTU HOAs), 5=pump-down, 6=pump-down + RTU HOAs)clevel analog control level for comparison with stop/starts or the required # of pumps if using a type 3 grouppsaddr primary pump station address (0-255 = HH-WW)npumps number of pumps to control at the primary address (1-8)spump starting pump output number at the primary address (1-8)penables pump enable binary mask (0=no pumps enabled, 65535=16 pumps enabled)failsecs number of seconds to wait for a run before failing a pump (0=no fail)Optional parameters (psaddr2, npumps2, spump2 etc.) can be used to define up to 3 more pump station addresses and outputs to be controlled by the group. The maximum total number of controlled pumps is 16.The GROUP() function will return the current # of pump calls.

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.

Example: IF(DI1, DO1=1:DO2=1, DO1=0:DO2=0)

LABEL(x) Marks a line in the script that could be jumped to using the GOTO(x) function. This should be by itself on a line of script - see the GOTO(x) function for more info.

LISTEN(saddr, uloc, lostime [, ant#, rly1, ant1, rly2, dbrly, tbrly, pdaddr, pdoff, pdmask] ) Defines station addresses to listen for when using either Micro-Comm RTU/RTU32 (automote

messages or replies), old-style PDU messages or Modbus RTU Slave replies. When using Micro-Comm protocol, this function returns a “1” as long as the station is not in LOS. Also, the actual time in seconds since a reply was heard can be found in the station data structure.The parameters are:saddr address number (0-255 = HH-WW) or Modbus Slave address to listen foruloc starting user memory location for the station data structurelostime time in seconds before the LOS bit will be set in the station status byteant#, rly1, ant1, rly2, dbrly, tbrly - optional parameters that a central may need to talk to a non-polled remote (for remote HOA or Control Group information). These parameters are the same as shown for the MESSAGE function.pdaddr old-style PDU string address to listen for (PDU parameters are also optional)pdoffset starting location in pdu string for this station’s datapdmask data that is expected to be in the PDU string for this station (see the MPDU function)Example: X1=LISTEN(@PI,200,480)This would listen for station address “PI” and save the station data structure starting at user memory location 200. X1 will equal 1 as long as the station is not in LOS (480 seconds).Note: When using Modbus RTU Slave protocol, the reply data is just saved in a block starting at the uloc. The Modbus replies must be to “Read Holding Register” messages (4x registers).

MAVG(uloc, nwords) Returns the average value from a given range of user memory locations: uloc = the starting user memory address nwords = number of words to average

Page 43: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 43 -

MCOPY(src, dst, nwords) Copies data from one area of user memory to another using the following: src - starting user memory location for the source data dst - starting user memory location for the destination data nwords - the number of words (16bit numbers) to copy Example: To copy the first 10 words from uloc 100-109 to uloc 200-209 MCOPY(100,200,10)

MCRC(uloc, nwords) Returns the CRC 16-bit checksum of a given range of user memory locations: uloc = the starting user memory address nwords = number of words

MDATA(uloc, d1 [,d2, d3, ...]) This function simply copies the given data words into consecutive user memory locations and returns

the total number of words copied. uloc - starting user memory location for the data d1, d2, d3, ... - data words to place into memory (can be as many as needed)

MDECTOHEX(dval, uloc, nchars) Converts an integer value to an ASCII hex string of characters located in user memory. dval - value to convert (16 bit unsigned integer) uloc - starting user memory location of the hex string nchars - number of hex characters (1-4)

MDISPLAY(row, column [,editflag]) Changes what is being displayed on the Micro-Comm Display Module by moving to the given row

and column. The “row” should be one of the following: 1=Analog Input Labels, 2=Discrete Inputs, 3=Discrete Outputs, 4=Timer Settings, 5=Stop/Starts, 6=X Variable Labels, 7=User Memory Screens.

If the optional editflag parameter is set to “1”, the displayed screen will immediately go into edit mode (just as if the user had pressed Enter).

Example: This will change the display to user memory screen #1 whenever an alarm input on DI3 goes on. The user memory screen should be set up to show an alarm message.

IF(OSR(DI3,0),MDISPLAY(7,1,0)) ‘ uses the one-shot function so that it won’t keep doing it.

MESSAGE(port, type, timeout, addr, ref, offset, npts, uloc, ant#, lostries)Modbus RTU Master Messages (type 0 and 1)

port - communications port number (1,2 or 3)type - message type (0=Modbus RTU Read, 1=Modbus RTU Write)timeout - amount of time in milliseconds the RTU will wait for a responseaddr - address of the modbus slave device (1 to 247)ref - modbus reference location in the slave to start reading or writingoffset - offset added to the reference location to start reading or writingnpts - number of data points (bits or words) to read or writeuloc - memory location for the data (User Mem 0-15999)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)

lostries - number of polling tries before done bit goes to 0 (returned value)

Page 44: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 44 -

MESSAGE(port, type, timeout, addr, rref, roff, rnpts, ruloc, wref, woff, wnpts, ruloc, ant#, lostries)Modbus RTU Read/Write Registers Master Message (type 27)

port - communications port numbertype - message type (27=Modbus RTU Read/Write)timeout - amount of time in milliseconds the RTU will wait for a responseaddr - address of the modbus slave device (0-255)rref - modbus holding register reference in the slave to start reading (40000-49999)roff - offset added to the reference location to start readingrnpts - number of data points (words) to readruloc - memory location for the data received (User Mem)wref - modbus holding register reference in the slave to start writing (40000-49999)woff - offset added to the reference location to start writingwnpts - number of data points (words) to writewuloc - memory location for the data to be written (User Mem)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)

lostries - number of polling tries before done bit goes to 0 (returned value)

MESSAGE(port, type, timeout, addr, ref, offset, nwords, uloc, ant#, lostries)DF1 Half-Duplex Master, Full-Duplex or DF1 Radio Modem Messages (types 3 - 8)

port - communications port number (1,2 or 3)type - message type (3=SLC-500 Integer File Read, 4=SLC-500 Integer File Write, 5=PLC-5 Read, 6=PLC-5 Write, 7=Unprotected Read, 8=Unprotected Write)timeout - amount of time in milliseconds the RTU will wait for a responseaddr - address of the DF1 slave device (1 to 254)ref - number and type for the file in the slave to read/write (not used for types 7 or 8)(0-255, MSB specifies a SLC file type other than integer - i.e. $8A for floating point files)offset - word number in the integer file to start reading or writingnwords - number of words to read or writeuloc- memory location for the data (User Mem 0-15999)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)

lostries - number of polling tries before done bit goes to 0 (returned value)

MESSAGE(port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, lostries, MR, MW[,sa2, uloc2, MR2, MW2, sa3, uloc3, MR3, MW3, sa4, uloc4, MR4, MW4])Micro-Comm RTU/RTU32 Read/Write Messages (type 2, type 9 or type 24)

port - communications port numbertype - message type (2=Old-Style Control Card, 9=RTU32, 24=RTU32 w/6-bit data packing)timeout - amount of time in milliseconds the RTU will wait for a responsesaddr - address of the station being polled (0-255 where HH=0, WW=255) Note: The script compiler will convert station addresses specified by the “@” symbol followed by two letters (i.e. @WW would be compiled as 255)ant# - discrete output number to energize when transmitting (1-16, 0=none)rly1 - first choice relay station address (0-255)ant1 - antenna mask for the 1st relay station to use (0=no antenna switching)rly2- second-choice relay station & antenna (used if rly1 is in LOS)dbrly - double-bounce relay station & antenna (MSB=antenna mask,LSB=address)tbrly - triple-bounce relay station & antenna (MSB=antenna mask,LSB=address)uloc - user memory location for the station data (usually 100,200,300 etc) (the station data structure is shown in a table later in this manual)lostries - # of tries (1-255) before the LOS flag is set and the double-poll option flag (MSB=double-poll flag, LSB=# of tries - just add 256 to the # of tries to use double-poll) Note: double-poll will automatically stop after a station goes into LOS.MR - read message type (see RTU32 Protocol table)MW - write message type (see RTU32 Protocol table)[sa2, uloc2, MR2, MW2, sa3, uloc3, MR3, MW3, sa4, uloc4, MR4, MW4] optional parameters used to poll for up to 3 additional station addresses from the same RTU (available with type 9 and type 24 RTU32 messages)

Page 45: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 45 -

MESSAGE(port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, ruloc, nwords, lostries)Micro-Comm RTU32 Memory Read/Write Messages (type 10 or type 11)

port - communications port numbertype - message type (10=memory read, 11=memory write)timeout - amount of time in milliseconds the RTU will wait for a responsesaddr - address of the station being polled (0-255 where HH=0, WW=255)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)rly1 - first choice relay station address (0-255)ant1 - antenna mask for the 1st relay station to use (0=no antenna switching)rly2 - second-choice relay station & antenna (used if rly1 is in LOS)dbrly - double-bounce relay station & antenna (MSB=antenna mask,LSB=address)tbrly - triple-bounce relay station & antenna (MSB=antenna mask,LSB=address)uloc - local user memory starting location for the data to be read or writtenruloc - remote user memory starting location for read or writenwords - number of words to read or write (1-255 words)

lostries - number of polling tries before done bit goes to 0 (returned value)

MESSAGE(port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, MR)Micro-Comm RTU32/RTU Automote Messages (type 12 / 25 or type 14)

port - communications port numbertype - message type (12=RTU32 Automote, 25=RTU32 w/6bit data packing, 14=Old RTU Automote)timeout- amount of time in milliseconds the RTU will wait after transmittingsaddr - address of the station to automote (may or may not be a local station address)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)rly1- first relay station address (0-255)ant1 - antenna mask for the 1st relay station to use (0=no antenna switching)

rly2- optional second-choice relay station & antenna (used if rly1 is in LOS)dbrly - double-bounce relay station & antenna (MSB=antenna mask,LSB=address)tbrly - triple-bounce relay station station & antenna (MSB=antenna mask,LSB=address)uloc - user memory location for the station data (not used when the station address matches one of the RTU’s physical, RESPOND() or MESSAGE() addresses)MR - read message type to automote (see RTU32 Protocol table) Note: Station data will not be sent when it has it’s LOS bit set.

MESSAGE(port, type, timeout, ant#)Micro-Comm RTU32 Delay Message (type 13) - stops polling for a given amout of time.

port - communications port number to delay polling ontype - message type (13=delay)timeout- amount of time in milliseconds that polling will be delayed.ant# - discrete output # / mask used during the delay (1-16, 0=none / MSB=mask for 9-16)

MESSAGE(port, type, timeout, saddr, uloc, lostries)Micro-Comm CTU32 Master Message (type 15) - polls a CTU or CTU32 for station status.

port - communications port numbertype - message type (15=status update request)timeout - amount of time in milliseconds to wait for a responsesaddr - address of the station being polled (0-255 where HH=0, WW=255)uloc - user memory location for the station data (usually 100,200,300 etc.)

lostries - number of polling tries before done bit goes to 0 (returned value)

MESSAGE(port, type, timeout, saddr, ant#)Micro-Comm CTU32 Master Message (type 16) - sends a CTU32 reverse-poll status update string

port - communications port numbertype - message type (16=send status update)timeout - amount of time in milliseconds to delay before next messagesaddr - address of the station being sent (0-255 where HH=0, WW=255)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)

Page 46: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 46 -

MESSAGE(port, type, timeout, ant#, txuloc, txchars, rxuloc, stchar, rxchars, lostries)ASCII Message (type 17) - sends a string of ascii characters and buffers a response

port - communications port numbertype - message type (17=ascii message)timeout - amount of time in milliseconds to wait for a responseant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)txuloc - user memory start location for the transmit datatxchars- number of characters to transmitrxuloc - user memory starting location for the receive datastchar - character that marks the start of a received string (use 256 to just save all data)rxchars - maximum number of received characters to save in the memory buffer

lostries - number of polling tries before done bit goes to 0 (returned value)

MESSAGE(port, type, delay, pduaddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, nwords)Micro-Comm Old-Style PDU String Message (type 18)

port - communications port numbertype - message type (18=Old-Style PDU)delay - amount of time in milliseconds before going on to the next messagepduaddr - address of the PDU being polled (0-255 where HH=0, WW=255)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)rly1 - first choice relay station address (0-255)ant1 - antenna mask for the 1st relay station to use (0=no antenna switching)rly2- second-choice relay station & antenna (used if rly1 is in LOS)dbrly - double-bounce relay station & antenna (MSB=antenna mask,LSB=address)tbrly - triple-bounce relay station & antenna (MSB=antenna mask,LSB=address)uloc - user memory location for the start of the PDU datanwords - # of pdu data words to send (LSB of each word is sent)

MESSAGE(port, type, delay, saddr1, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, MR1, [SA2,MR2,...SA10,MR10])Micro-Comm PDU32 String Message (type 19 or 26)

port - communications port numbertype - message type (19=PDU32, 26=PDU32 w/6bit data packing)delay - amount of time in milliseconds before going on to the next messagesaddr1 - first station address being sent (0-255 where HH=0, WW=255)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)rly1 - first choice relay station address (0-255)ant1 - antenna mask for the 1st relay station to use (0=no antenna switching)rly2- second-choice relay station & antenna (used if rly1 is in LOS)dbrly - double-bounce relay station & antenna (MSB=antenna mask,LSB=address)tbrly - triple-bounce relay station & antenna (MSB=antenna mask,LSB=address)uloc - user memory location for station if address is not foundMR1 - first station reply type (see table)SA2, MR2 etc. - additional station addresses and reply types (up to 10 stations total)Note: Station data will not be sent when it has it’s LOS bit set.

Page 47: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 47 -

MESSAGE(port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, ruloc, nwords, lostries)Micro-Comm RTU32 User Memory Setpoints Message - writes data if changed (type 20 or 23)

port - communications port numbertype - message type (20=read or write on change, 23=zero-compressed version)timeout - amount of time in milliseconds to wait for a responsesaddr - address of the station being polled (0-255 where HH=0, WW=255)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)rly1 - first choice relay station address (0-255)ant1 - antenna mask for the 1st relay station to use (0=no antenna switching)rly2 - second-choice relay station & antenna (used if rly1 is in LOS)dbrly - double-bounce relay station & antenna (MSB=antenna mask,LSB=address)tbrly - triple-bounce relay station & antenna (MSB=antenna mask,LSB=address)uloc - local user memory location for the data to read / write (a write message will occur whenever a local change is made to the data block and will repeat until it is successful - normally it will just read the data from the remote)ruloc - remote user memory starting location to read / writenwords - number of words to read / write (limit 255 or 1000 for type 23)

lostries - number of polling tries before done bit goes to 0 (returned value)

MESSAGE(port, type, timeout, addr, ref, offset, nwords, uloc, ant#, lostries)Modbus RTU User Memory Setpoints Message - writes data if changed (type 21)

port - communications port numbertype - message type (21=read or write on change)timeout - amount of time in milliseconds to wait for a responseaddr - address of the station being polled ref - modbus reference location in the slave to start reading or writingoffset - offset added to the reference location to start reading or writingnwords - number of data words to read or writeuloc - local user memory location for the data to read or write (a write message will occur whenever a local change is made to the data block and will repeat until it is successful - normally it will just read the data from the remote)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)

lostries - number of polling tries before done bit goes to 0 (returned value)

MESSAGE(port, type, timeout, addr, ref, offset, nwords, uloc, ant#, lostries)DF1 SLC-500 User Memory Setpoints Message - writes data if changed (type 22)

port - communications port numbertype - message type (22=read or write on change)timeout - amount of time in milliseconds to wait for a responseaddr - address of the DF1 slave device (1 to 254)ref - file number for the integer file in the slave to read/writeoffset - word number in the integer file to start reading or writingnwords - number of data words to read or writeuloc - local user memory location for the data to read or write (a write message will occur whenever a local change is made to the data block and will repeat until it is successful - normally it will just read the data from the remote)ant# - discrete output # / mask used when transmitting (1-16, 0=none / MSB=mask for 9-16)

lostries - number of polling tries before done bit goes to 0 (returned value)

MFILL(uloc, value, nwords) Fills data in memory given the following parameters: uloc - starting memory location for the fill value - number to fill with (16bit integer) nwords - the number of words to fill

Page 48: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 48 -

MFCALC(oper, uloc1, uloc2, ruloc) Allows floating point math functions to be performed on user memory data (32bit floats). oper - operation to be performed (1=add, 2=subtract, 3=multiply, 4=divide, 5=raise to power) uloc1 - user memory location of the first floating point number uloc2 - user memory location of the second floating point number ruloc - user memory location for the result Examples: MFCALC(3,0,2,4) ‘M4=M0*M2 MLCALC(5,6,8,10) ‘M10=M6^M8 (raise to power)

MHEXTODEC(uloc, nchars) Convert and return the integer value of a string of ASCII hex characters located in user memory. uloc - starting user memory location of the hex string nchars - number of hex characters (1-4)

MIODONE(port, type, uloc [, value]) Returns a “1” if the specified MIOMSG is done given the port number, message type and uloc

(these 3 parameters should uniquely identify a message). It can also be used to set or clear the done status using the optional value parameter. Note: MIODONE(0,0,0) will return a “1” if all current MIOMSGs are done.

MIOMSG(port, type, timeout, addr, ref, offset, npts, uloc, lostries) Sets up a high-speed (background task) Micro-Comm I/O-Modbus RTU message loop. Unlike normal user messages, these can have timeouts as small as 30 msec. port - communications port number (3, 4 or 5) type - message type (0=Read, 1=Write, 21=User Memory Setpoints) timeout - amount of time in milliseconds to wait for a response addr - address of the modbus slave device (0 to 247) ref - modbus reference location in the slave to start reading or writing offset - offset added to the reference location npts - number of data points to read or write uloc - user memory location for the data lostries - number of polling tries before done bit goes to 0 (returned value) Example: X1=MIOMSG(3,0,50,0,40001,0,8,100,4) ‘reads analog input module (AI1-AI8)

MLCALC(oper, uloc1, uloc2, ruloc) Allows 32 bit math (unsigned long integer) functions to be performed on user memory data. oper - operation to be performed (1=add, 2=subtract, 3=multiply, 4=divide, 5=raise to power) uloc1 - user memory location of the first long integer uloc2 - user memory location of the second long integer ruloc - user memory location for the result Example: MLCALC(1,113,213,10) ‘M10=M113+M213

MPDU(uloc, saddr, pdmask) Adds old-style PDU data to a range of user memory locations. It returns the total number of words copied to user memory. This is used in conjuction with Type 18 messages to send old-style PDU strings. uloc - the starting user memory address saddr - station address to get the data from (0=HH - 255=WW) pdmask - bit mask with b0-b8 set based on what data is to be copied: (b0=Analog A, b1=Analog B, b2=Discretes, b3=Flow Rate, b4=IEM, b5=Pump 1-4 C/F, b6=Pump 5 C/F, b7=Analogs C,D, b8=Analogs E,F) Note: All analog data should be scaled to 8-bit.

MREAD(uloc) Returns the 16bit word stored in user memory location uloc (0-15999).

Page 49: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 49 -

MSGDONE(port, type, uloc [, sparam]) Returns the done status for a message given the port number, message type and uloc (these 3

parameters should uniquely identify the message). If both type and uloc are zero, a value of “1” will only be returned if all messages for the given port

are done. The done bit can also be set or cleared using the optional “sparam” parameter. If the optional “sparam” parameter is 0 or 1, the done bit will be set accordingly. Other parameter

values will do the following: 2 = returns the done counter (0-65535) 3 = returns the fail counter (0-65535) 4 = returns the done percentage x 100 (0-100% = 0-10000) 5 = resets both the done and fail counters Note: Whenever the done or fail count rolls over to zero, both counters will be reset and percentage

will go to 10000. Also, done and fail counters are incremented whenever a message is successful or unsuccessful (unlike the done bit status which get’s cleared based on the message command’s “lostries” parameter).

MSGNUM(port) Returns the current user message number pending on the given communications port (1-5). The message number is it’s location in the script with relation to other messages on the same port.

Message numbering starts at “1”.

MSUM(uloc, nwords) Returns the sum of a given range of user memory locations: uloc = the starting user memory address nwords = number of words to sum

MSYNC(sync#, uloc1, uloc2, nwords) Keeps two blocks of user memory in sync. If a word in block 1 changes, block 1 will be copied to

block 2 and vice versa. The parameters are: sync# - a unique sunc function number (1-64) uloc1 - starting user memory location for block 1 uloc2 - starting user memory location for block 2 nwords - the number of words to keep in sync (block size) Note: Block 1 is the “master” so if both blocks change, block 1 will be copied to block 2. Example: MSYNC(1, 100, 200, 100) ‘keeps M100-M199 in sync with M200-M299

MWRITE(uloc, y) Writes the 16bit variable or constant y to the user memory location specified by uloc (locations from 0-15999 are supported).

NVCOPY(src, dst, nwords, direction) Copies a block of data from the personality module NVRAM to User Memory or from User

Memory to NVRAM given the following parameters: src - source uloc or nvloc location depending on direction of copy dst - destination uloc or nvloc location depending on direction of copy nwords - number of 16bit words to copy direction - 0=NVRAM to User Memory, 1=User Memory to NVRAM

NVREAD(nvloc) Returns a 16bit word stored in the personality module NVRAM location nvloc (0-65471)

NVWRITE(nvloc,y) Writes the 16bit variable or constant y to the personality module NVRAM location specified by nvloc (locations 0-65471 are supported)

OSR(x, osr#) One-shot rising function. This function will return a “1” only once whenever the x parameter goes from 0 to non-zero (false to true).

The osr# parameter must be a unique number (0-255) for each OSR() function used in script. Example: IF (OSR(DI1,0),X1=X1+1) ‘counts the number of times DI1 goes on...

Page 50: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 50 -

PID(t, ai#, ao#, p, i, d, min, max, start, dband, period) Sets the parameters for a real-time PID module. Setting “ai#” to 0 disables the PID. When re-

enabled, the analog output will start again at the “start” value. A total of 8 PIDs (one for each analog output) can be running at the same time. The PID will use a scaled value for the analog input and will internally keep track of a “raw” analog output value so that it can be scaled in the script as well. The PID() function will return the “raw” analog output.

t = target setpoint (0-4095) ai# = analog input # used (1-64) 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) min = minimum analog output (0-4095) max = maximum analog output (0-4095) start = starting value for analog output (0-4095) dband = deadband (output will hold when input is this close to the target) period = time period in seconds for the PID calculation Example: AI1=SCALE(AI1,819,3604,0,255) ‘scale AI1 300# xdcr 4-20ma => 0-255 psi PID(X1,1,1,100,10,6,0,1000,500,20,4) ‘PID using AI1,AO1 and X1 target (0-255) AO1=SCALE(AO1,0,1000,819,4095) ‘scale AO1 0-1000 => 4-20ma output

PITOAI(pi#, ai#, maxp, maxa, maxt) Sets the parameters for real-time pulse to analog conversion. pi# - pulse input # (1 - 64) ai# - analog input # (1 - 64) maxp – maximum pulses-per-sec x 100 maxa - maximum analog input reading (0 to 65535) maxt - maximum # of seconds between pulses before AI goes to zero. Example: PITOAI(1,3,1000,4095,2) This converts a pulse of 0-10pps on PI1 to a value of 0-4095 on AI3. If 2 seconds goes by without

seeing a pulse, AI3 will be set to 0.

PMEM(x) Returns a byte from the RAM copy of the personality module configuration (locations 0-127). Refer to the personality module memory map for more info. Some locations will return current status information.

POLYNOMIAL(x, xexp, c, cexp, a1, a1exp, a2, a2exp, a3, a3exp, a4, a4exp, rexp) Computes the result of a 4th degree polynomial function: f(x) = const + a1*x + a2*x^2 + a3*x^3 + a4*x^4 x = given variable x xexp = exponent multiplier for x (10^xexp) c = constant value cexp = exponent multiplier for contant (10^cexp) a1,a2,a3,a4 = polynomial parameters a1exp,a2exp,a3exp,a4exp = exponent multipliers for parameters a1-a4 (10^aexp) rexp = exponent multiplier for the return value (10^rexp) Example: M1=POLYNOMIAL(M0,0,17879,-3,-40821,-4,34023,-5,-40364,-7,14639,-9,2) This computes the following polynomial and return the result *100. f(M0) = 17.879 - 4.0821*M0 + 0.34023*M0^2 - 0.0040364*M0^3 + 0.000014639*M0^4

POW(x, xexp, y, yexp, rexp) Returns the value of x raised to the y power. Pre-scaling and post-scaling is done using the given

exponent parameters. The result is rounded up to the nearest unsigned integer value. Equation used is: result = ( (x * 10^xexp) ^ (y * 10^yexp) ) * (10^rexp)

Example: X2=POW(222,-3,2,-1,4) would return a value of 7401 computed using: (0.222^0.2)*10000 = 7401

Page 51: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 51 -

PUMPFAIL(callvar, runvar, tsec#, failsecs) Returns a “1” if the call variable has been equal to “1” for more than the fail seconds while the run

variable is zero. This fail will clear on it’s own if the run occurs at some later time. The parameter parameters are: callvar - call variable or expression (usually an output) runvar - run variable or expression (usually an input) tsec# - TSEC timer # to be used (1-224) failsecs - seconds before fail is generated Example: X1=PUMPFAIL(DO1TD,DI1,1,240)

RAMP(ramp#, startValue, endValue, rtimeSec) This will return the start value when first called and then will ramp up (or down) to the given ending

value over the given period of time (in seconds). The parameters are:ramp# a unique number for the function (1-8)startValue value to start with (when the function is first called)endValue value returned at the end of the ramp timertimeSec time period in seconds for the ramp to occurExample: AO1=RAMP(1,819,4095,120)This would ramp analog output #1 from 819 to 4095 over a 2 minute period.

RESPOND(saddr, uloc [,protocol [,nobuild] ]) Defines an additional station address for the RTU to respond as when polled with RTU32 protocol

or Modbus protocol if optional flag is set. The parameters are:saddr station address number (0-255 = HH-WW)uloc memory location for the station data structureprotocol when this optional parameter is a “1”, the given address and uloc will apply to Modbus

protocol instead of RTU32. In this case, the uloc defines a new starting location for the Holding Registers (4x0001). All other Modbus data types will remain the same.

nobuild when this optional parameter is set to “1”, the station status and timestamp will not be updated locally - this may need be used if all the station’s data is being read from another RTU using a protocol other than RTU32.

Example: RESPOND(129,3200) defines RTU32 address “PI” with station data located at 3200.

REPLYWITH(saddr, MR) Forces the reply message type to use when responding with RTU32 protocol. This could be used,

for instance, to send certain data only when necessary (report-by-exception). The parameters are:saddr station address (0-255 = HH-WW)MR read message type to reply with (see RTU32 Protocol table) - a value of 255 will cancel

the forced reply and go back to what is asked for.

RUNCOUNTER(cnum, cvar, uloc) Counts the number of “on” cycles for the given variable. The counter is incremented whenever the

value of cvar goes from zero to non-zero. The parameters are: cnum unique counter number (1-128) cvar variable or expression to count uloc user memory location used to store the counter (16 bit)

RUNTIMER(tnum, tvar, uloc) Provides a run-time meter on the given variable. The run time is incremented in 10ths of hours

while the value of tvar is non-zero. The parameters are: tnum unique timer number (1-128) tvar variable or expression to time uloc user memory location used to store the timer (16 bit) - 10ths of hours

Page 52: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 52 -

SCALE(raw, rmin, rmax, smin, smax) Returns a scaled value given the actual raw value, the minimum/maximum raw values and the

minimum/maximum scaled values. Example: AI1=SCALE(AI1,819,4095,0,4095)

SELECT(test, value1, statement1 [, value-n, statement-n]) Similar to the IF function, SELECT will evaluate the given test expression and execute one of the

statements based on it’s value. If the test expression is equal to value1, statement1 will be executed. If test is equal to value2, statement2 will be executed and so forth. Multiple statements may also be used by separating them with a colon.

Example: SELECT(X1,100,DO1=1,200,DO2=1,300,DO3=1) This will turn on a discrete output based on the value of X1.

SFTABLE(addr1, addr2, antmask, timeout) Modbus RTU, DF1 Half-Duplex and DF1 Radio Modem protocols allow for relaying messages via

the “Store & Forward” method when using COM1. A lookup table is used to translate incoming message addresses to a relayed-to station address.

The following parameters sets up an entry in the Store & Forward table: addr1 address the master is using for the remote station being relayed to addr2 address this RTU will use to get the data from the remote station antmask antenna mask used for switching radios or antennas during the relay - this is an 8-bit mask applied to either DO1-DO8 or DO9-DO16 based on the configuration selection timeout amount of time in milliseconds the RTU will wait for a response

SQR(x [, xexp, rexp]) Returns the square root of x with optional parameters for pre-scaling and post-scaling. Equation used is: result = sqrt( (x*10^xexp) ) * 10^rexp Example: X1=SQR(256,-3,4) would return a value of 5060.

SDATA(saddr, word#) Returns the value of a given word number from the “Station Data Structure” for Micro-Comm

stations obtained using the MESSAGE() or LISTEN() functions. The station data structure is shown later in this manual.

Example: X1=SDATA(@TH, 4) returns the value for AI1 from station TH.SSTATUS(saddr, bit#) Returns the state of a given status bit number from the “Station Status” word for Micro-Comm

stations obtained using the MESSAGE() or LISTEN() functions. The following bits are defined: b7 (LOS) set when station goes into Loss of Signal (user defined) b6 (Data Valid) set when the received data is less than three cycles (tries) old b4 (Control Valid) set when data is first received and cleared at LOS

Example: X1=SSTATUS(@TH, 7) returns a “1” if station TH is in LOS.

SUB1(x)-SUB20(x) Calls a subroutine and returns the EXIT(x) value to the main script routine. Currently up to 20 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 L16 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: X1=SUB1(1,2,3) Subroutine #1: L4=L1+L2+L3 EXIT(L4)

Page 53: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 53 -

TCLOCK(iTime, rTime, iDay, PFRate, CLevel, CStop, OvrStop, OvrStart, uloc) This is a timeclock control function that provides for time inhibit/restore, prefill and override

setpoints. The return value and the given user memory location will have it’s bits set as follows: b0=time inhibited, b1=prefill call, b2=override call (level below the override start) The parameters are: iTime - inhibit time (military time format 0-2359) rTime - restore time iDay - inhibit day-of-week (0=every day, 1-7=Sunday-Saturday) PFRate - prefill rate in units/hour (units the same as CLevel) CLevel - control analog level CStop - normal control stop setpoint (top-off level for prefill) OvrStop - override stop setpoint OvrStart - override start setpoint uloc - user memory location to use for the inhibit and call bitsTIME(x) Returns a system time value based on the requrested parameter number. The parameters available

are as follows: 0 - Seconds since power-up (rollover 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 8 - Seconds since being polled by a central on COM1 - stops at 65535 secs (for central LOS) 9 - Seconds since being polled by a PC using CTU32 protocol on COM2-COM5 (for PC LOS) 10 - Seconds since polled by master on COM2, 11 - Seconds since polled by master on COM3 12 - Seconds since polled by master on COM4, 13 - Seconds since polled by master on COM5

TOTALIZE(pi#, ppc, uloc, nwords [,maxdelta]) This totalizes one of the high-speed pulse inputs given the following: pi# - pulse input register number (1-64) ppc - pulses per totalizer count uloc - user memory location for the totalizer register nwords - totalizer storage size in # of words (1 or 2) maxdelta - optional parameter to set the maximum change in pulse count that will be considered

valid (the default is 32767). This can be used to avoid problems with external pulse registers. Example: TOTALIZE(1,1200,13,2) - increments a 32bit totalizer (2 words starting at user memory

location 13), every time PI1 increases by 1200 (this could be a flow meter with 1200 pulses per 1000 gallons).

XCOPY(msrc, mdst, nwords) Copies data from one location in the RTU to another (including I/O locations) given the following

parameters: msrc - start modbus location for the source data mdst - start modbus location for the destination data nwords - the number of words (16bit values) to copy Note: msrc and mdst locations will correspond to the Modbus reference location shown in the DF1-

Modbus protocol table minus 400000. Supported memory locations include all the I/O data (1-166), X Variables (201-424) and User

Memory Locations (3000-11999). Example: To copy the first 16 discrete inputs to X2, the command is XCOPY(1,202,1)

Page 54: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 54 -

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

General Housekeeping...

Note: The M1550 can now respond to interrogations during script. This can cause undesired results when reading/writing user memory while this same memory is being manipulated in script. See the “MEMLOCK” variable for information on how to enable this feature. (setting MEMLOCK equal to 0 will allow incoming communications to access user memory)

Page 55: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 55 -

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.

Page 56: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 56 -

Page 57: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 57 -

Personality Module Memory Map

Addr Description

0 -

1 - 0x55 - special code

2 - 0xAA - special code

3 - COM1 Parity, Data Bits (UART register)

4 - COM1 Stop Bits (UART register)

5 - COM1 PTT Delay (x10 msec increments)

6 -

7 - Station # (for DF1 or Modbus on all COMs)

8 -

9 - COM3 MCIO EDI16 Module Status Bits

10 - COM3 Baud Rate (17=19200,18=9600,19=4800,20=2400,21=1200, 22=600, 23=300, 24=110)

11 -

12 - Product ID # (17=S4500)

13 - Software Date Month (convert to Hex for display)

14 - Software Date Year (convert to Hex for display)

15 - FLASH Checksum (LSB)

16 - FLASH Checksum (MSB)

17 - BIOS Checksum (LSB)

18 - BIOS Checksum (MSB)

19 - Software Major Version Number (Ascii)

20 - Software Minor Version Number (Ascii)

21 - Software Build Version Number (Ascii)

22 - Realtime Clock - Day of Week (1-7)

23 - Realtime Clock - Month (1-12)

24 - Realtime Clock - Day (1-31)

25 - Realtime Clock - Year (0-99)

26 - Realtime Clock - Hours (0-23)

27 - Realtime Clock - Minutes (0-59)

28 - Realtime Clock - Seconds (0-59)

29 - Realtime Clock - Status (1=RTU has clock module)

30 - Pulse Input Divider MSB for PI1

31 - Pulse Input Divider LSB for PI1

32 - Primary Address (last 8 switches)

33 - Secondary Address (first 4 + last 4 switches)

34 - Pulse Input Divider MSB for PI2

35 - Pulse Input Divider LSB for PI2

36 -

37 - COM2 PTT (RTS) Delay (x10 msec increments) - defaults to 0

38 - Password Protected Flag (1=protected)

39 - COM1 Radio Modem Enable (0xA5=disabled)

40 - COM3 Mode (0=RS-232, 1=RS-485)

41 - COM3 PTT (RTS) Delay (x10 msec increments) - defaults to 0

42 - Remote Radio/Antenna Switch outputs to use (0=DO1-DO8,1=DO9-DO16)

43 - Remote Radio/Antenna Switch default output number (0-16) - 0 = none

44 - Remote Setpoints 8-bit flag (0xA5 = 8bit, otherwise 16bit) - required when using C2000 CTU

45 - COM4 Mode (0=RS-232, 1=RS-485)

46 - COM4 PTT (RTS) Delay (x10 msec increments) - defaults to 0

47 - COM4 Protocol

48 - COM4 Baud Rate

49 - COM4 Parity, Stop Bits, Data Bits (LCR byte)

50 - COM3 Parity (Even = 0xA5, Odd = 0x5A, None=anything else)

51 - RTU32 Protocol System Code (0=none)

52 - Personality Module Configuration CRC (MSB)

53 - Personality Module Configuration CRC (LSB)

54 - Personality Module Script+Subs CRC (MSB)

55 - Personality Module Script+Subs CRC (LSB)

… (56-57 not used)

58 - RTU 1 Status - b0=LOS, b1=AUTOMOTE (1200,1380 secs)

59 (not used)

60 - RTU 1 Discrete Output Byte from CTU

… (61-73 not used)

74 - RTU 2 Status - b0=LOS, b1=AUTOMOTE (1200, 1380 secs)

75 (not used)

76 - RTU 2 Discrete Output Byte from CTU

… (77-104 not used)

105 - COM3 MCIO EAI8, EAO4 and EDO16 Module Status Bits

106 - Power Fail Status (0=OK, 1=Volts<13.05 and holds for 2 min)

107 - Backup Battery Status (1=battery ok, 3=battery fail)

108 - Script Lang. Status (b0=First Pass)

109 - Script Runtime (10msec increments)

110 -

111 -

112 - Micro-Comm Display Current Column (1-??)

113 (not used)

114 (not used)

COM1 Baud Rate (204=19200,187=9600,153=4800,136=2400,102=1200, 85=600, 68=300, 51=150, 34=135, 17=110, 0=75)

COM1 Protocol (1-RTU32, 2-DF1 Slave, 3-Modbus Slave, 4-Modbus Master, 5-DF1 Master, 7-DF1 Full Duplex, 8-Modbus/TCP)

COM3 Protocol (0,1,2-MCIO,3-Modbus Slave,4-Modbus Master, 5-DF1 Master, 7-DF1 Full Duplex, 8-Modbus/TCP)

COM2 Protocol (0-None, 1-MC Display,2-DF1 Slave,3-Modbus Slave, 4=Modbus Master, 5-DF1 Master, 7-DF1 Full Duplex, 8-Modbus/TCP)

COM2 Baud Rate (CC=19200, BB=9600, 99=4800, 88=2400, 66=1200, 55=600, 44=300) - defaults to 9600 baud

CTU32 Utility Update XX Byte from SCADAview 32 (b0-b4=CTU32 Utility Switches, b5=ctu phone dialer, b6=alarm horn output, b7=ctu alarm acknowledge)

Micro-Comm Display Current Row (1=Analog Ins, 2=Discrete Ins, 3=Discrete Outs, 4=Output Timers, 5=Stop/Starts, 6=X Variables, 7=User Memory Screens)

Page 58: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 58 -

RTU32 / SCADAview 32 - Station and Group Data StructuresRTU32 / SCADAview 32 - Station and Group Data StructuresRTU32 / SCADAview 32 - Station and Group Data StructuresRTU32 / SCADAview 32 - Station and Group Data StructuresStatus UpdatesStatus Updates Command UpdatesCommand Updates Control Groups

Word #/bit Data Word #/bit Word #/bit

0/4 Control Valid (not LOS) 30 Analog Output 1 (16bit) 0/0 Alternator Forward

0/6 Valid Data (not LOS or old) 31 Analog Output 2 0/1 Alternator Reverse (00 or 11=auto)

0/7 LOS 32 Analog Output 3

33 Analog Output 4 1/0 Tower 1 Inhibit (1=inhibited)

1 Discrete Inputs 1-16 1/1 Tower 2 Inhibit

2 Expansion Inputs 1-16 34/0 RTU Override Control (1=ovr) 1/2 Tower 3 Inhibit

3 Expansion Inputs 17-32 1/3 Tower 4 Inhibit

35/0 Output 1 PC HOA HAND 1/4 Tower 5 Inhibit

4 Analog Input 1 (16bit) 35/1 Output 1 PC HOA AUTO 1/5 Tower 6 Inhibit

5 Analog Input 2 1/6 Tower 7 Inhibit

6 Analog Input 3 36/0 Output 2 PC HOA HAND 1/7 Tower 8 Inhibit

7 Analog Input 4 36/1 Output 2 PC HOA AUTO

8 Analog Input 5 2 Stop 1 Setpoint (16bit)

9 Analog Input 6 37/0 Output 3 PC HOA HAND 3 Start 1 Setpoint

10 Analog Input 7 37/1 Output 3 PC HOA AUTO 4 Stop 2 Setpoint

11 Analog Input 8 5 Start 2 Setpoint

38/0 Output 4 PC HOA HAND 6 Stop 3 Setpoint

12 Flow Rate (16bit) 38/1 Output 4 PC HOA AUTO 7 Start 3 Setpoint

13 Flow Total (msw) (0-65535) 8 Stop 4 Setpoint

14 Flow Total (lsw) (0-65535) 39/0 Output 5 PC HOA HAND 9 Start 4 Setpoint

15 Raw Pulse Counter 39/1 Output 5 PC HOA AUTO 10 Stop 5 Setpoint

11 Start 5 Setpoint

16/0 Discrete Output 1 Monitor Call 40/0 Output 6 PC HOA HAND 12 Stop 6 Setpoint

16/1 Discrete Output 1 Telemetry Call 40/1 Output 6 PC HOA AUTO 13 Start 6 Setpoint

16/2 Discrete Output 1 Run 14 Stop 7 Setpoint

16/3 Discrete Output 1 Fail 41/0 Output 7 PC HOA HAND 15 Start 7 Setpoint

16/4 Discrete Output 1 System HOA HAND 41/1 Output 7 PC HOA AUTO 16 Stop 8 Setpoint

16/5 Discrete Output 1 System HOA AUTO 17 Start 8 Setpoint

16/6 Discrete Output 1 Disabled 42/0 Output 8 PC HOA HAND

16/8 Central Sending Control Outputs 42/1 Output 8 PC HOA AUTO 18 Time Inhibit Hours 0-23

16/9 Discrete Output 1 Central Call 19 Time Inhibit Minutes 0-59

43 SCL Rate (for compatibility) 20 Time Restore Hours 0-23

17 (repeat above for discrete output 2) 44 SCL Total 21 Time Restore Minutes 0-59

18 (repeat above for discrete output 3)

19 (repeat above for discrete output 4) 22 Time Inhibit Override Stop

20 (repeat above for discrete output 5) 23 Time Inhibit Override Start

21 (repeat above for discrete output 6)

22 (repeat above for discrete output 7) 24 Time Inhibit Prefill Rate

23 (repeat above for discrete output 8)

25 Reset Control Group (1=reset)

24 Time Stamp - Hours 0-23

25 Time Stamp - Minutes 0-59 26 Time Inhibit Status (1=active)

26 Time Stamp - Seconds 0-59 27 Override Re-Enable Status (1=enabled)

27 Listen() time since last reply (secs) 28 Prefill Call Status (1=call)

28 Polling LOS Counter (# of retries) 29 Group Data Valid Flag ($5AA5)

29 Station Address (0-255)

30 Number of group calls

31 Lead pump number (0=no calls)

Station and Group Data Structure

Note: Station data for the two local addresses (RTU #1 and RTU #2) will be created in user memory starting at 8000 and 8100 whenever their address is something other than “HH”. Additional “embedded” stations can be located anywhere as specified in the RESPOND() function.

Page 59: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 59 -

LISTEN()

MESSAGE()(RTU/RTU32)

RESPOND()

Script functions can be used to build station data in 3 different ways:1) LISTEN() will passively save station data whenever it hears an RTU/RTU32 reply.2) RESPOND() will define a local station data structure and reply with the data when polled.3) MESSAGE() will actively poll a station and and save data from the reply.

Once built, SCADAview can then display and update this station data using CTU32 protocol. Command Update data (PC HOAs, etc) is obtained from the PC in this manner.

SCADAview 32

CTU32 DDE Server

RTU32 Protocol - Station Data Flow Diagram

Station Data Structure

(located in user memory)

Station Data Flow Diagram

Page 60: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 60 -

Station Address TableID # ID # ID # ID #

H H 0 L H 64 P H 128 T H 192

H I 1 L I 65 P I 129 T I 193

H J 2 L J 66 P J 130 T J 194

H K 3 L K 67 P K 131 T K 195

H L 4 L L 68 P L 132 T L 196

H M 5 L M 69 P M 133 T M 197

H N 6 L N 70 P N 134 T N 198

H O 7 L O 71 P O 135 T O 199

H P 8 L P 72 P P 136 T P 200

H Q 9 L Q 73 P Q 137 T Q 201

H R 10 L R 74 P R 138 T R 202

H S 11 L S 75 P S 139 T S 203

H T 12 L T 76 P T 140 T T 204

H U 13 L U 77 P U 141 T U 205

H V 14 L V 78 P V 142 T V 206

H W 15 L W 79 P W 143 T W 207

I H 16 M H 80 Q H 144 U H 208

I I 17 M I 81 Q I 145 U I 209

I J 18 M J 82 Q J 146 U J 210

I K 19 M K 83 Q K 147 U K 211

I L 20 M L 84 Q L 148 U L 212

I M 21 M M 85 Q M 149 U M 213

I N 22 M N 86 Q N 150 U N 214

I O 23 M O 87 Q O 151 U O 215

I P 24 M P 88 Q P 152 U P 216

I Q 25 M Q 89 Q Q 153 U Q 217

I R 26 M R 90 Q R 154 U R 218

I S 27 M S 91 Q S 155 U S 219

I T 28 M T 92 Q T 156 U T 220

I U 29 M U 93 Q U 157 U U 221

I V 30 M V 94 Q V 158 U V 222

I W 31 M W 95 Q W 159 U W 223

J H 32 N H 96 R H 160 V H 224

J I 33 N I 97 R I 161 V I 225

J J 34 N J 98 R J 162 V J 226

J K 35 N K 99 R K 163 V K 227

J L 36 N L 100 R L 164 V L 228

J M 37 N M 101 R M 165 V M 229

J N 38 N N 102 R N 166 V N 230

J O 39 N O 103 R O 167 V O 231

J P 40 N P 104 R P 168 V P 232

J Q 41 N Q 105 R Q 169 V Q 233

J R 42 N R 106 R R 170 V R 234

J S 43 N S 107 R S 171 V S 235

J T 44 N T 108 R T 172 V T 236

J U 45 N U 109 R U 173 V U 237

J V 46 N V 110 R V 174 V V 238

J W 47 N W 111 R W 175 V W 239

K H 48 O H 112 S H 176 W H 240

K I 49 O I 113 S I 177 W I 241

K J 50 O J 114 S J 178 W J 242

K K 51 O K 115 S K 179 W K 243

K L 52 O L 116 S L 180 W L 244

K M 53 O M 117 S M 181 W M 245

K N 54 O N 118 S N 182 W N 246

K O 55 O O 119 S O 183 W O 247

K P 56 O P 120 S P 184 W P 248

K Q 57 O Q 121 S Q 185 W Q 249

K R 58 O R 122 S R 186 W R 250

K S 59 O S 123 S S 187 W S 251

K T 60 O T 124 S T 188 W T 252

K U 61 O U 125 S U 189 W U 253

K V 62 O V 126 S V 190 W V 254

K W 63 O W 127 S W 191 W W 255

Page 61: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 61 -

RTU32 Protocol Message Types

Message Read Type:

MR (hex) Data Read 0 (00) none (0 chars)

1 (01) DI1-DI16,AI1-AI2 (10 chars)

2 (02) DI1-DI16,AI1-AI4 (16 chars)

3 (03) DI1-DI16,AI1-AI8 (28 chars)

4 (04) DI1-DI16,AI1-AI2,FRxx,FTxxxxxx

5 (05) DI1-DI16,AI1-AI4,FRxx,FTxxxxxx

6 (06) DI1-DI16,AI1-AI8,FRxx,FTxxxxxx

7 (07) DI1-DI16,AI1-AI2,EI1-EI32

8 (08) DI1-DI16,AI1-AI4,EI1-EI32

9 (09) DI1-DI16,AI1-AI8,EI1-EI32

10 (0A) DI1-DI16,AI1-AI2,FRxx,FTxxxxxx,EI1-EI32

11 (0B) DI1-DI16,AI1-AI4,FRxx,FTxxxxxx,EI1-EI32

12 (0C) DI1-DI16,AI1-AI8,FRxx,FTxxxxxx,EI1-EI32 (48 chars)

13 (0D) DI1-DI16,AI1-AI2,CFSYSHOA (18 chars)

14 (0E) DI1-DI16,AI1-AI4,FRxx,FTxxxxxx,CFSYSHOA (36 chars)

15 (0F) DI1-DI16,AI1-AI8,FRxx,FTxxxxxx,EI1-EI32,CFSYSHOA (56 chars)

32 (20) Smart Poll (reply will be MR types $20-$2F)

Notes: Message Read Types $01-$0F request 12 bits (3 characters) for analog inputs. 16 bit (4 character) analog inputs can be read along with the other data using types $11-$1F. Messages that include the CFSYSHOA are reading the CALL/FAIL status bits and the System

HOA/Output Disabled status for up to 8 locally-controlled discrete outputs (as defined in a GROUP function). Smart Polling with Message Read Type $20 is different in that only non-zero data groups will be included in the reply (MR types $20-$2F). All other data groups will be assumed zero and analog inputs will be the 16 bit version.

Message Write Type:

MW (hex) Data Sent 0 (00) none

1 (01) DO1-DO8

2 (02) DO1-DO8,AO1-AO2

3 (03) DO1-DO8,AO1-AO4

4 (04) AO1-AO2

5 (05) AO1-AO4

Note: Message write types $01-$05 use 12bit analog data. 16 bit analog outputs can be sent using message types $11-$15.

(when using type 9 or type 12 messages)

Page 62: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 62 -

RTU Protocol Message Types

Message Read Type:

MR (hex) Data Read 0 (00) DI1-DI6,AI1-AI6,PI,EI1-EI32 (special to match the old default)

1 (01) DI1-DI6,AI1-AI2

2 (02) DI1-DI6,AI1-AI4

3 (03) DI1-DI6,AI1-AI6

4 (04) DI1-DI6,AI1-AI2,PI

5 (05) DI1-DI6,AI1-AI4,PI

6 (06) DI1-DI6,AI1-AI6,PI

7 (07) DI1-DI6,AI1-AI2,EI1-EI32

8 (08) DI1-DI6,AI1-AI4,EI1-EI32

9 (09) DI1-DI6,AI1-AI6,EI1-EI32

10 (0A) DI1-DI6,AI1-AI2,PI,EI1-EI32

11 (0B) DI1-DI6,AI1-AI4,PI,EI1-EI32

12 (0C) DI1-DI6,AI1-AI6,PI,EI1-EI32

Message Write Type:

MW (hex) Data Sent 0 (00) DO1-DO6,AO1 (special to match the old default)

1 (01) DO1-DO6

2 (02) DO1-DO6,AO1

3 (03) DO1-DO6,AO1,AO2

4 (04) None (poll for data only)

5 (05) DO1-DO6,AO1,AO2 with Override

6 (06) DO1-DO4 with Central/Telemetry Control

7 (07) DO1-DO4,AO1 with Central/Telemetry Control

8 (08) DO1-DO4,AO1,AO2 with Central/Telemetry Control

9 (09) DO1-DO4,AO1,AO2 with Override & Central/Telemetry Control

Note: Message Write types 6 - 9 that include Central/Telemetry Control will do 2 things:

1) Central Control output #5 will always be turned on in the outgoing message.

2) Telemetry Control output #6 will be turned on only if PC HOA #6 is in HAND or AUTO.

(when using type 2 or type 14 messages)

Page 63: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 63 -

Control Group Flowchart(Type 1 - Analog Level Pump-Up with PC HOAs and AUTO Alternation)

Stop/Start Setpoints

Analog Level

Pump Enables

Group Enable

Compare the given analog level with up to 8 stop/start setpoints for the given total # of pumps and generate "n"

group pump calls.

Any Pumps Called Before Now?

No

Alternate by moving the lead pump pointer to the next available pump in the list.

Yes

Call on (n-N) additional pumps starting at the lead pump pointer and skipping over any pumps that are not available or are already being called.

Build list of available pumps (HOAs in auto, not failed, not disabled) - a zero for Group Enable or Time Clock reaching

the disable time will disable all pumps and trigger automatic alternation.

Too Many Pumps Called? (N>n)

Count the number of pumps "N" that are in AUTO and are already being called.

No

Call off (N-n) pumps starting after the first n pumps that were being called and are in AUTO.

Yes

Group already satified? (N=n)

Yes

All Done -Telemetry Call bits will now be set in station data structure for all pumps called.

No

Control Group Function Block Flowchart(type 1: analog level pump-up using PC HOAs and AUTO alternation)

Total # of pumps, pump station addresses, starting pumps, PC

HOA positions, fail bits etc.

Is Lead Pump Still Available?

No

Yes

If fail time is non-zero, check the time since pumps were called and set fail bits if

necessary.

Page 64: M1550 PLC User’s Reference Manual - SCADAview User's Reference.pdf · he M1550 PLC is a reliable, full-featured Programmable Logic Controller. It is a “smart” unit providing

- 64 -

Message Type TableUser Message Types

Type Description and Parameters

0 Modbus RTU Read

port, type, timeout, addr, ref, offset, npts, uloc, ant#

1 Modbus RTU Write

port, type, timeout, addr, ref, offset, npts, uloc, ant#

2 Micro-Comm RTU (old-style control card)

port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, lostries, MR, MW

3 DF1 SLC-500 File Read

port, type, timeout, addr, ref, offset, nwords, uloc, ant#

4 DF1 SLC-500 File Write

port, type, timeout, addr, ref, offset, nwords, uloc, ant#, lostries

5 DF1 PLC-5 Read

port, type, timeout, addr, ref, offset, nwords, uloc, ant#, lostries

6 DF1 PLC-5 Write

port, type, timeout, addr, ref, offset, nwords, uloc, ant#, lostries

7 DF1 Unprotected Read

port, type, timeout, addr, ref, offset, nwords, uloc, ant#, lostries

8 DF1 Unprotected Write

port, type, timeout, addr, ref, offset, nwords, uloc, ant#, lostries

9 Micro-Comm RTU32

port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, lostries, MR, MW

10 Micro-Comm RTU32 User Memory Read

port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, ruloc, nwords, lostries

11 Micro-Comm RTU32 User Memory Write

port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, ruloc, nwords, lostries

12 Micro-Comm RTU Automote (old-style control card)

port, type, delay, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, MR

13 Delay Polling (on a given port)

port, type, delay, ant#

14 Micro-Comm RTU32 Automote

port, type, delay, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, MR

15 Micro-Comm CTU32 Status Update Request

port, type, timeout, saddr, uloc, lostries

16 Micro-Comm CTU32 Reverse Poll

port, type, delay, saddr, ant#

17 ASCII Message

port, type, timeout, ant#, txuloc, txchars, rxuloc, stchar, rxchars

18 Micro-Comm PDU (old-style)

port, type, delay, pduaddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, nwords

19 Micro-Comm PDU32

port, type, delay, SA1, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, MR1, [SA2,MR2,...SA10,MR10]

20 Micro-Comm RTU32 User Memory Setpoints

port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, ruloc, nwords, lostries

21 Modbus RTU User Memory Setpoints

port, type, timeout, addr, ref, offset, nwords, uloc, ant#, lostries

22 DF1 SLC-500 User Memory Setpoints

port, type, timeout, addr, ref, offset, nwords, uloc, ant#, lostries

23 Micro-Comm RTU32 User Memory Setpoints (zero-compressed)

port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, ruloc, nwords, lostries

24 Micro-Comm RTU32 with 6bit/char packed data (more efficient)

port, type, timeout, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, lostries, MR, MW

25 Micro-Comm RTU32 Automote with 6bit/char packed data

port, type, delay, saddr, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, MR

26 Micro-Comm PDU32 with 6bit/char packed data

port, type, delay, SA1, ant#, rly1, ant1, rly2, dbrly, tbrly, uloc, MR1, [SA2,MR2,...SA10,MR10]

27 Modbus RTU Read/Write Registers

port, type, timeout, addr, rref, roff, rnpts, ruloc, wref, woff, wnpts, wuloc, ant#, lostries