[go: up one dir, main page]

0% found this document useful (0 votes)
25 views49 pages

Bahan Kendali

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

HANDOKO RUSIANA ISKANDAR, ST., MT.

03/04/2017

Principles & Practical Design of SCADA System

SCADA Terminology

• SCADA is an acronym for Supervisory Control and Data Acquisition


• Data Acquisition : Gathers information from widely distributed processes
• Supervisory Control : Calculate and give limited control instructions to
distant process facilities

Terms & Terminology


• Field Instrumentation
• Data Acquisition
• Control Loop
• Supervisory Control
• Remote Terminal Unit (RTU)
• Master Terminal Unit (MTU)
• SCADA Server
• Communications Equipment

1
03/04/2017

Historical Background
1960s:
Radio Telemetry : weather monitoring using
unmanned balloon/rocket
Hardwired Remote Monitoring : oil & gas
and processing industries

1970s :
Two-way radio telemetry
Mini-computer
Distributed Process Control System (DCS)
Programmable Logic Controller (PLC)

Historical Background [2]


1980s :
Low cost microcomputer (PC)
Satellite Communications
Cellular Telephone

1990s :
Local Area Network (LAN)
High Speed Communication Devices
Internet

2
03/04/2017

Data Acquisition

Data Acquisition on an ESP System

3
03/04/2017

Types of Field Devices


Conventional Fieldbus based
• 4-20 mA analog signal 1. Microprocessor and embedded system
• Discrete status (0/1) technology
2. Digital signal
• Point-to-point configuration 3. Point-to-point or point-to-multipoint
• Dedicated wiring for each devices 4. Simplified wiring, drawings, and control
engineering
5. Embedded control algorithm
6. example :
• Foundation Fieldbus Transmitter
• Profibus Transmitter
• HART transmitter

Control Loop

4
03/04/2017

Example : Flow Control Loop


Objective :
• maintain flow rate at a desired value (set point)
Control elements :
• Sensor : Flow Transmitter
• Controller : PLC (PID)
• Actuator : Control Valve

Supervisory Control
Set point management for several control loops
Optimization to achieve “the best operating point”
Use advanced control algorithm
• cascade controller
• ratio controller
• override control
• etc

5
03/04/2017

Goals to Achieve
Technical :
• Safety
• Increased productivity
• Equipment protection and maintenance
• Operational optimization
• Energy saving
• Immediate access to inventories, receipts, deliveries, etc.
Economical :
• Plant-wide optimization
• Optimization of personnel utilization

Applicable Processes
Widely distributed processes; spreading over large areas
Require frequent, regular, or immediate intervention
High cost of routine visits to monitor facility operation
Examples :
• Oil and gas production facilities
• Pipelines for gas, oil, chemical, or water
• Electric power transmission system
• Railroad traffic
• Feed water purification plant
• Building automation

6
03/04/2017

SCADA System Architecture

Data Communications
 One MTU can exchange data  Two-way communications (half or
with one or more RTUs full duplex)
 Data exchange within MTU and  serial transmission
RTUs follows a pre-defined set of (asynchronous/synchronous)
rules called communication  Leased or non-leased line
protocol  Guided or wireless medium :
 Data is encoded as binary signal 1. radio link (UHF, VHF,
(series of ones and zeros) microwave, satellite)
 This binary signal is modulated 2. cable link (telephone, twisted
before it propagates through pair, coaxial, power line
communication medium carrier)
3. fiber optic
4. etc

7
03/04/2017

Remote Terminal Unit (RTU)


 Placed at remote plant location
 Integrated with instrumentation and
control systems (PLC or DCS)
 Functions :
• Gathers information from the
field
• Send the information to MTU
• Process the supervisory control
instruction from MTU

Communications

8
03/04/2017

