General Concepts .................................................................................................................................... 12-2
USB Communications ................................................................................................................................. 12-9
Serial Communications ............................................................................................................................... 12-9
General Serial Specifications .................................................................................................................... 12-10
Serial Expansion Modules Specifications .............................................................................................. 12-16
Serial Port Setup and Programming ........................................................................................................ 12-17
Serial Port Settings ................................................................................................................................ 12-17
Serial Protocols ......................................................................................................................................... 12-20
The purpose of this chapter is to help the user gain an understanding of the serial communications capabilities
of the BRX platform. The BRX platform features the Do-more! DM1 technology which has a very robust
communications system allowing the programmer to accomplish many tasks that can prove difficult with
other PLCs. Every BRX MPU has a built-in RS232/485 (software-selectable) serial port. Pluggable Option
Modules (POM) and Expansion modules are also available that will add additional RS-232 and RS-485 port
configurations.
The BRX platform provides a wide variety of serial protocols to choose from and is capable of serial
communications to a wide variety of field devices such as HMIs, SCADA systems, PLCs, barcode readers
and scales, to name a few.
The available protocols are:
• Modbus RTU protocol: one of the most popular and widely used protocols in the industrial
automation community.
• Do-more! protocol: can access the entire BRX memory structure and can utilize a security account
to protect the data. Some HMIs and SCADA software such as C-more and C-more Micro, can take
advantage of this enhanced security while keeping data transmission integrity intact.
• K-sequence protocol: is typically used to communicate with DirectLOGIC PLC systems.
• ASCII: although technically not a protocol, it is supported to communicate with devices such as
scales, barcode readers and other simple devices.
• DMX512 protocol: stage lighting control protocol allows the BRX platform to easily send and receive
commands to most DMX512 devices and controllers.
• Custom protocol: if there is a need for a protocol that is not available, and the user has a thorough
working knowledge of the protocol, it is possible for a user to use the available raw commands to
write a custom protocol the DM1 technology can execute.
The following sections of this chapter as well as the software help file will be of significant use to you when
connecting and communicating with the various protocols needed for these types of devices.
General Concepts
As a security feature, when communicating with Modbus RTU or K-sequence the controller does not allow
external devices that communicate with the controller to have direct access to the controller’s internal memory
and I/O. These protocols will be serviced through reserved memory blocks designated for that protocol. This
is setup to allow the programmer to pass data externally when using third party devices while maintaining a
secure environment. This is discussed in more detail in each protocol section later in this chapter.
12-2
BRX User Manual, 4th Edition, Rev. F
Chapter 12: BRX Do-more! Serial Communications
Terminology
During the course of this chapter we will use terminology and phrases that are specific to a Protocol or
Physical Medium the user should understand. By way of explanation we have included some common terms
and definitions in this section. Definitions and explanations of specific parameters particular to each Protocol
will be discussed later in this chapter.
Physical Medium – Wires, radios, cellular service, or satellite link. The physical method (hardware) on which
the data is being transmitted or received. The physical medium contains no data information. Examples of a
physical medium are: RS-232, RS-485 and Ethernet 10/100 Base T.
Protocol – A Protocol is the specification for the formatting of the data (bits, bytes and words) being
transmitted through the physical medium. Examples of some common industry protocols are: Modbus RTU
and K-Sequence.
One way to think of the Physical Medium and the Protocol is to liken them to placing a phone call. The phone
call is being placed over wires, cellular service or even perhaps a satellite link. This is the physical medium.
Now if the call was to China, you would say “Hello” in English. If the person on the other end understands
English, they will respond with “Hello”. If the person on the other end only understands Mandarin Chinese
they might respond “Ni Hao”. If you do not understand Chinese, you will be confused as to what they are
saying. This is the same for a Protocol. If your PLC uses Modbus RTU and you try to talk to a PLC that only
understands K-Sequence, then you will not be able to communicate with it. The Protocols must match in
order to communicate.
Client (Master) – A Client is a Master device that requests data from a Server (Slave) device. The Client
(Master) device initiates communications with a Server (Slave) device.
Server (Slave) – A Server is a Slave device that responds to a request from a Client (Master) device. The
Server (Slave) device listens/replies to requests made by a Client (Master).
Field Device – A device external to the BRX MPU.
NOTE: Software dialog windows and other documentation may interchangeably use the terms Client/Server or
Master/Slave when referring to requesting/responding devices in Ethernet or Serial communications. In this chapter,
with regards to Serial communications, we will use the term Client to refer to a requesting device and Server to
refer to a responding device.
BRX User Manual, 4th Edition, Rev. F
12-3
Chapter 12: BRX Do-more! Serial Communications
Troubleshooting Serial Communications
Troubleshooting communications can seem frustrating to the novice because you cannot see what is
happening in real time. However, most communications troubleshooting is fairly straight forward if you take
the right steps. Below are some recommendations for how to go about troubleshooting when a device does
not communicate.
1. Make sure the baud rate, parity, stop bits, end bits, RTS/CTS control and other parameters match
both the sending and receiving devices. With RS-485 make sure each device has a unique ID number.
2. Make sure the wiring is the right choice for the communications standard that you are using. Having
the right wire with the right impedance and capacitance characteristics is very important. Using
the wrong type wire will nearly certainly cause the link to fail or at the very least be very noisy and
troublesome.
3. Make sure that the wiring pinouts are correct between the devices. For RS-232, RX and TX must
be swapped for DTE devices. Ground must be used for RS-232. For RS-485, Plus should go to Plus
and Minus to Minus.
4. RS-232 is a ground referenced signal. This means that having a good common ground connection
between the devices is extremely important. If the devices are not at the same ground potential, they
will not communicate properly and can even cause damage to the connected devices. Both devices
should be grounded at the same potential source.
5. RS-232 is a one to one wiring standard. It cannot be multi-dropped without special adapters. For
multi-drop (slave) arrangements, RS-485 is the preferred method.
6. For RS-485 links one of the most common issues is that the plus and minus wires simply need to be
swapped. These may be labeled differently depending on the manufacturer, but the principle is the
same. RS-485 usually has a ground wire, but it is not quite as important as with RS-232 since RS-485
is a differential signal that is not ground referenced.
7. Termination resistors may be required to prevent data reflections from the ends of the cable. These
resistors should match the cable impedance as closely as possible. For shorter runs of a few feet of
cable, the resistors may cause issues and it should be tested to see if they are needed or not.
8. Make sure that the protocols match between the sending and receiving devices.
9. If available RX and TX lights should be flashing or steady if data is being transferred. If only one light
is on or if no lights are on, then it is likely not working.
10. The last tip is to start simple. Start with a simple program that uses a single read instruction to a
single address that holds a known, non-zero value. Once you get this working, start to expand the
capabilities. Don’t start off your troubleshooting journey with a full program of reads and writes using
radios and long wire distances. Keep it simple. Start small and grow.
12-4
BRX User Manual, 4th Edition, Rev. F
Communications Design
The BRX platform features the Do-more! DM1 technology which has a very robust communications system
allowing the programmer to accomplish many tasks that can prove difficult with other PLC’s. The DM1
technology manages the asynchronous actions of communications in the background without taking a huge
hit on the PLC scan time.
Sequencing Communications
The easy way
In many PLC’s the programmer must manage the communications sequencing. This can be frustrating and
time consuming to get the communications working correctly especially when you have multiple requests
to handle. The DM1 technology eliminates this frustration and will simply manage each Comm request in
the order that the program initiates a request. You no longer must write code to sequence and manage each
request. For some applications this is enough to do what the programmer needs to accomplish.
More advanced sequencing – State Machines
State machines have been used to sequence communication sequences for a very long time. The reason for
this is that communications by definition consists of always being in a particular state and transitioning to a
different state based on some action. This is all that there is to state machine programming; do an action and
wait for something to happen, then move to a different action.
Chapter 12: BRX Do-more! Serial Communications
Do-more! supports state machine programming. This is accomplished by the use of Stages. Stage programming
has been around a long time and Do-more! PLC’s take full advantage of Stage programming. For more
information on Stage Programming see Do-more! Designer Help topic DMD0502.
For our example on State Machine programming using Stages consider talking to a variable speed motor
controller. What is there that you will be doing? By drawing out the conditions, you can see that there are
definite states that the communications to the motor controller will be going through.
Main Loop
Read #1
Controller Status
Read #2
Speed
Read #3
Amps
Write #1
Start
Communications Exception Functions
BRX User Manual, 4th Edition, Rev. F
Error
Normal Communications Flow
Write Exception
Error Condition
12-5
Chapter 12: BRX Do-more! Serial Communications
Sequencing Communications, continued
In this example we can see that we have three reads from the device and one write condition. We can also see
that we need an error handling routine. That’s all there is to it. It looks fairly simple when we draw it out in
this manner. The beauty of drawing a State Machine out with a flow chart is that it transitions in nearly the
exact same manner to ladder logic.
Main loop:
Read #1 – Read the Controller status word. This might consist of whether the drive is running, jogging,
in error, etc.
Read #2 – Read the Controller speed. How fast is it running?
Read #3 – Read the amp draw. Is it within limits?
Main loop end
Things that happen occasionally:
Write #1 – Start the Controller running.
Error – Something bad happened to the communications. What do we need to do to flag this as a
problem?
An implementation of this State Machine in ladder logic is shown below. Since the Do-more! Communication
instructions have built in transitioning between Stages based on Success or Error, this eliminates a lot of
programming. To accomplish the diagram the only manual transitioning that needs to occur is for the Write
to start the motor controller.
While this example is somewhat incomplete in that it does not have provisions for stopping the drive or
other potential needs, it does serve to show how State Programming can help to make transitioning between
communications states relatively easy in the Do-more! Controller.
Main loop:
Read #1
12-6
(continued on next page)
BRX User Manual, 4th Edition, Rev. F
Sequencing Communications, continued
(continued from previous page)
Read #2
Chapter 12: BRX Do-more! Serial Communications
Main loop end
Read #3
(continued on next page)
BRX User Manual, 4th Edition, Rev. F
12-7
Chapter 12: BRX Do-more! Serial Communications
Sequencing Communications, continued
(continued from previous page)
Things that happen occasionally:
Write #1
Error Handling
12-8
BRX User Manual, 4th Edition, Rev. F
USB Communications
The POM slot USB port is useful for programming and monitoring the BRX Do-more! MPU. It is compatible
with Desktop PCs and Laptops utilizing USB 2.0 or higher, communicating through USB Type A to USB
Type B cable. It does not support connections to other USB devices such as printers.
The POM slot USB port relies on drivers included with Windows, so there are no drivers to download. It
truly is plug and play.
Serial Communications
There are multiple options when doing serial communications with a BRX PLC. The MPU has a built in
serial port that can do RS-232 and RS-485 communications. The BRX POM modules have several options
from which you can pick the style of serial port that you might want. The BRX serial expansion modules
have 4 serial ports that can do RS-232, RS-422 or RS-485 communications. If you need more ports, just add
more modules.
See the table below for a matrix of what protocols are supported by the different communications options.
RS-232 is a single point wiring standard that can be used to connect external devices to the PLC.
RS-232/485
TX
RX
GND
RX/D-
TX/D+
PinoutRS-232
1GND
2RX
3TX
General RS-232 Specifications
Data Rates1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200
Default SettingsRS-232, 115200 bps, No Parity, 8 Data Bits, 1 Stop Bit, Station #1
Port Status LEDGreen LED is illuminated when active for TXD and RXD
Port Type 3-pin terminal strip 3.5mm pitch
RS-232 TXDRS-232 Transmit output
RS-232 RXDRS-232 Receive input
RS-232 GNDLogic ground
RS-232 Maximum Output Load (TXD/RTS)3kΩ, 1000 pf
RS-232 Minimum Output Voltage Swing±5VDC
RS-232 Output Short Circuit Protection±15mA
Maximum Distance6 meters (20 foot) recommended maximum
The manner in which external devices are wired to the BRX serial port depend on whether the device is
considered to be Data Terminal Equipment (DTE) or Data Communications Equipment (DCE). The BRX
serial port is considered a DTE device. Most Modbus or ASCII devices being connected to the BRX serial
port will also be considered a DTE device and will need to swap TX and RX (as shown below), but you
should always consult the documentation of that device to verify.
12-10
If a device such as a Modem, which is a DCE device, is placed between the BRX serial port and another
Modbus or ASCII device it will most likely require connecting the signals straight across (TX to TX and
RX to RX). Again, this can differ from manufacturer to manufacturer so always consult the documentation
before wiring the devices together.
RS-232 is a ground referenced signal and as such it is susceptible to noise and ground differentials which may
make it unsuitable for use in some circumstances.
The wiring for RS-232 is shown below. Please note that there are no connections for RTS (Ready To Send),
CTS (Clear To Send) or for port powered devices (+5VDC).
RS-232/485
TX
RX
NOTE: Recommended distance between RS-232 devices is less than 6 meters (20 feet) in industrial environments.
GND
RX/D-
TX/D+
For longer distances, please consider using RS-485 or Ethernet.
BRX User Manual, 4th Edition, Rev. F
DTEDTE
1 GND
2 RX
3 TX
BRX
GND (0V)
RX
TX
Field
Chapter 12: BRX Do-more! Serial Communications
RS-422
General Serial Specifications, continued
RS-422
RS-422 is a multi-point wiring standard that can be used to connect external devices to the PLC.
TX
RX
GND
RS-422
RX-
RX+
TX-
TX+
PinoutRS-422
1GND
2RX-
3RX+
4TX-
5TX+
General RS-422 Specifications
Data Rates1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200
Default SettingsRS-422, 115200 bps, No Parity, 8 Data Bits, 1 Stop Bit, Station #1
Port Status LEDGreen LED is illuminated when active for TXD and RXD
Port Type 5-pin terminal strip 3.5mm pitch
RS-422 Station Addresses1-247
RS-422 TXD-/RXD-RS-422 transceiver low
RS-422 TXD+/RXD+RS-422 transceiver high
RS-422 GNDLogic ground
RS-422 Input Impedance96kΩ
RS-422 Maximum Load50 transceivers, 19kΩ each, 120Ω termination
RS-422 Output Short Circuit Protection±250mA, thermal shut-down protection
RS-422 Minimum Differential Output Voltage2.0 VDC with 54Ω load
RS-422 Maximum Common Mode Voltage-7.5-12.5 VDC
RS-422 Fail Safe InputsLogic high input state if inputs are unconnected
RS-422 Electrostatic Discharge Protection±15KV human body, ±6KV contact discharge per IEC1000-4-2
Maximum Distance 1000 meters (3280 feet)
The RS-422 port is useful for connecting multiple receivers to one transmitter on one network and/or
connecting devices to the BRX serial port at much longer distances than RS-232. The RS-422 standard
supports distances of up to 1000 meters. The RS-422 serial port can support up to 50 devices, depending on
the load of each device (assuming a 19kΩ load for each device).
RS-422 utilizes a differential signal which makes it much more immune to noise and grounding issues than
RS-232 and is therefore a much better choice when available for communications.
The wiring for RS-422 is shown below.
OIOIRESRES
RRS-422S-422
AA
TXXXT
RXRXX
BX-SERIO-4
GGNDND
RX
RX-
RXRX++
TX-TX-
1Signal GND
2 RX-
-
3 RX+
4 TX5 TX+
+X+XTT
Field Device
120Ω Resistor
Termination
User-supplied
Slave 1
GND
TX-
TX+
RX-
RX+
Field Device
120Ω Resistor
Termination
User-supplied
Last Slave
GND
TX-
TX+
RX-
RX+
BRX User Manual, 4th Edition, Rev. F
12-11
Loading...
+ 23 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.