October 2008 Newsletter

CAS Modbus Explorer

Modbus communications not working ? How do you know what’s wrong – is it the baud rate, the parity or even the address? There are so many things that can affect communications.

The Modbus protocol does not support discovery. There is no broadcast message that you can send that will make a slave respond with its port and address settings. The protocol allows for broadcast messages to be sent but doesn’t demand that every vendor supports this feature.


Use the CAS Modbus Explorer to find the correct port settings and the correct slave address.
The tool automates the process of trying all the combinations and reports the results. We provide burst and standard mode. In burst mode we send messages to all the possible slave address before waiting for a reply from any of them. This dramatically improves the time required to do the discovery.

The tool works for RS232 and RS485 by allowing you to search for a single device or multiple slaves. To connect to a RS485 network from your laptop you simply need a USB-to-485 converter.

Here is the problem – there are thousands of combinations:

 

Baud 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 
Parity, None, Odd, Even 
Stop Bits 1, 2 
Data Bits 7, 8  
Address 1-254

 

If you had to manually search/test all these combinations it will take you ages. Relax, go for lunch and let the CAS Modbus Explorer do all the work for you.

IN THIS ISSUE

CAS Modbus Explorer
RS485 on a Scope
Beer and Vodka
Series and Parallel Resistors
Federal Signal Ultravoice

SURVEY

Please rate our newsletter:Good
Decent
Bad
Needs Improvement
Submit

SAFETY PIC

Probably not the best of ideas:


Click for larger version


RS485 on a Scope

Using an oscilloscope on a RS485 network. For reference purposes we present some scope captures of a typical RS485 line.


In this capture we had our scope leads connected to the positive signal conductor and ground.

Zone A: Idle State

Zone E: Idle State with Noise
This is the state of the network when all the transmitters have released the line. In this state the conductors float. In many ways this is the most dangerous state for a 485 network to be in since the voltage levels are not defined and vary depending on factors such as the ground potential between devices. If the voltage floats to a level where it looks like a signal then you will see noise bytes on the line. Once a device starts transmitting it pulls the line to a known voltage level so the floating problem is eliminated. Its usually quite easy to recognize these noise bytes because all messages look good but there is noise that precedes the message. Idle state biasing can be used to eliminate this problem because it has the effect of holding the line at a ‘known’ voltage for the duration of the idle state. Another source of idle state noise is not using the 3rd conductor – the so called signal reference common.

Zone B: The device has enabled it transmitter but has not started transmitting. The line is driven to a known state. The duration of this phase can be controlled by configuration in some devices. If it is too short then it is possible that some of the front of the message may be lost.

Zone C: Unless you have a very high speed scope and the scope can takes a huge number of samples you are unlikely to see each bit in the message. In this capture we can see the bytes (roughly speaking) but not the bits. We were forced to accept this compromise because the number of samples we could capture at a sampling rate high enough to see the bits would mean that we could only capture the 1st couple of bytes of the message and we would have to set the trigger to ignore zone B. Except with a very expensive scope you will be unlikely to be able to see the whole message and all the bits.

Zone D: We have finished transmitting but the transmitter is still enabled. Normally the device should disable its transmitter as soon as possible after transmitting the last stop bit of the message but since that can be difficult to achieve in the hardware, many devices run a timer to make sure they don’t disable the transmitter too soon. The problem with this approach is:
1) The longer the time the more potential bandwidth is lost.
2) The receiving device may have already processed the message and try to send a response by enabling its own transmitter causing collisions.


Probes on plus and minus conductors. Segment connected to slave device.


Probes on plus and minus conductors. This chart represent the capture from a master device with no slaves connected to the network leaving the cable ends to float.


Beer and Vodka Can Help You Select a Terminating Resistor

Try this mnemonic if you are trying to remember the resistor color codes:

Note: If you’re missing a tolerance band that implies that the tolerance is 20%.

Which end do you start reading the color bands?

There are usually two ways:

1) If one of the bands at the end of the sequence is further apart then that is the tolerance band – start from the opposite end.
2) If all the bands are closer to one side of the resistor then start from that end – the tolerance band is the last one your read.

What should you carry with you to site? (for communication networks purposes)

 

For Terminations
Value Tolerance
75 Ohms 5%
100 Ohms 5%
120 Ohms 5%

 

 

For Biasing
Value
10k Ohms
4k7 Ohms
2k4 Ohms
1k Ohms
560 Ohms
30 Ohms

How to buy resistors

Buy a series – E12 or E24 (they come in packs and provide a comprehensive range of resistors).

How to make a resistance value even if you don’t have the correct resistor in your toolbox.

By placing resistors in series or parallel you can create new values.

 

Series

 

  • R1 and R2 connected in series could be replaced with one resistor of resistance R3.
  • Using 2 or more resistors instead of one allows you to achieve custom resistances.
  • Less resistors are required when used in series to achieve greater resistance than when used in parallel

 

 

Parallel

  • R1 and R2 connected in parallel act as one resistor with a custom resistance of R3.
  • This method allows you to get custom resistances using the formula.
  • R3 will always be smaller than R1 and R2, so more resistors are required to achieve higher custom resistances.

 

Resistor color codes for 4 and 5 band resistors.


Federal Signal Ultravoice

We have a new FieldServer driver for Federal Signal Ultravoice (FSU) – Electronic Siren Controllers (ESC).
The serial driver allows the FieldServer to transfer data to and from Ultravoice devices over RS232. The data can be converted to any other protocol in the FIeldServer Librabry such as Bacnet, Lonworks, Modbus, Rockwell.

The driver can monitor the status of the Ultravoice devices and send commands to perform functions such as ARM, WAIL, CODE, MSG and many more.


Free CAS BACnet Explorer

Add $795* value to your FieldServer for free. Simply purchase a FieldServer with a BACnet protocol from CAS and we will provide you with a free (and transferable) license to our famous BACnet Explorer. Use the explorer to test and commision the installation and then use it on your next job or pass it on to your customer.
*795 – Our competitors price

This is a full license and includes the USB key which allows you to transfer your license from laptop to laptop with no hassles. You get all updates to the product for a period of 1 year.

2008 Chipkin Automation Systems – bacnet@chipkin.com
BACnet is a registered trademark of ASHRAE.

If you liked this post;
  • Please consider subscribing to our RSS feed