Device Network
Actuator/Sensor Level Field Level
• Analog signals of the conventional • Intelligent field devices are configured in
sensors and actuators are multidrop/bus topology
transmitted via two-wire cable • Single or multi-master mode is supported
• One dedicated two-wire cable is • The numbers of field devices in a field level
required for each sensor/actuator network is limited
• Interoperability issue
• Analog-to-digital and digital-to-
analog converters are required to
enable interfacing and
communications with other
intelligent devices (programmable
controllers, smart transmitter,
fieldbus devices).

Plant Network
RTU to Sub-MTU to MTU connection
Medium
• guided : cable, telephone, ISDN, optical
fiber, etc.
• wireless : broadcast radio, microwave,
satellite
Protocol
• DH, DH+, DH-485, ControlNet
• Modbus, ModbusPlus, ModbusTCP
• Hostlink
• DNP

9
03/04/2017

Corporate/Enterprise Network
Ethernet
TCP/IP
Corporate Applications
• Real time asset
management
• Business support
• Marketing & sales
• Procurement
• Manufacturing
• Distribution
• Data warehouse

Master Terminal Unit (MTU)


Customized configuration for each applications
Connected to Local Area Network (LAN)
Equipped with auxiliary devices (data storage, console, pointing devices,
etc)
Functions :
• Collect process information from RTUs and share the information on
the LAN
• Online operator interface (MMI)
• Send supervisory control instruction to RTUs
• Alarm management
• Report generation
• System security
• Central data processing

10
03/04/2017

Man Machine Interface (MMI)


Provides human access to field automation system
• Operational
• Maintenance & troubleshooting
• Development
Function :
• Communicates with field I/O from Programmable Logic Controllers
(PLCs), Remote Terminal Units (RTUs), and other devices.
• Gives up-to-date plant information to the operator using graphical
user interface
• Translates operator instruction into the machine
• Engineering development station
• Operator station

Man Machine Interface (MMI)


Plant information : Presentation Method :
• Process Variables • Graphics Trending
• Device status • Charts
• Alarms • Reports
• Control Loops • Animation

Equipment :
• Keyboard
• Mouse or other pointing devices
• Touchscreen or CRT

11
03/04/2017

User Applications
Development tools is provided by SCADA system supplier (scripting tools)
Examples :
• Meter gross/net computation
• Pipeline terminal display
• Pipeline inventory
• Transient modeling systems
• Dynamic leak detection
• Pipeline simulator
• Compressor optimization
• Automatic well testing
• Well revenue calculation
• etc.

System Database
 Store historical process information for engineering,
production, maintenance, and business purposes.
 Features :
• Engineering units conversion
• Analog value filtering
• Value limit checking
 Standardized Data Structure
• Analog point structure
• Status point structure
• Accumulator point structure
• Container points
• User defined structure
• Each point in the database has a number of associated
parameters, all of which can be referenced relative to a
single tag name

12
03/04/2017

Industrial Automation Server

OLE for Process Control (OPC)


Object Linking and Embedding (OLE) for Process Control
A standard for process automation (SCADA) communications
A standard software mechanism for sharing data between process
automation (SCADA) of different manufacturers
OPC is based on Microsoft OLE (Object Linking and Embedding) and
DCOM (Distributed Component Object Model)
OPC advantage :
• Simple to implement
• Flexible to accommodate multiple vendor needs
• Provide a high level of functionality
• Allow for efficient operation

13
03/04/2017

Plant-Office Data Integration


Networking has been successfully
implemented from field device level up
to management level.
Data can easily be interchanged between
applications in the same computer or
different computers over a network.
SCADA system can give an immediate
response needed from field device to
management system.
Real-time plant information can be
transferred to office application.
Corporate information system must be
designed to meet its business process.

Dynamic Data Exchange (DDE)


An application protocol that allows data exchange on real-time basis on
Windows/WindowsNT platforms
NetDDE = Dynamic Data Exchange over network

14
03/04/2017

Sample of System linked to Excel

Web-based Process Monitoring


