Remote Communication

advertisement
Communication
COMMUNICATION
Between people
Voice
Language
COMMUNICATION
Between machines
Physical
Layer
Communication
Protocols
General Review
Physical layer
Unitronics PLCs support several
physical layers:
RS232
(2 units; up to 16 meters)
RS485
(up to 32 units; up to 1200 meters – “daisy chain”)
CANbus (up to 64 units; up to 1000 meters – “daisy chain”)
Ethernet (up to 100 meters from device to HUB – “Star”)
General Review
Protocols
Unitronics PLCs support
several Protocols:
Pcom (Unitronics private protocol)
MODBUS
CANbus (Unitronics ISC, UniCAN, CANOpen)
MODBUS IP
Option to implement third party protocols
(RS232/485 and Ethernet)
Hardware Review
Serial
M90
M91/91-2
Jazz
(option)
V120
1 port,
RS232
1 port,
RS232/485
2 ports,
RS232/485
2 ports, RS232
1 optional port,
RS232/485
Some
models
Some
models
All
models
None
None
Ethernet card
(optional)
CANbus Some
models
Ethernet None
V230/260/280/290
V570
2 isolated ports,
RS232/485
Yes
Ethernet card
(optional)
Protocol Review
M90
M91/91-2
V120
V230/260/280/290
/V570
RS232
RS485
Pcom
Pcom
Pcom
Pcom
MODBUS
MODBUS
MODBUS
User defined User defined User defined
CANbus
ISC
ISC
ISC
UniCAN
CANOpen
ISC
UniCAN
CANOpen
Ethernet
None
None
None
Pcom over IP
MODBUS IP
User defined
Physical Layers
RS232
Communication parameters
• Baud rate:
300 ~ 115200 bps
• Start bit:
always 1bit
• Data bits:
7 or 8 data bits
• Parity check:
Even, Odd, None – 1 bit
• Stop bits:
1, 1.5 or 2 bits
Communication “word” can be only 10 or 11 bits
All communication parameters in both sides must be exactly the same!
M90/91 & Jazz default parameters: 9600, 7, Even, 1
Vision default parameters:
57600/115200, 8, None, 1
Physical Layers
RS485
• Communication in “daisy chain” network – up to 32 devices
• Balanced half duplex signal (RS485)
•Two wires A (Rx/Tx+) and B (Rx/Tx-);
• Up to 1200 meters - twisted shielded pair cable;
• Supported by Jazz (optional) M91-2-xx, V120, V2xx (optional) controllers, V570
Physical Layers
RS485
• Communication parameters – same as in RS232
• Addressing (Unitronics OPLC) – ID 65 ~ 254
Protocol Review
The Pcom Protocol
All Unitronics PLC operating systems are embedded with
the Pcom protocol. Pcom enables Unitronics PLCs as slave
devices, enabling them to be accessed by incoming
communications via all ports.
The Pcom protocol is also the protocol that we use for
programming, remote access, and data acquisition
The Pcom protocol is addressable by nature (part of the
protocol) and so it can work over a network as well.
The Pcom protocol is given free as a DLL with all
documentation and help for people to implement inside their
software.
Protocol review
The Pcom protocol
Two other implementations of the Pcom protocol are the
DDEserver and the OPCserver.
DDEserver and OPCserver are PC based applications that
can, on one hand, take information from our PLCs and on the
other give out this information in a format that other Windows
based applications can understand (like SCADA systems for
example).
Our DDE and OPC server are given free on the installation
CD of both U90Ladder and VisiLogic, or can be downloaded
from our website.
Protocol Review
The MODBUS protocol
One of the most common protocols in the market is the
MODBUS protocol.
The MODBUS protocol, originally made for Modicon PLCs,
is shared by many SCADA applications, drives and other
equipment.
In order to support MODBUS, the PLC has to conform with
the MODBUS addressing structure.
MODBUS is a master-slave protocol, and can run over
RS232/485 as well as Ethernet.
There are different versions of Modbus. We support
Modbus RTU (binary) over RS232/485 and Modbus IP over
Ethernet
What do you think?
Let’s make a small application that
implements MODBUS communication
between two PLCs.
One PLC will act as master PLC, and the
second will act as slave.
Physical Layers
CANbus
Unitronics’ CANbus runs on the same physical layer as
A.B.’s DeviceNet, but uses a different protocols.
A CANbus network can include up to 63 PLCs and mix
different models of M90/91as well as Vision.
CAN bus wiring Specifications
CAN bus Cable Lookout
Protocol Review
CANbus as Bridge
A PC can ‘talk’ to a Vision via the RS232 serial port.
The PLC can act as a ‘bridge’ between RS232 and CANbus.
Up to 63 PLCs can be connected in a CANbus net and then
linked via the ‘bridge’ to a PC.
The PC can ‘see’ each PLC in the CANbus net.
The ‘bridge controller’ needs no special programming or
hardware. Any random controller in the net can act as the bridge.
This connection also allows software download and upload to
every PLC on the net.
In the case of a mixed network (M90/91 and Visions) the bridge
controller must be a Vision PLC.
CAN bus Network to PC
Unit ID 1
Bridge
Unit ID 2
Unit ID 3
Protocol Review
Protocols over CANbus
PLCs on the CANbus network can also ‘talk’ among themselves.
In Unitronics protocols – ISC and UniCAN, the PLCs are both
master and slave. ISC and UniCAN are Multimaster protocols
CANOpen is protocol, supported by a lot of third party devices. It’s
supported only by Vision series OPLC. Unitronics acts as Master.
One Unitronics controller can be connected to few other devices.
What do you think?
Let’s build a small application that connects two
PLCs in CANbus - UniCAN and allows them to
read information from each other.
Remote Communication
Modem
All Unitronics PLCs
support modem
connection.
Connecting to the PLC
from afar enables one
to remotely download,
debug and upload
applications.
Remote Communication
Modem
Unitronics PLCs support 4
types of modems:
PSTN modem (Plain Simple
Telephone Network)
GSM/GPRS modem (wireless)
CDMA modem
RF modems
Remote Communication
Modem
When we want to connect a PC to a PLC via modem
we have 3 aspects to look at:
PLC to modem
Modem to modem
Modem to PC
The cable connecting the PLC and
modem is the Unitronics’
programming cable, accompanied
by a special connector (each
modem has its own). The modem
has to be prepared, via software,
before it is connected.
The connection can be established both from the PC and the PLC
Remote communication
SMS
One of the major advantages of
cellular modems is the ability to
send short text messages
(SMS).
SMS is a global standard that
allows the sending of characters
from one phone to the another.
The phones can either be on
the same network or on different
ones (depending on
agreements between the
cellular providers).
Remote Communication
SMS
The ability to connect the PLC
to a cellular phone opens up a wide
variety of applications.
Basically, a PLC connected to a GSM
modem can receive pre-programmed
messages and act accordingly.
The PLC can also respond by sending a
message to a cellular phone.
Remote Communication
Another important part of Remote Access is the
Ethernet
Remote Communication
Ethernet
 Unitronics’ Vision230/260/280/290/570 all
