[go: up one dir, main page]

0% found this document useful (0 votes)
54 views106 pages

SSE Training Module 2

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 106

SSE TELEMETRY

MODULE 02

1
Training Program for Module 02
• Revision on RTU ( Module 01 )
• Introduction to Network Mapping
• Configure and Test advanced features in Network Mapping.
• Introduction to I/O Mapping
• Configure and Test advanced features in I/O Mapping.
• Introduction to SSE RTU Data Logging
• Configure and Test advanced features in Data logging
• Understand and configure the Communication Orchestrator
• Understand the SSE RTU Control program language or sequential statement list.
• Compile a local program and test.
• Compile a advanced distributed program and test.
• Compile a program with set points from OPC
• Link the SSE-OPC with a SCADA software.
• Route data from the OPC to different types Data Bases .
• Implement remote Time Stamping on Data Bases
• System Planning and Design

2
Communication
Typical Types
➢RS 232
➢RS 485
➢Radio
➢Dial Up Modem
➢Satellite Phone
➢Fiber Optic
➢Cell Phone
•Dial Up
•SMS ( Short Message Service)
•GPRS ( General Packed Radio System)
•HSCSD ( High Speed Circuit Switch Data )

3
Communication
Serial Interfacing Basics
Major points of serial interfacing
o Three kinds of signals:

➢ Data (RXD, TXD)

➢ Control (RTS, CTS, DCD, DTR, DSR)

➢ Clocks (or timing), is used in synchronous applications (TC, RC, ETC)

o Asynchronous versus synchronous

➢ Async uses start and stop bits to frame every character

Disadvantage: Wastes 20% or more of the available bandwidth,


typically
Advantage: Requires minimal wiring connections between devices
➢ Async is deployed only for low-speed interfaces

➢ Sync uses clock signals so the line receiver knows when to sample the incoming

data
Clock signals are usually implemented as separate wires in a serial interface, but
line coding schemes can be used to encode data and clocks on the same wires

4
Communication
Serial Interfacing Basics
With few exceptions, serial interfaces are unidirectional
o Inputs must connect to outputs; outputs must connect to inputs

DTE and DCE were created to enhance standards so that manufacturers would
implement them in directly compatible ways
o DTE-Data Terminal Equipment

➢ TXD, RTS, DTR, are outputs

➢ RXD, CTS, DCD, DSR are inputs

➢ Usually implemented in a male connector

o DCE-Data Circuit-terminating Equipment

➢ RXD, CTS, DCD, DSR are outputs

➢ TXD, RTS, DTR are inputs

➢ Usually implemented in a female connector

o Connecting DCE to DTE requires a straight cable

➢ “Straight” refers to signals, not necessarily pins

o Connecting DCE to DCE or DTE to DTE requires crossover (or null) cable

5
Communication
Electrical Standards Basics
Electrical interface standards specify the following:
oSignal types and their exact names

➢ Data lines

➢ Control lines

➢ Timing lines

oElectrical specifics

➢ Standards specify voltages, voltage ranges, and thresholds for signal

detection
➢ Standards specify balanced or unbalanced signalling

oMaximum data rate-often, but not always, specified

oMaximum distance-often, but not always, specified

oPinouts

oOther requirements

6
Communication
RS-232
The most common electrical interface for low-speed data
o ITU designation V.24, EIA standard 232

o Unbalanced electrical interface-referenced to signal ground lead

➢ Short-range

➢ Low bit rates

o Poor noise immunity, cable capacitance limits distance, unbalanced interface limits

distance
➢ EIA-232 does not specify maximum distance

o Practical for speeds up to 115.2 kbps over very short cables (2m)

➢ Typical application is 19.2 kbps or less over cables up to 15m

o Open-circuit limits: +3 to 25V, -3 to -25V

➢ The zone between 3V and -3V is defined as undefined in the EIA-232 standard-that

is, it is neither zero nor one


o Defined on DB-25, DB-9, and RJ-45 connectors

➢ Often implemented on other connector types and connector blocks as well

7
Communication
EIA-232 EIA-561
DTE
DTE
DB-9 Male Socket 1 2 3 4 5 6 7 8

1 2 3 4 5

DCD
Rx
Tx
DTR
DTE DSR DCE
CTS 6 7 8 9
RTS
RI
GND 8 7 6 5 4 3 2 1

1: Data Carrier Detect (DCD)


2: Receive (Rx)
3: Transmit (Tx)
4: Data Terminal Ready (DTR)
5: Ground/Common (GND)
6: Data Set Ready (DSR)
7: Request To Send (RTS)
8: Clear To Send (CTS)
9: Ring Indicator (RI) 1: Ring Indicator (RI)/Data Set Ready (DSR) Blue
2: Data Carrier Detect (DCD) Orange
3: Data Terminal Ready (DTR) Black
4: Ground/Common (GND) Red
5: Receive (Rx) Green
6: Transmit (Tx) Yellow
7: Clear To Send (CTS) Brown
8: Request To Send (RTS) White

8
Communication
RS-232

TX RX
RX TX
Gnd Gnd

TX RX
RX TX
Gnd Gnd

9
Communication

ADVANTAGES DISADVANTAGES

•Easy to implement /install •Distance max +/- 30 meters


•Versatile communication medium •Point to Point communication
•Global standard ( Not Multi drop )
•Speed Medium •Lightning Damage

10
Communication
RS-485
RS232 RS232 RS 485 RS232
TO
TO
RS485
RS485 RS232
Converter
Converter

RS232 RS232
TO
RS485
Converter