Internet browser as an acceptable MMI standard will minimizes
operator/user training by providing a familiar operating environment
Many visualization techniques are available (JavaScript, Java,
Shockwave/Flash, etc)
Extra development effort is not needed since SCADA supplier software
usually provide integrated web-based and application specific MMI
development
Allows the users (e.g. : supervisor/manager) to monitors process
operation, documents and reports either in the Intranet or Internet
Secured network design is a must to avoid cyber risk such as hacking
attempts and virus

15
03/04/2017

Web Based Monitoring Example

Summary
SCADA is a two-way system : remote monitoring & controlling
Applicable to widely distributed processes
Two way communication system is required
Basic Elements of SCADA :
• Master Terminal Unit (MTU)
• Remote Terminal Unit (RTU)
• Communications Equipment

16
03/04/2017

Background of SCADA
• Introduction and brief history of SCADA
• Fundamental principles of modern
SCADA systems
• SCADA Hardware & Software
• Landlines for SCADA
• SCADA & LAN
• Modem Use in SCADA
• Computer sites & Troubleshooting
• Sistem Implementasion

Background
of SCADA
Introduction and brief history of SCADA
SCADA (supervisory control and data acquisition) has been around as long as there have
been control systems. The first ‘SCADA’ systems utilized data acquisition by means of
panels of meters, lights and strip chart recorders. The operator manually operating various
control knobs exercised supervisory control. These devices were and still are used to do
supervisory control and data acquisition on plants, factories and power generating facilities.

The sensor to panel type of SCADA system has the


following advantages:
1. It is simple, no CPUs, RAM, ROM or software
programming needed.
2. The sensors are connected directly to the meters,
switches and lights on thepanel.
3. It could be (in most circumstances) easy and
Figure : Sensors to panel using 4–20 mA or voltage
cheap to add a simple device like a switch or
indicator.
Field Instrumentation and Control Device

17
03/04/2017

Fundamental principles of modern SCADA


systems
The advantages of the PLC / DCS SCADA system are:
 The computer can record and store a very large amount of
data
 The data can be displayed in any way the user requires
 Thousands of sensors over a wide area can be connected to
the system
 The operator can incorporate real data simulations into the
system
 Many types of data can be collected from the RTUs
 The data can be viewed from anywhere, not just on site•
The disadvantages are:
 The system is more complicated than the sensor to panel type
 Different operating skills are required, such as system analysts and programmer
 With thousands of sensors there is still a lot of wire to deal with
 The operator can see only as far as the PLC
SCADA SISTEM

Fundamental principles of modern SCADA


systems
The advantages of the PC to IED fieldbus system are:
o Minimal wiring is needed
o The operator can see down to the sensor level
o The data received from the device can include
information such as serial numbers, model numbers,
when it was installed and by whom.
o All devices are plug and play, so installation and
replacement is easy
o Smaller devices means less physical space for the data
acquisition system

The disadvantages of a PC to IED system are:


1. More sophisticated system requires better trained employees
2. Sensor prices are higher (but this is offset somewhat by the lack of PLCs)
3. The IEDs rely more on the communication system
SCADA SISTEM

18
03/04/2017

SCADA Hardware & Software


On a more complex SCADA system there are essentially five levels or hierarchies:
1. Field level instrumentation and control devices
2. Marshalling terminals and RTUs
3. Communications system
4. The master station(s)
5. The commercial data processing department computer system

Key features of SCADA software are:


• User interface
• Graphics displays
• Alarms
• Trends
• RTU (and PLC) interface
• Scalability
Figure 1.4 Typical SCADA system
SCADA SISTEM

Landlines for SCADA


• Even with the reduced amount of wire when using a PC to IED system, there is usually
a lot of wire in the typical SCADA system. This wire brings its own problems, with the
main problem being electrical noise and interference.
• Fiber optic cable is gaining popularity because of its noise immunity. At the moment
most installations use glass fibers, but in some industrial areas plastic fibers are
increasingly used.