support Ethernet.
 Our Ethernet Card offers 4 sockets
and works with both TCP/IP and UDP/IP.
The Ethernet card can work with speeds of
either 10 or 100Mbps.
The PLC supports the MODBUS over TCP
protocol and uses this as the connection to
SCADA systems and among PLCs.
Remote Communication
Software Utilities
As part of Unitronics philosophy, we
provide a special software utilities free with our Software CDs.
This utility enables PC to PLC
modem connection and remote
access—even without VisiLogic or
U90Ladder software.
Remote Communication
Remote access
This easy to use tool is in fact a
very simple “SCADA” It enables
monitoring and operate of the
controller from PC.
Remote access supports
RS232/485, Modems, Ethernet and
CAN bus via “bridge”.
Remote Communication
DataXport
This tool is especially designed to
make automated reading of Data
Tables from Remote OPLC to PC.
Supports RS232/485, modem
connection and Ethernet.
Unitronics – Thank You
RS485 Wiring Specifications
CAN bus Cable Lookout
RS232/RS485 Port Pinout
M91-19-4xx, the new M91-2-xx and
Vision series controllers have common
RS232/485 COM ports.
RS232 or RS485 are jumper
selectable.
General Review
In order to establish
communication we need
to deal with 4 elements:
Physical layer
Protocol
Baud rate
Data structure
What do you think?
What's the maximum number of PCs that can
‘look’ simultaneously at one PLC?
Let’s make a small application that
communicates between two PLCs over the
Ethernet.
General Review
Baud rate
Unitronics PLCs support a wide
range of baud rates:
9600-57600bps for serial communication
50-1000Kbps For CANbus
10/100Mbps for Ethernet
General Review
Data structure
Unitronics PLCs support different
structures:
10/11 for serial
11 bit format
TCP or UPD for Ethernet
Physical Layers
RS232
• Communication between two devices only
• Unbalanced full duplex signal
• Up to 16 meters
• Supported by all Unitronics controllers
Physical Layers
RS232
Two types of communicating devices:
DTE (Data Terminal Equipment)
•Computers
•Controllers
DCE (Data Circuit-Terminated Equipment)
•Printers
•Modems
Male DB9
Female DB9
Physical Layers
RS232
DTE signals and pin-out
Computer
Unitronics OPLC
DCE signals and pin-out
What do you think?
Can I centralize information from 9 PLCs on the
CANbus network into one PLC?
What is the maximum number of PCs that can
simultaneously look at the data within a Unitronics
CANbus network?
I have a sensor that runs on CANopen. Can I
connect it to the CANbus network and read the
value inside the PLC?
Remote Communication
Modem
A modem, in general, has two modes of operation:
Data mode
Command mode
In Data mode, the modem is a tube
conveying data between two points.
When
we talk of
modems
in a use the AT
In Command
mode,
one can
network
(liketoRF),
we must ascertain
commands
communicate
with the
that
the modem
not add
modem,
changedoes
settings,
or make the
anything
to the data;
if it does,
we
modem perform
different
operations.
must
take it into
consideration
the
The modem
stays
in commandinmode
protocol.
In order
to entertodata
until someone
connects
it, ormode,
gives
the
has to connect to the
themodem
dial command.
other modem (or the network), and at
the end of the session it must
disconnect.
What do you think?
What conditions have to be met in order to
download an operating system over a modem?
Can I use internal modems on the PC? What
selections do I have to make in the PC modem
configuration?
Can I be connected, over modem, to more
than one PLC at a time?
What do you think?
I want to have a system that will call me every
time there is an event, can I do that? What will
happen when the system calls?
If I want to connect to one of my PLCs for
debugging, can SMS messages still flow in and
out of the modem?
Can an SMS be considered as a real-time
event from the system?
Download