RS232 RS232
TO
RS485
Converter

11
Communication
RS-485

ADVANTAGES DISADVANTAGES

•Easy to implement /install •Distance max 2 Km


•Multi Drop •Speed ( compared to LAN )
•Versatile communication medium •Lightning Damage
•Global standard
•Speed ( compared to Radio )
•Distance ( 0-2 Km )

12
Communication
Optic Fiber

RS232 RS232 Optic RS232


TO
Optic Fiber Fiber TO
Optic Fiber
Converter RS232
Converter

RS232 RS232
TO
Optic Fiber
Converter

RS232 RS232
TO
Optic Fiber
Converter

13
Communication
Optic Fiber

ADVANTAGES DISADVANTAGES

•Multi Drop •Expensive


•Versatile communication medium •Expensive to install
•Global standard
•Speed
•Distance
•Lightning
•Theft

14
Communication
Analog Radio Network

15
Communication
Analog Radio Network

The analog radio will be connected to the FSK Modem port on the RTU

ADVANTAGES DISADVANTAGES

•Distance •Speed ( 1200-2400 Bd)


•Price •PTT Time ( Warm up Time )
•Repair Outlets •Antenna Theft
•Lightning

16
Communication
Digital Radio Network

Digital
Radio RS232
RS232
Digital
Radio

RS232
Digital
Radio

RS232
Digital
Radio

17
Communication
Digital Radio Network

ADVANTAGES DISADVANTAGES

•Distance ( Compared to Wire ) •Speed ( Lower speed with longer


•Speed ( Compared to Analog Radio) distance 1200-19K6 Bd)
•PTT Time •Expensive
•Multi drop •Antenna Theft
•Lightning

18
Communication
Dial Up Land Line Modem Network

RS232
Modem
Modem
RS232

RS232
Modem

Telephone
Network

RS232
Modem

19
Communication
Dial Up Land Line Modem Network
ADVANTAGES

•Distance
DISADVANTAGES
•Speed ( 56K )
•Point to Point communication
•Connection Time
•Expensive
Steps of communication •Cable Theft
•Lightning
•Dial number – ATD 0126634331 •Network ( Telkom)
•Incoming call at RTU – RTU pick line up
•Modems Negotiate baud rate ( +/- 30 sec)
•Switch off FSK and connect
•Go into transport mode
•When finish disconnect ( +/- 15 Sec)

20
Communication
Cell Phone Modem Network

RS232
Cell
Phone Cell
Phone RS232

RS232
Cell Phone Cell
Network Phone

•Vodacom
•Cell C
•MTN

RS232
Cell
Phone

21
Communication
Cell Phone Modem Network

ADVANTAGES DISADVANTAGES

•Distance •Point to Point communication


•Theft •Connection Time
•Versatile •Expensive
•Easy to install •Network Bound
•Multi Function
•Lightning

22
Communication
Cell Phone Modem Network
Dial Up
Exactly the same as the normal dial up modem. ( Max speed 9600 baud)
SMS ( Short Message Service)
Send Protocol message to OPC via service center
Send Read Text message to private persons to indicate alarms.
HSCSD ( High Speed Circuit Switch Data )
With this mode you have a maximum of 4 Channels to upload data and 4 Channels to
Download data .
Therefore it is faster than dial up and SMS ( 14K2 baud rate )
GPRS (General Packed Radio System)
Computer is permanently connected to the service provider via a ISDN Line.
You have 4 Download Link and 2 Upload links. ( 500-800 ms @ 14000b /link)
You don’t pay for the time of calls , but for the amount of data transferred.

23
Inside Computer
GPRS Site
SCADA (Highsite)
Adroit OPUS GPRS

OPC-Server

RF
Radio Site
Database

GPRS GPRS Site


(Highsite)

GPRS NETWORK

NOC

SPOORNET
APN

GPRS

SPOORNET NETWORK

Mobile
Workstation

SCADA SCADA SCADA


View Node 1 View Node 2 View Node 3
SYSTEM OVERVIEW

24
RTU Hardware Bus Port
Note- Do not remove

RTU12 (Top)
Ribbon Cable when
Power is On

8 x LED display For digital inputs

8 x LED display for digital Outputs when


Switch is pushed in

CD- Carrier Detect – will switch off if Data is


detected. - Red

PTT- Press To Talk- Light will switch on when


the data transmission is in progress - Green

Test –Will pulse every 2 Sec when normal.

25
RTU Hardware
RTU12 (Top)

Battery for RTC and NVM

Processor

SRAM
(Data/Descriptor Memory)

26
RTU Hardware
RTU12 (Top)

Real Time Clock and Battery

X-Bus or Telemetry Bus

Descriptor Save EEPROMs

Analog Circuitry

27
RTU Hardware
RTU12 (Bottom)

RTC Crystal and NVM Switch

Descriptor Save EEPROMs

FLASH
(Program/OS Memory)

X-Bus or Telemetry Bus

28
RTU Hardware RTU12 - Comms
Ports ASC0 and ASC1
ASC0 and ASC1 Fitted
• All serial ports on the RTU are DTE ports,
NO exceptions!
• ASC0 and -1 are EIA-561 compatible (NOT
compliant)
RTU12
ASC0 & ASC1
1 2 3 4 5 6 7 8

1: ASCx_CTRL_IN_1
2: ASCx_CTRL_IN_1
3: ASCx_CTRL_OUT_1
4: Ground/Common (GND)
5: ASCx_Rx
6: ASCx_Tx
7: Bootload (ASC0 ONLY, ASC1 Not Used)
8: ASCx_CTRL_OUT_2