SCADA SISTEM

19
03/04/2017

SCADA and local area networks


• Local area networks (LAN) are all about sharing information and resources. To enable all
the nodes on the SCADA network to share information, they must be connected by some
transmission medium.
• A LAN is a communication path between computers, file-servers, terminals, workstations,
and various other intelligent peripheral equipments, which are generally referred to as
devices or hosts.

SCADA SISTEM

Page Request
Text/Graphics
Applet

Server

Client
A LAN is a communication path between computers, file-servers, terminals,
workstations, and various other intelligent peripheral equipments, which are generally
referred to as devices or hosts.

Ethernet used to transfer data on a SCADA system’s Page 1

20
03/04/2017

Modem use in SCADA systems

1. Often in SCADA systems the RTU (remote terminal unit (PLC, DCS or
IED)) is located at a remote location. This distance can vary from tens of
meters to thousands of kilometers.
2. One of the most cost-effective ways of communicating with the RTU over
long distances can be by dialup telephone connection.
3. Line modems are used to communicate to RTUs when RS-232 or RS- 485
communication systems are not practical. The bit rates used in this type of
system are usually slow, 1200 to 9600 bps.
SCADA SISTEM

Computer sites and troubleshooting


Computers and RTUs usually run without problems for a long time if left to themselves.
Maintenance tasks could include daily, weekly, monthly or annual checks. When
maintenance is necessary, the technician or engineer may need to check the following
equipment on a regular basis:

• The RTU and component modules Two main rules that are always followed in
• Analog input modules repair and maintenance of electronic systems
• Digital input module are:
• Interface from RTU to PLC (RS-232/RS-485)
• If it is not broken, don’t fix it
• Privately owned cable
• Switched telephone line • Do no harm
• Analog or digital data links
• The master sites
• The central site
• The operator station and software

SCADA SISTEM

21
03/04/2017

System implementation

SCADA SISTEM

Comparison of the terms SCADA, DCS, PLC and smart instrument


SCADA system
• A SCADA (or supervisory control and data acquisition) system means a
system consisting of a number of remote terminal units (or RTUs)
collecting field data connected back to a master station via a
communications system. The master station displays the acquired data
and also allows the operator to perform remote control tasks.
• There is a fair degree of confusion between the definition of SCADA
systems and process control system. SCADA has the connotation of
remote or distant operation.
• A successful SCADA installation depends on utilizing proven and reliable
technology, with adequate and comprehensive training of all personnel
in the operation of the system.

22
03/04/2017

SCADA System’s
On a more complex SCADA system there are
essentially five levels or hierarchies:
1) Field level instrumentation and control devices
2) Marshalling terminals and RTUs
3) Communications system
4) The master station(s)
5) The commercial data processing department
computer system

23
03/04/2017

Distributed control system (DCS)


• In a DCS, the data acquisition and control functions are performed by a
number of distributed microprocessor-based units situated near to the
devices being controlled or the instrument from which data is being
gathered.
• DCS systems have evolved into systems providing very sophisticated
analog (e.g. loop) control capability.
• A closely integrated set of operator interfaces (or man machine
interfaces) is provided to allow for easy system configurations and
operator control.
• The data highway is normally capable of fairly high speeds (typically 1
Mbps up to 10 Mbps).

24
03/04/2017

Programmable logic controller (PLC)


• Since the late 1970s, PLCs have replaced hardwired relays with a combination of
ladder– logic software and solid state electronic input and output modules.
• They are often used in the implementation of a SCADA RTU as they offer a standard
hardware solution, which is very economically priced.

25
03/04/2017

Smart instrument
Although this term is sometimes misused, it typically means an intelligent
(microprocessor based) digital measuring sensor (such as a flow meter) with digital data
communications provided to some diagnostic panel or computer based system.

Remote Terminal Unit


• Marshalling Terminal And Rtu’s
• The Anatomy of A Scada System
• Remote Terminal Unit
• Typical RTU Hardware
• Control Processor
• Analog Input Module
• Multiplexers
• Typical Analog Input Module
• Analog Output

26
03/04/2017

Marshalling Terminal and RTU’s


1. RTU and marshalling enclosure cubicles
2. RTU marshalling cubicles
3. I / O on Demand
4. I / O to Control
5. Electronic Marshalling
6. Communication

SCADA SISTEM
Marshalling Terminal and RTU’s

Marshalling Terminal and RTU’s


1. RTU and marshalling enclosure cubicles
• Menyusun terminal yang terletak di dalam sebuah cubicles marshalling RTU harus
menetapkan titik pemisahan antara RTU, SCADA, listrik dan sistem kelistrikan gardu .
• Perhatikan bahwa untuk beberapa situs , ruang terbatas di dalam gedung gardu mungkin
memerlukan lokasi terminal marshalling dalam kabinet RTU .
• Sebuah RTU dengan terminal marshalling dapat ditentukan untuk pembelian baik dengan
atau tanpa enclosure cubicles.

1. RTU adalah suatu komponen SCADA dimana bertugas melakukan prosesing dari data yang diterima
dari MTU (Master Terminal Unit) kemudian mengirimkan data tersebut ke sistem yang diaturnya,
berlaku sebaliknya.
2. Remote Terminal Unit ini juga bertugas mengambil data baik data status maupun data pengukuran
secara scanning. Tugas lainnya yang lebih utama adalah melaksanakan perintah-perintah dari MMI
yaitu malakukan Buka/Tutup CB/LBS, melaporkan realisasi apa yang diperintahkan MMI lengkap
dengan keadaan RTU pada saat itu (real time).
SCADA SISTEM
Marshalling Terminal and RTU’s

27
03/04/2017

RTU’s
1. In some applications it is required that monitoring
devices be located far out in the field at isolated
equipment sites, at pump stations, wells, or along a
distant stretch of pipeline.
2. In these applications, these units communicate back to a
host computer using Radio waves and are hence called
Radio Telemetry Units.
3. the units serve the purpose of handling Inputs,
generating Control Outputs, and concentrating data for
transmission back to the host system.

28
03/04/2017

Typical RTU hardware modules include:


1. Control processor and associated memory
2. Analog inputs
3. Analog outputs
4. Counter inputs
5. Digital inputs
6. Digital outputs
7. Communication interface(s)
8. Power supply
9. RTU rack and enclosure

Control Processor (CPU)

1 EPROM (or battery backed RAM) 256 kByte


2 RAM 640 kByte
3 Electrically erasable memory (flash or EEPROM) 128 kByte

Communication ports – typically two or three ports either RS-232/RS-


422/RS-485 for:
• Interface to diagnostics terminal
• Interface to operator station
• Communications link to central site (e.g. by modem)

29
03/04/2017

Analog input modules


There are five main components making up an analog input
module. They are:
1. The input multiplexer
2. The input signal amplifier
3. The sample and hold circuit
4. The A/D converter
5. The bus interface and board timing system

30
03/04/2017

Multiplexers
A few parameters related to multiplexers are:
Crosstalk
• The amount of signal coupled to the output as a percentage of input signals
applied to all OFF channels together.
Input leakage current
• The maximum current that flows into or out of an OFF channel input terminal
due to switch leakage.
Settling time
• The time that the multiplexer output takes to settle to a certain percentage
(sometimes 90% or sometimes ±1 LSB of the input value) when a single input
swings from –FS (full scale) to FS or from +FS to –FS. Essentially, the output must
settle to within about ±½ LSB of the input range, before the A/D converter can
obtain an accurate conversion of the analog input voltage.