29
Communication
EIA-232 EIA-561
DTE
DTE
DB-9 Male Socket 1 2 3 4 5 6 7 8

1 2 3 4 5

DCD
Rx
Tx
DTR
DTE DSR DCE
CTS 6 7 8 9
RTS
RI
8 7 6 5 4 3 2 1
GND
1: Data Carrier Detect (DCD)
2: Receive (Rx)
3: Transmit (Tx)
4: Data Terminal Ready (DTR)
5: Ground/Common (GND)
6: Data Set Ready (DSR)
7: Request To Send (RTS)
8: Clear To Send (CTS)
9: Ring Indicator (RI) 1: Ring Indicator (RI)/Data Set Ready (DSR) Blue
2: Data Carrier Detect (DCD) Orange
3: Data Terminal Ready (DTR) Black
4: Ground/Common (GND) Red
5: Receive (Rx) Green
6: Transmit (Tx) Yellow
7: Clear To Send (CTS) Brown
8: Request To Send (RTS) White

30
RTU Hardware
RTU12 - Comms Ports ASC0 and ASC1
DCD
EIA-561
Rx
Tx DTE
DTR
DTE DSR DCE 1 2 3 4 5 6 7 8
CTS
RTS
RI
GND

RTU12
ASC0 & ASC1
1 2 3 4 5 6 7 8

8 7 6 5 4 3 2 1

1: ASCx_CTRL_IN_1
2: ASCx_CTRL_IN_1 1: Ring Indicator (RI)/Data Set Ready (DSR) Blue
3: ASCx_CTRL_OUT_1 2: Data Carrier Detect (DCD) Orange
4: Ground/Common (GND) 3: Data Terminal Ready (DTR) Black
5: ASCx_Rx 4: Ground/Common (GND) Red
6: ASCx_Tx 5: Receive (Rx) Green
7: Bootload (ASC0 ONLY, ASC1 Not Used) 6: Transmit (Tx) Yellow
7: Clear To Send (CTS) Brown
8: ASCx_CTRL_OUT_2
8: Request To Send (RTS) White

31
RTU Hardware
RTU12 - Comms Ports ASC0 and ASC1

Flow Control Selections

32
RTU Hardware
RTU12 - Comms Ports ASC0 and ASC1
JP20: ASCx_CTRL_IN_1
JP21: ASCx_CTRL_OUT_1

JP22: ASCx_CTRL_IN_2

JP23: ASCx_CTRL_OUT_2

• Jumper position connects the relevant control line


(input/output) to a specific serial port (ASC0/-1)
• 2 and 3 Linked: ASC0
• 1 and 2 Linked: ASC1
• Either ASC0 or ASC1, cannot share the pins!
• Supported Flow Control:
• CTRL_IN_1: CTS (DNP3.0 Tshwane Electrical)
• CTRL_OUT_2: RTS (DNP3.0 Tshwane Electrical)
• CTRL_OUT_1: Hart® Protocol/Mitsubishi (CO)
• CTRL_IN_2: CD for MDS Radio
• CTRL_IN_1: CD for GPRS (cannot be CTRL_IN_2 as MDS
will be used in conjunction with GPRS)

33
RTU Hardware
RTU12 - Comms Ports ASC2 and ASC3
• When RS232 Module fitted, ASC2/-3 have
proprietary pin-outs on the DB-9

34
RTU12 RS232 Module
• This module may NOT be removed
from, or inserted into the RTU while
power is applied to the RTU!!!
• This module expands the serial ports
on the RTU12 to two additional
independent serial ports (ASC2 and -
3)
• Shared pins in the DB9 on the RTU12
base board is used for the relevant
Tx, Rx and GND signals ONLY
• NO FLOW CONTROL SIGNALS ARE
AVAILABLE!!!

35
RTU Hardware
RTU12 - Comms Connections

DTE - DTE DTE - DCE DTE – DCE (Full Flow Control)

DB-9 Male or Female DB-9 Male or Female DB-9 Male or Female


1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

6 7 8 9 6 7 8 9 6 7 8 9

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

RJ45 Socket RJ45 Socket RJ45 Socket

36
RTU Hardware
RTU12 - Comms Ports FSK
• When FSK Module fitted, pin-outs are the
same as for the RTU3, -10 and -11

RTU12
FSK
DB-9 Male Socket

1 2 3 4 5

6 7 8 9

1: V+ Supply
2: V+ Supply
3: Squelch
4: Press-To-Talk/Transmit (PTT)
5: Tx to Radio
6: Ground/Common (GND)
7: Ground/Common (GND)
8: Band Pass Test
9: Rx from Radio

37
RTU12 FSK Module

• This module may NOT be removed from, or


inserted into the RTU while power is applied to
the RTU!!!
• Data rate of ONLY 1K2 is supported
• ERROR on the silk legend, DCD and CD is
swapped!
• The same setup for the RTU10/11 matching to
the relevant radio is still prevalent here, the
FSK Module MUST be matched/paired with a
specific radio

38
RTU12 FSK Module
Radio Gain
Pots set audio Gain and
attenuate
Top - Transmit
Bottom – Receive

Setting are sensitive with


radio types.

CD/DCD
2&3 (Default) Data
Carrier Detect
1&2 Carrier Detect

39
RTU Hardware
RTU12 - IO Connections General

The RTU12 is available in two connector types for field interfacing:


• 10-Way screw terminal, for direct interfacing to the field wiring; and
• 14-Way ribbon cable interface that connects to field wiring interface modules for the field wiring. This saves a
huge amount of space in the cabinet due to the physical size of the ribbon cables.

For clarity sake all IO wiring interface connections discussed here are with reference to the 10-Way screw terminal
connectors, although the 14-Way connectors are shown.

40
RTU Hardware
RTU12 - Comms Connections
Ethernet (EIA-T-568)
• For the RTU12 Ethernet (X-Port) connections (via cable), ensure that a twisted cable is used for direct PC
connection and a straight cable is used when connected to a hub/switch
• Connection to a wireless hub/switch is via a straight cable

41
RTU Hardware
RTU12 - Comms Connections
Ethernet (EIA-T-568)
T-568A Straight T-568B Straight

42
RTU Hardware
RTU12 - Comms Connections
Ethernet (EIA-T-568)
T-568 Crossover

43
RTU Hardware
RTU12 - IO Connections Layout

AIN - Analogue Inputs

DIN – Digital/Binary Inputs

DOT – Digital/Binary Outputs

44
RTU Hardware
RTU12 - IO Connections - DOT
DOT – Digital/Binary Outputs

• Open-Drain outputs (no drive capability,


current sinking)

45
RTU Hardware
RTU12 - IO Connections
DOT Connections (indicative only)

46
RTU Hardware
RTU12 - IO Connections - DIN
DIN – Digital/Binary Inputs

• Optically isolated inputs, active


low (0V) inputs
• Active high (field voltage) inputs
can be supplied on special
request
• Can be software configured to
Counter Inputs

47
RTU Hardware
RTU12 - IO Connections
DIN – Active Low/High
Opto-Isolator type determine if the RTU can be only active low or both

Active Low/High Selection Jumpers


• JP11 Lower DIN selection (DIN1 - DIN4)
• JP12 Upper DIN selection (DIN5 – DIN8)

• 1-2 Linked: Active Low (0V)


• 2-3 Linked: Active High (field voltage)

48
RTU Hardware
RTU12 - IO Connections
DIN – Active Low/High
Opto-Isolator type determine if the RTU can be
only active low or both

Active Low/High Selection Jumpers


• JP11 Lower DIN selection (DIN1 - DIN4)
• JP12 Upper DIN selection (DIN5 – DIN8)

• 1-2 Linked: Active Low (0V)


• 2-3 Linked: Active High (field voltage)

RTUs are shipped by default as Active Low


inputs!

DO NOT CHANGE THIS JUMPER SETTING


UNLESS RTU IS ORDERED AS ACTIVE
HIGH!!!

49
RTU Hardware
RTU12 - IO Connections
DIN Connections (Indicative Only)
Active Low
RTU12

V-MINUS

DIN8

DIN7

DIN6

JMP- LINKS
3 DIN5

2 1 Supply PSU
V-PLUS

DIN4
IK

DIN3

DIN2

DIN1

50
RTU Hardware
RTU12 - IO Connections
DIN Connections (Indicative Only)
Active High

51
RTU Hardware
RTU12 - IO Connections
Layout
AIN - Analogue Inputs
• All AINs are 4-20mA inputs
• NO VOLTAGE INPUTS!

Scaling
4mA = 0m = 0%
20mA = 10m =100%

V =I *R
Vmin = 0.004 * 120 = 0.48v
Vmax = 0.020 * 120 = 2.40v

12 Bit A/D = 4095

( 0.48 * 4095) / 2.5 = 786


( 2.40 * 4095) / 2.5 = 3932

4mA = 786
20mA = 3932

52
RTU Hardware
RTU12 - IO Connections
AIN Connections (Indicative Only)

GND

120 R V2 = 2.4V
A/D AIN8 Loop Powered Instrument
Converter R2
4- 20 mA
120 R AIN7
12 Bit
AIN6

0.0 - 2.5 Volt


AIN5 12 / 24V

GND

AIN4 Self Powered Instrument

+
AIN3 Galvanic External
4- 20 mA
Voltage Input Isolator - Supply

AIN2
V1 = I * R1
R1= V1 / I AIN1
R1
R1 = 13.8 V / 20mA 690 R V1 = 13.8V
DC Voltage Input (13.8 v)
R1 = 690 Ohm

53
RTU Hardware
RTU12 - Decimal Values

10000 1000 100 10 1 0.1 0.01 0.001

0 4 2 3 1 4 0 0 4231.4

7 0 5 0 0 0 7 0 70500.07

0 0 0 0 0 0 0 4 0.004

54
RTU Hardwar
RTU12 – Binary Values
Representation
A binary number can be represented by any sequence of bits (binary digits), which in turn may be
represented by any mechanism capable of being in two mutually exclusive states.

12 bits
Byte
2048 1024 512 256 128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0 0 0 0 1 1
0 0 0 0 0 0 0 0 0 0 1 0 2
0 0 0 0 0 0 0 0 0 0 1 1 3
0 0 0 0 0 0 0 0 0 1 0 0 4
0 0 0 0 0 0 0 0 1 0 0 0 8
0 0 0 0 0 0 0 1 0 1 0 0 20
0 0 0 0 0 1 0 1 0 0 0 0 80
0 0 0 0 0 1 1 0 0 1 0 0 100
0 0 0 0 1 1 1 1 1 1 1 1 255
1 0 1 0 1 0 1 0 1 0 1 0 2730
1 1 1 1 1 1 1 1 1 1 1 1 4095

55
SSE OPC Software

56
OPC
• OLE (Object Link & Embedding) for Process Control
The reason for OPC and not dedicated drivers at the SCADA is :