Switching time
• A similar parameter to settling time, it specifies how long the
multiplexer output takes to settle to the input voltage when
the multiplexer is switched from one channel to another.
Throughput rate
• This relates to the highest rate at which the multiplexer can
switch from channel to channel; it is limited by the settling
time or the switching time, whichever is longer.
Transfer accuracy
• Expresses the input-to-output error as a percentage of the
input

31
03/04/2017

Typical analog input modules


These have various numbers of inputs. Typically there are:
• 8 or 16 analog inputs
• Resolution of 8 or 12 bits
• Range of 4–20 mA (other possibilities are 0–20 mA/±10
volts/0–10 volts).
• Input resistance typically 240 kΩ to 1 MΩ
• Conversion rates typically 10 microseconds to 30 milliseconds
• Inputs are generally single ended (but also differential modes
provided)

Analog outputs

Typically the analogue output module has the following


features:
• 8 analogue outputs
• Resolution of 8 or 12 bits
• Conversion rate from 10 μ seconds to 30 milliseconds
• Outputs ranging from 4–20 mA/± 10 volts/0 to 10 volts

32
03/04/2017

Digital inputs
Typical digital input module
Typically the following would be expected of a digital input
module:
1. 16 digital inputs per module
2. Associated LED indicator for each input to indicate current
states
3. Digital input voltages vary from 110/240 VAC and 12/24/48
VDC
4. Optical isolation provided for each digital input

33
03/04/2017

Digital Output Module


A digital output module drives an output voltage at
each of the appropriate output channels with three
approaches possible:
• Triac switching
• Reed relay switching
• TTL voltage outputs

Typical Digital Output Modules


1. 8 digital outputs
2. 240 V AC/24 V DC (0.5 amp to 2.0 amp)
outputs
3. Associated LED indicator for each output to
indicate current status
4. Optical isolation or dry relay contact for each
output

34
03/04/2017

Typical Digital Output Modules

Mixed analog and digital modules


As many RTUs have only modest requirements, as far as the
analog and digital signals are concerned, a typical solution
would be to use a mixed analog and digital module. This
would typically have:
• 4 analog inputs (8-bit resolution)
• 2 digital inputs
• 1 digital output
• 2 analog output (8-bit resolution)

35
03/04/2017

Communication interfaces
The modern RTU should be flexible enough to handle
multiple communication media such as:
• RS-232/RS-442/RS-485
• Dialup telephone lines/dedicated landlines
• Microwave/MUX
• Satellite
• X.25 packet protocols
• Radio via trunked/VHF/UHF/900 MHz

Power supply module for RTU


1. The RTU should be able to operate from 110/240 V
AC ± 10% 50 Hz or 12/24/48 V DC ± 10%
typically.
2. Batteries that should be provided are lead acid or
nickel cadmium.
3. Typical requirements here are for 20-hour standby
operation and a recharging time of 12 hours for a
fully discharged battery at 25°C.

36
03/04/2017

RTU Environmental Enclosures

Typical considerations in the installations are:


• Circulating air fans and filters: This should be installed
at the base of the RTU enclosure to avoid heat
buildup. Hot spot areas on the electronic circuitry
should be avoided by uniform air circulation. It is
important to have a heat soak test too.
• Hazardous areas: RTUs must be installed in explosion
proof enclosures (e.g. Oil and gas environment).

I/O Subsystems
• The measurements will be made using electronic sensors and
instrumentation, (pressure, temperature, flow, position, etc)
and will be brought into the SCADA system through the
Input/Output, (I/O), Subsystem.
• The Input side is comprised of Analog Inputs, (AIs), which
accept a continuous input of an analog signal, (usually 4 to
20 mA, 0 to 5 VDC, or 0 to 10 VDC) from a transmitter, and,
Discrete Inputs, (DIs), which typically accept an on or off
signal from switch or contact closure.

37
03/04/2017

I/O Subsystems [lanjutan]


There are quite a few permutations of these basic types
allowing for:
1. Differences in voltage level:(TTL,12VDC, 24VDC,
48VDC, 120VAC);
2. Electrical isolation or grounding,(single-ended inputs
versus dual-ended inputs);
3. Source of the electrical power, (sourcing versus
sinking inputs and internally versus externally
powered loops or outputs).

I/O Subsystems [lanjutan]


• The I/O modules may be “local” or close-coupled to
the CPU, (in the same rack or cabinet), for a small
system, or, the I/O may be “remote”.
• Distributed out in the field through theuse of electrical
cabling. In some cases radio modems are used to
connect the I/O to the CPU wirelessly.

38
03/04/2017

Tipical structure of master station

The master station has the following typical


functions:
1. Establishment of communications, which involves configuring each RTU,
initializing each RTU with input/output parameters, as well as
downloading control and data acquisition programs to the RTU
2. Operation of the communications link, which involves (in a master–slave
arrangement) polling each RTU for data and writing to the RTU, logging
alarms and events to hard disk (and operator display if necessary), as
well as linking inputs and outputs at different RTUs automatically.
3. Diagnostics, which involve accurate diagnostic information on failure of
RTU and possible problems, as well as predicting potential problems
such as data overloads.

39
03/04/2017

Master Station

Master Station

A master station has two main functions namely (1) to obtain field
data periodically from RTUs and sub-master stations and (2) to
control remote devices through the operator station.

40
03/04/2017

Sub-master station

It may also be necessary to set up a sub-master station. This is necessary to


control sites within a specific region. The sub-master station has the
following functions:
•Acquire data from RTUs within the region
•Log and display this data on a local operator station
•Pass data back to the master station
•Pass on control requests from the master station to the RTUs in its region

Sub-master station

41
03/04/2017

Modbus Protocol

SCADA :
• Sebuah atau suatu sistem pengawasan/monitoring,
pengendalian/controlling dengan cara pengumpulan data secara
real time. (3 bagian yaitu Master, Slave, Media Komunikasi)
PROTOKOL MODBUS :
• Suatu protokol/aturan sistem komunikasi Data dengan teknik
komunikasi Master Slave.
• Dimana hanya ada satu Master dan satu atau beberapa Slave
yang membentuk sebuah jaringan.

Gb. Sistem Komunikasi Modbus

42
03/04/2017

Mode Pengalamatan Pada Modbus

UNICAST MODE
Master Slave mengirim (Query) kepada 1 Slave, setelah menerima
dan memproses (Query), Slave akan memberikan jawaban
berupa respon kepada Master.
BROADCAST MODE
Master mengirim (Query) kepada slave, slave tidak akan
memberi respon.

Mode Transmisi
1. RTU (Remote Terminal Unit) / Format Default
Format Masing – masing Byte (11 Bit), Yaitu :
 Coding System : 8 Bit Biner, Hexadecimal 0 – 9, A – F.
 Bit per Byte : 1 Star Bit
8 Data Bit, (LSB) Send First.
1 Bit untuk Event/Odd Parity (no bit for no parity)
1 Stop Bit, if used Odd Parity, 2 Bit for no parity
 Error Check : Cyclical Redudancy Check (CRC)

43
03/04/2017

Mode Transmisi [2]

2. Mode ASCII (American Standart Code For Function Interchange)


Format Masing – masing Byte (10 Bit), Yaitu :
 Coding System : Hexadecimal, Karakter ASCII 0 – 9, A – F.
 Bit per Byte : 1 Star Bit
7 Data Bit, (LSB) Send First.
1 Bit untuk Event/Odd Parity (no bit for no parity)
1 Stop Bit, if used Odd Parity, 2 Bit for no parity
 Error Check : Longitudinal Redudancy Check (CRC)

Siklus Pengiriman Query Respon

Query Message From Master


SLAVE ADDRES SLAVE ADDRES
FUNCTION CODE FUNCTION CODE
QUERY DATA RESPON DATA
ERROR CHECK ERROR CHECK
Query Message From Slave