• The SCADA developers don’t write drivers for all the different
devices
• Different types of SCADA software can link to one OPC Server
• The OPC server can run on a different computer on the network
• From the OPC you can access different types of databases without
going through the SCADA.

57
Protocols
A protocol is the “ language “ use between RTU’s to exchange data . The package is normally called a word and contain
a certain amount of data.

A software driver is the “ Translator “ between two different protocols.


Sample of a protocol word

Address System Data Sign Bit Check Sum

Different types protocol:

– SSE
– Modbus
– Profibus
– IP
– Dnp-3

58
OPC

Network Network

SCADA 01 with SCADA 02 with


OPC Server
OPC Client OPC Client
Driver
RTU

Protocol
Protocol

Protocol Protocol

59
ADROIT SCADA
OPC-Client

Config Toolbox & Comms Server

OPC-Server

Config Data-
Toolbox Data Centre Base
Handler

Protocol Drivers Archive


Database
Data Base
Configured
SQL Etc.
Data
Communication Network.

Outstation Outstation Outstation

60
OPC Configuration
• 1. Add a channel ( New )
– Com1
– Address 254
• 2. Add a device
– Address 254
• 5. Configure Outstation 254
– 8 x Digital inputs
– 8 x Analog inputs
– 8 x Analog Outputs
– 8 x Digital Outputs
– 8 x Counters
• 3. Data scope
– Set Address 254
– Connect simulator box
– Connect DIN and AIN and switch on
– Select station address and request un-configured I/O
– Data Blocks in RTU.

Un-configured I/O will send all data in data blocks

61
• 4. Add a device
– Address 05
• 5. Configure Outstation 05
– 8 x Digital inputs
– 8 x Analog inputs
– 8 x Analog Outputs
– 8 x Digital Outputs
– 8 x Counters
• 6. Configure Outstation Network Mapping
– Destination address
– Polling
– Event Types
– Digipeating
• 7. Download Descriptors
– Auto Polling from OPC
– Auto Polling from RTU
– Event base tags

62
• 8. I/O Mapping Receiving
– Add I/O Mapping on Address 254
• Digital 1 – 4 ( Add 05 ) set Dot 5-8 ( Add 254)
Remove I/O Mapping

• 8. I/O Mapping Transmitting


– Add I/O Mapping on Address 05
• Digital 5 – 8 ( Add 05 ) set Dot 1-4 ( Add 254)

Local Start must be smaller than local stop

• Communication Failure to DOT 8 on Address 05 .


• Create a network map for all event reporting
• Create a network map for all I/o map event reporting
• What is the difference ?
• Save as Training_1

63
Data Logging
• 1. Setup the following tags for Data Logging
The tags must be logged every minute
Please note that if – Log Min after hour is set to anything > 59 it will be disabled ( only
from 1-59 minutes )
– Digital Input 1,3,5,7
– Analog Input 2,4,6,8
Can be use together because it work in a “ OR “ function.
– Setup the logging under the Device ( Hardware and Logging )
Setup the time period that the OPC should poll logged data

– Setup the logging for the tags ( Data points )

– Download the following


• Analogs
• Digitals
• Hardware/Logging

64
Enable Device for Logging

Enable Data Points for Logging

Download Device settings for Logging

65
Setup OPC to retrieve logged data

Auto Poll Time to retrieve


Logged Data

66
Database Setup
• Databases
– Event : Event data or changed data stored
– Poll : The status of the I/O when the station report
back is stored
– Log Data : Logged data is polled and stored
– To OPC : The logged data is passed on to the SCADA

The difference between time stamping and time of arrival:


– Time of arrival : When a station is polled and the data come through
– Time Stamped : When an event took place at a certain time and the data
is reported to the OPC with the time and date when the
event took place. ( Event and Logged data )

• Setup an Access or CSV database with the OPC

67
SMS Messaging

RS232
Cell
Phone Cell
Phone RS232

SSE
Protocol

Cell Phone
Network
•Vodacom SMS
Message
•Cell C
•MTN

68
SMS Message Setup
• Components for a SMS message
– Device Description
– Data Point Description
– Condition of the data point

• Device
– The device description is filled in under “ Header “
• Data Point
– Enable data point for SMS
– SMS Point : Pump 01
– SMS Hi :Trip
– SMS Lo :Normal

Eg. Clifton: Pump 01 Trip


Clifton: Pump 01 Normal

69
1. Channel

2. Device

3. Data Point

4. Network Map

NOTE : RTU-3 Use B-Port SMS Only

70
From Your Cell To Outstation
• To Poll data from your Cell Phone: space

#Poll Station(0I1 8)
Station Address I/O start I/O end
If “0” ignore
Type Info
I=All Conf Inputs
D=Digitals
A=Analogs

The return person must be configured in the I/O mapping

71
From Your Cell To Outstation
• To Send Controls from your Cell Phone:
space

#Set P1(0R1 1)
Station Address Relay No. 1=On
If “0” ignore 0=Off
Type Info
R=Relays

The sender must be configured in the I/O mapping

72
RTU P Code Programming

73
P-Code / RTU Program
Instructions/Commands
Overall…

• P-Code is executed once every second, not faster [and not slower]
• P-Code execution is sequential and cannot react on a hardware peripheral interrupt event
• P-Code is hereditary from the RTU3 technology, thus new data type implementations are
IMPOSSIBLE!
• With the above in mind, certain changes were implemented to utilise certain critical data types
such as the upper 16-bits of CINs (CIUs)
• Floating point data CANNOT be supported, EVER!
• 32-Bit integer data types CANNOT be supported further than it is now, EVER!
• 8-Bit integer data types will not be supported, EVER!
• Any signed integer data types CANNOT be supported, EVER!
• String data types will not be supported, EVER!
• Maximum lines of code: 2500
• One of the most important things: NEVER USE JUMPS BACK INTO THE P-Code!!!
• P-Code is not an endless loop or a thread running in the RTU…
• thus, a whole program must be executed in each executing cycle

74
P-Code / RTU Program
Resultant Logic Operator

• RLO – Resultant Logic Operator


• This is the be-all and end-all of ALL digital (logic) operations
• There is only ONE RLO
• Before the first instruction of a possible series of instructions will be executed, the RLO will be
preloaded with a known logic value (‘1’ or ‘0’) that will be used for the logical operations
• The RLO is the “check flag” for each and every logical conditional instruction

75
P-Code / RTU Program
Instructions/Commands
Operator Mnemonic Operator Mnemonic

LOAD L EQUAL == (Analogue)


AND A (Digital)1 2 NOT EQUAL <> (Analogue)
NAND (NOT AND) AN (Digital)1 2 GREATER THAN > (Analogue)
OR O (Digital)1 2 SMALLER THAN < (Analogue)
NOR (OR NOT) ON (Digital)1 2 GREATER OR EQUAL >= (Analogue)
SET S (Digital)1 LESS OR EQUAL TRANSFER <= (Analogue)
RESET R (Digital)1 INTEGER TI (Analogue)
EQUAL = (Digital)1 TRANSFER FRACTION TF (Analogue)
NOT EQUAL N= (Digital)1 JUMP UNCONDITIONAL JU
INCREMENT INC (Analogue)1 TRANSFER TO STATION TV
DECREMENT DEC (Analogue)1 REQUEST FROM STATION RQ
JUMP CONDITIONAL JC1 UNCONDITIONAL INCREMENT UINC
TOGGLE TOG1 UNCONDITIONAL
MULTIPLY * (Analogue) DECREMENT UDEC
DIVIDE / (Analogue) LABEL LBL
ADD + (Analogue) END END
SUBTRACT - (Analogue)

76
P-Code / RTU Program
Instructions/Commands: Accumulators
• There are only TWO accumulators present in the P-Code engine
• This means any arithmetic operation must be completed after the second load (L) instruction
• eg multiply AREG1 with AREG4 and write answer to AREG200
L AREG 1
L AREG 4
* AREG 200 ; two values are loaded, one in each accumulator, now arithmetic operation
must be executed

▪ The FIRST loaded accumulator becomes the reference accumulator for all arithmetic operators
▪ eg subtract AREG5 from AREG7 and write answer to AREG10
L AREG 7
L AREG 5
- AREG 10

• The SECOND loaded accumulator becomes the reference accumulator for all magnitude operators
• eg if AREG1 greater than AREG4, set DOT9
L AREG 1 ; value loaded into accumulator1
L AREG 4 ; value loaded into accumulator2
> DOT 9 ; accumulator1 is now compared with reference to accumulator2

77
P-Code / RTU Program
Instructions/Commands: Commonly Used

Operator Mnemonic Operator Mnemonic


Analogue Input AIN Seconds SEC
Analogue Output AOT Minutes MIN
Analogue Register AREG Hours HOUR
Digital Input DIN Days DAY
Digital Output DOT Months MONTH
Digital Register DREG Years YEAR
Counter (Lower 16-Bits) CIN Day Of Week DOW (Sunday = 1)
Counter (Upper 16-Bits) CIU Start PTT START
Constant CST Stop PTT STOP
Processed AIN AIP Start STRT
Processed DIN DIP Logic Low LOGIC0
One Shot OS Logic High LOGIC1
Global Alarm Enable GAE Cycle 1 On C1ON
Global Event Enable GEE Cycle 2 On C2ON
Global Logger Enable GLE Cycle 4 On C4ON
Port Rx Counter RXC (?) Label LBL
Port Tx Counter TXC (?)

78
P-Code / RTU Program
Instructions/Commands: Never Used

Operator Mnemonic Operator Mnemonic


AIN Hi Hi Alarm AHH AIN Delta Change ADX
AIN Hi Alarm AH AIN Samples ADT
AIN Lo Alarm AL CIN Logging CLG
AIN Lo Lo Alarm ALL DIN Logging DLG
AIN Logging ALG DIN Alarm DAL
AIN Alarm AAL DIN Event DEV
AIN Event AEV DIN Delta Time DDT

79
P-Code / RTU Program
Instructions/Commands
Obsolete

Operator Mnemonic Operator Mnemonic


CIN Alarm CAL Log Data Every X Minute LXM
CIN Event CEV Log Data Every X Seconds LXS
Tx Buffered Events X Minutes GEM Log Data X Minutes Passed Hour LPH
Tx Events % Full GE% AIN Deadband AQT
Tx Events When X Gathered GEG

80
P-Code / RTU Program
Parameters

Data Type Limit


AIN, AOT, AREG, CIN, CIU, CST 0 to 65535
DIN, DOT, DREG 0 or 1 (zero or one, low or high, false or true)
SEC, MIN 0 to 59
HR 0 to 23
MON 1 to 12
YEAR 0 to 99
DOW 1 to 7
LBL 1 to 65534
PTT Start 10 to 200
PTT Stop 10 to 100