44
03/04/2017

Slave Address

• Berfungsi sebagai pengelamatan pada/untuk setiap


slave.
• Masing – masing slave harus mempunyai alamat yang
berbeda dalam range 1 – 247 untuk pengalamatan
individual.
• Sedangkan alamat 0 digunakan untuk pengalamatan
Broadcast.

Function Code

• Berfungsi untuk memberi informasi slave tentang


perintah yang harus dikerjakan dan sebagai indikasi
respons normal atau jenis error yang terjadi.
• Function Code ada pada Function Field pada rame
dimana berisi pesan nomer kode fungsi.
• Kode fungsi (Function Code) yang valid memiliki range
1 – 255, dimana kode 1 – 127 untuk fungsi normal,
sedangkan 128 – 255 untuk fungsi exception respons.

45
03/04/2017

Query Data

• Berisi kode sebagai informasi tambahan pada function


code tentang aksi yang harus dikerjakan Slave.
• Informasi tersebut bisa berupa alamat input – output,
jumlah input – output, jumlah byte data atau nilai data
pengesetan.

Respons Data

• Berfungsi memberikan respons antara Master dan Slave,


terdapat 4 Proses komunikasi yang terjadi.
1. Jika slave tida menerima pesan query, slave akan
memberikan sebuah respons normal.
2. Jika slave tidak menerima query, master akan
memberikan kondisi time out untuk pengiriman query
tersebut.

46
03/04/2017

Respons (Lanjutan)

3. Jika slave menerima query, tetapi terdeteksi kesalahan


(error), maka tidak ada respons yang dikirimkan
master akan memberikan kondisi Time Out.
4. Jika slave menerima query tanpa ada kesalahan
komunikasi, tetapi slave tidak dapat menangani
masalah tersebut maka slave akan mengirimkan
respons pengecekan untuk memberikan informasi
kepada master letak kesalahan yang terjadi.

Error Check

• Berfungsi untuk mengidentifikasi dan memperbaiki saat


adanya kesalahan pada saat pengiriman query data
berlangsung.
• Ada 2 Metode Error Check yaitu :
• CRC (Cyclical Redudancy Check)
• LRC (Longitudinal Redudancy Check)

47
03/04/2017

Error Check [2]

CRC (Cyclical Redudancy Check)


• Prosedur Perhitungan Nilai CRC adalah
1. Inisialisasi nilai register 16 bit CRC dengan FFFF Hex.
2. EXOR 8 bit data pesan pertama dengan low order byte,
letakkan hasilnya di register CRC.
3. Geser kanan register CRC 1 kearah LSB & MSB diisi dengan
0.
4. Jika LSB tergeser adalah 0, Ulangi langkah 3 jika LSB
tergeser 1 EXOR Register CRC dengan nilai A001 Hex.
(1010 0000 0000 0001).

CRC (Cyclical Redudancy Check) Lanjutan

5. Ulangi langkah 3 – 4 sampai 8 x pergeseran.


6. Ulangi langkah 2 – 5 untuk 8 bit data pesan berikutnya.
7. Nilai akhir register CRC adalah nilai CRC.
8. Pada saat nilai CRC ditempatkan dipesan nilai CRC Low
Order dikirim trerlebih dahulu diikuti oleh High Order
Byte.

48
03/04/2017

Error Check [3]

LRC (Longitudinal Redudancy Check)


• Prosedur Perhitungan Nilai LRC adalah :
1. Tambahkan semua byte tanpa mengikutkan karakter Start
dan End yaitu CRLF tanpa melibatkan Carry.
2. Kurangkan Nilai FF Hex. Dengan hasil jumlah semua byte,
untuk menghasilkan komplemen 1.
3. Tambahkan hasilnya dengan 1 hingga menghasilkan
komplemen 2, hasilnya merupakan nilai LRC.

49

You might also like