81
RTU Programming
Previously the SCADA did the control of most the interlocks or sequences in the field. If
the SCADA failed or a communication failure is present to the device , then the control
commands could not be executed. Therefore it is good practice to do controls locally or
as close to the device as possible.
– The RTU is able to accommodate an intelligent control program .
– The Control program could be downloaded via the selected communication medium
from the OPC to the device.
– Changes to the program can be made at the OPC and then downloaded to the device.

Program Name

82
RTU Programming

• Give the program a name


• What is the purpose of the program
• Write all types of scenarios or possibilities down
• SSE programming have the following fields:

Steps Instructions Parameters I/O Name Description

83
Import a program from a .csv file

Export a program from a .csv file


Add a new row to the program

Insert a new row with defaults

Delete a selected row from the program

Delete ALL ROWS from the program

Copy a selected row from the program

Paste selected rows from the program over


existing rows

Insert the copied row from the program

Save and Exit from the program


84
Instructions (Commands)
• AND A AND B = Q
0 AND 0 = 0
0 AND 1 = 0
A B 1 AND 0 = 0
1 AND 1 = 1

• OR
A OR B = Q
0 OR 0 = 0
A 0 OR 1 = 1
1 OR 0 = 1
B
1 OR 1 = 1

85
Programming Exercise 01

• The purpose of the program is:


– If Digital Input 01 = On then Relay 01 = On

• Add rows ( steps ) 1 to 5


1. A Din 01 RLO=Result Logic Operator
2. = Dot 01 1. RLO = RLO (1) AND Din 01 (1)
3. End = DOT ( 1 )

RLO=Result Logic Operator


1. RLO = RLO (1) AND Din 01 (0)
= DOT ( 0 )

86
Programming Exercise 02
• The purpose of the program is:
– If Digital Input 01 = On and Digital input 02 =On
– then Relay 01 = On
• Add rows ( steps ) 1 to 5 RLO=Result Logic Operator
• RLO = RLO (1) AND Din 01 (1) =1
• RLO = RLO (1) AND Din 02 (1) =1
1. A Din 01 • RLO = DOT ( 1 ) =1
2. A Din 02
3. = Dot 01
4. End RLO=Result Logic Operator
• RLO = RLO (1) AND Din 01 (0) =0
• RLO = RLO (1) AND Din 02 (0) =0
• RLO = DOT ( 1 ) =0

87
Programming Exercise 03
• The purpose of the program is:
– If Digital Input 01 = On and Digital input 02 =off
– then Relay 01 = On
• Add rows ( steps )

1
1. Din 01 0 0
1. A Din 01
1 1
0
2. AN Din 02
2. Din 02 3. = Dot 01
1 4. End
3. Dot 01 0 0

88
Programming Exercise 04
• The purpose of the program is:
– If Digital Input 01 = On or Digital input 02 =0n or Digital input 03 =0n
– then Relay 01 = On
• Add rows ( steps )

1
• Din 01 0 0

1
2. Din 02 0 0 1. O Din 01
1
2. O Din 02
3. Din 03 3. O Din 03
0 0
4 = Dot 01
1 5 END
4. Dot 01 0 0

89
Programming Exercise 04

• Write a program from the following RLO Graph

1 1
1. Din 01 0 0 0
1
2. Din 02
0 0 1. AN Din 01
2. A Din 02
3. Din 03 1 1
3. AN Din 03
0
4 = Dot 01
1 5 END
4. Dot 01 0 0

90
Programming Exercise 05
• Write a program to do the following:
• Digital input 01=1 switch relay 01 on . Digital input 02 =1 switch relay 01 off

1
• Din 01 0 0
1. A Din 01
1
2. Din 02 2. AN Din 02
0 0
3. S Dot 01
1 4. A Din 02
3. Dot 01 0 0 5. AN Din 01
4 R Dot 01
5 END

91
Programming Exercise 06
• Write a program to do the following:
• Digital input 01=1 switch relay 01 on . Digital input 02 =1 switch relay 01 off

1
1. Din 01 0 0 1. A Din 01
1
2. AN Din 02
2. Din 02 3. S Dot 01
0 0
4. R Dot 02
1 5. A Din 02
3. Dot 01 0 0 6. AN Din 01
1
4 R Dot 01
1
4. Dot 02 5 S Dot 02
0
6 END

92
Programming Exercise 07
• Write a program from the following RLO Graph

1
1. Din 01 0 0
1 1. O Din 01
2. Din 02 0 0 2. O Din 02
1 3. A Din 03
3. Din 03 0 0 4. = Dot 01
1 1 5. END
4. Dot 01 0
0 0

93
Analogs in programming

• L = Load a value in the accumulator


• T = Transfer a value to an accumulator
• INC = Increment the accumulator with a value
• == = Compare the value with previous value

Other commands
• >=
• <=
• +
• -
• Etc

94
Programming Exercise 08
• Write the following program : If AIN 01 > OR = TO 2000 ( Raw value ) Switch Relay 01 On

Raw
Value

2000

1. Ain 01

1
2. Dot 01 0 0

1. L Ain 01
2. L Cst 2000
3. >= Dot 01
4. END

95
Programming Exercise 09
• Write the following program : If AIN 01 > OR = TO 2000 ( Raw value ) Switch Relay 01 On

Raw
Value
1. L Ain 01
2000
2. L Cst 2000
1. Ain 01 3. >= Dot 01
4. A Dot 01
1 5. R Dot 02
2. Dot 01 0 0 6. AN Dot 01
7. R Dot 02
0 1 8. END
3. Dot 02 1

96
Programming Exercise 10
• Write the following program : If AIN 01 > OR = TO 2000 ( Raw value ) Switch Relay 01 On
• Write the following program : If AIN 01 > OR = TO 3000 ( Raw value ) Switch Relay 02 On

Raw
Value 1. L Ain 01
2000 2. L Cst 2000
3. >= Dot 01
1. Ain 01 4. L Ain 01
1 5. L Cst 3000
0 0 6. >= Dot 02
2. Dot 01 7. END
0 1 1
3. Dot 02 0

97
Programming Exercise 11
• Write the following program :

Raw
Value

2000
1. L Ain 01
1. Ain 01
2. L Cst 2000
3. >= Dreg 01
4. A Dreg 01
1
5. A Din 01
2. Din 01 0
6. = Dot 01
1 7. END
0
2. Dot 01

98
Programming Exercise 12
• Write the following program :
3000
AIN 02
1000

AREG 01

1000 DIN 01=RUN


DIN 02=TRIP
DOT 01=START
STOP

If the tower is lower than “1000” raw then start the pump and the pump
run until the tower is full “3000”. If the reservoir low set point ( Areg 01)
is reached or the pump trip is on then the pump start ( Dot 01 ) must stop.

99
The Program 12
• ( Low Level on Tower)
L AIN 02
L CST 1000
< DREG 01
• ( High Level on Tower)
L AIN 02
L CST 3000
> DREG 02
• ( Low Level on Reservoir)
L AREG 100
L CST 1000
< DREG 03
• ( Pump Start Sequence)
A DREG 01 ( Tower Low Level)
AN DREG 03 ( Reservoir not low Level)
AN DIN 01 ( Pump not running)
AN DIN 02 ( Pump not Tripped)
S DOT 01 (Start Pump)
• ( Pump Stop Sequence)
O DREG 02 ( Tower High Level)
O DREG 03 ( Reservoir low Level)
O DIN 02 ( Pump Trip )
R DOT 01 ( Stop Pump )

END
PROGRAM 08 A . With the previous program : Use the Analog Registers to determine the set points on the Tower

100
Programming Exercise 13
• Use the previous program and do the following:

3000 Areg-02
AIN 02
1000 Areg -01
DIN 03=Open
DIN 04=Close
DOT 02=Valve

AREG-03 1000 DIN 01=RUN


DIN 02=TRIP
DOT 01=START
STOP

If the tower is lower than “1000” raw then start the pump and the pump
run until the tower is full “3000”. If the reservoir low set point ( Areg 01)
is reached or the pump trip is on then the pump start ( Dot 01 ) must stop.

The pump must start against a close valve . If the pump stop then first close
the valve and then stop the pump. ( Replace the Constant Values now with
Analog Registers and set values from OPC )

101
The Program 13
• ( Valve Sequence)
A DIN 04 ( Valve Close)
AN DIN 03 ( Valve not Open)
S DOT 01 (Start Pump)
A DIN 01 ( Pump running)
A DOT 01 (Start Pump)
S DOT 02 (Open Valve)

A DREG 02
O DREG 03
O DIN 02
S DREG 04
A DREG 04
A DIN 03
R DOT 02
A DREG 04
A DN 04
R DOT 01
R DREG 04
END

102
Programming Exercise 14

3000 DREG 21

ADD=05

1000 DREG 20

ADD=250 LEVEL=AIN 03

DIN 01=RUN
DIN 02=TRIP
DOT 01=START
STOP

If the level is lower than 1000 then the pump at station 250 must start.
If the level is higher than 3000 then the pump must stop. If there is a communication failure
at the pump station then the pump must stop.

Tips:
• Declare DIN 09 in outstation 05
• Do I/O Mapping Tx 250 dot 1 1 din 9 9
• Network map I/O Event Reporting

103
The Program 14
• ( Low Level)
L AIN 03
L CST 1000
< DREG 20
• ( High Level)
L AIN 03
L CST 3000
> DREG 21

A DREG 20 ( Tower )
S DIN 09 (Start Pump)
• ( Pump Stop Sequence)
O DOT 08 ( Tower High Level)
O DREG 21 ( Reservoir low Level)
R DIN 09 ( Stop Pump )

END

104
Programming Exercise 15

3000 AREG 21

ADD=05

1000 AREG 20

ADD=250 LEVEL=AIN 01

P1 P2

If the level is lower than Areg-20 then the pumps at station 250 must start.
If the level is higher than Areg-21 then the pumps must stop. The pumps must rotate with starts
( in other words build a flip/flop to alternate the pumps ). Use the previous program and add the
additional items.

105
The Program 15
L AIN 01 ( Load the Res Level )
L CST 1000 ( Load the Low Set point )
< DREG 01
L AIN 01 ( Load the Res Level )
L CST 3000 ( Load the Low Set point )
> DREG 02

A DREG 01 ( If Res is low )


AN DREG 05 ( And Pump 01 did not run last )
AN DOT 01 ( And pump 01 is not running )
AN DOT 02 ( And pump 02 is not running )
S DOT O1 ( Start pump 01 )
S DREG 05 ( Set pump 01 run last )

A DREG 01 ( If Res is low )


A DREG 05 ( And Pump 01 did run last )
AN DOT 01 ( And pump 01 is not running )
AN DOT 02 ( And pump 02 is not running )
S DOT 02 ( Start pump 02 )
R DREG 05 ( Reset pump 01 run last )

A DREG 02 ( If Res is High )


R DOT 01 ( Stop pump 01 )
R DOT 02 ( Stop pump 02 )
END

106

You might also like