RS485 Polarity Issues

RS485 is an electrical communication standard used by Modbus­RTU, BACnet­MSTP, and many other building automation protocols. This article covers issues related to the polarity of the RS485 differential balanced line. A differential balanced line consists of two wires (negative and positive). Binary ’1′ is indicated by the voltage in the positive wire being greater than the negative wire. Binary ’0′ is indicated by the positive wire having a voltage less than negative wire. The difference in voltages is expected to be at least 0.2v according to the RS485 standard, although not all devices comply with this. If the difference between positive and negative wires is less than 0.2v the bus is idle.

 

V+ ­ V­ > 0.2v : 1

V­ ­ V+ > 0.2v : 0

­0.2v < V+ ­ V­ < 0.2v : Idle

 

Four wire RS485 has two differential balanced lines. Two wire RS485 uses a single differential balanced line. RS485 polarity labels differ between manufacturers. According to the RS485 standard the two terminals are A for negative and B for positive. Most manufacturers will instead use + and –, or some variation such as D+, D­. Some manufacturers will label inputs as A,B but get the polarity backwards so A is positive. It is important to read the manual rather than assuming a manufacturer follows the standard.

 

RS485 has a reputation for being polarity insensitive because under normal conditions most devices will automatically determine which wire in the differential balanced line is positive and which is negative. This is because during the idle state the positive wire should have a slightly higher voltage than the negative wire. Fig1 shows a typical RS485 message, with the polarity of the positive and negative wires during the idle state. A multimeter can be used to verify the positive wire is higher than the negative wire during idle.

 

polarity article fig. 1

 

The positive wire has a higher voltage than the negative wire during idle states because RS485 differential lines use termination resistors. The line is idle when no devices are sending data, which means all devices have switched their output to high impedance. In this state the voltage levels of wires are primarily set by the termination resistors. Figure 2 shows an example set of RS485 termination resistors and the voltage they produce on the wires during an idle state.

 

polarity article fig. 2

 

 

Possible Problems With Automatically Detecting Polarity:

• Termination resistors are not set up properly.

• Electrical noise interferes with voltage levels during idle state.

• There ground connected to the termination resistors does not match the ground of the devices.

• The Vcc voltage connected to the termination resistors does not match the Vcc of the devices.

• The RS485 device does not support polarity detection. (this is very rare).

 

Ways to Avoid Polarity Issues:

• Connect positive and negative wires to the device as specified in the manual.

• Ensure proper termination resistors.

• Run a common (ground wire) to all devices and the termination resistors.

• Verify which wire is positive using a multimeter during idle state. Do not assume wire coloring is correct.

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

GE-TLC RLINK Connections and Diagnostics

The Field Fail LED Indicates:

  • Relay failure in one of the panels
  • Panel without configuration – no program
  • Driver card failure

Link Fail Indicates:

  • Dataline short or disconnected (missing the 24VDC)
  • Burned interior ¼ Amp fuse – F1
  • Defective unit

At power up the LINK Fail blinks and if the Dataline is clear (24VDC) for 10 seconds, the LINK fail will stop. If there is a BMS controller on-line that polls the network, the Dataline voltage will be below 20 V – which will not allow the LINK to clear. In this case, after a power outage, the BMS interface shall be disconnected till the LINK fail goes off.

RLINK CONNECTOR (RJ45 to DB9)

  • Pin 2 – White
  • Pin 3 – Blue
  • Pin 4 – Black  (DTR)
  • Pin 5 – Green

Check out the Video:

 

 

 

Multiple GE TLC RLINKS on a Data Line

The TLC dataline communications system supports multiple access points – RLINKS. Each RLINK supports global programming, monitoring and control of the distributed Lighting Automation Panels. However, to avoid conflicts, only one unit (the “Master”) can broadcast the time of day. CAUTION: In a multiple RLINK system, the 2nd, 3rd, …th RLINKs must be configured as “slaves” by moving the internal switch setting as described below. The Master RLINK is connected directly to the primary operator’s PC – The PC which will be used to set the system clock.

 

Dataline Article img 1

CAS have used 2 Rlinks in master mode successfully

 Changing an RLINK from Master to Slave

1. Remove the two Phillips screws in the rear panel

Dataline Article img 2

 

2. Slide the board assembly out of the housing as a unit

Dataline Article img 3

 

3. Move the slide switch in the front right corner  to the “Slave” position

Dataline Article img 4

 

4. Position the board in the extruded rails and slide back into place, while making sure the “ALARM RESET” button clears the front face plate.

Dataline Article img 5

 

 

 

 

 

Building libCUrl on Windows with /MT and /MTd

CUrl and libCUrl is a very powerful library for sending HTTP and HTTPS requests to servers. Building the libraries  on windows with Visual studios using the /MT and /MTd flags is non-trivial. 

Using: curl-7.37.0

Instructions 

  1. Download and extract the CUrl source code to a temp directory. http://curl.haxx.se/download.html, in this tutorial we will be using curl-7.37.0
  2. Open the “Visual Studio Command Prompt (2010)”
  3. Browse to the Winbuilds folder. \curl-7.37.0\winbuild
  4. Type “Set RTLIBCFG=static ” in to the command prompt and hit enter. This will set up the compiler to build for  /MT and /MTd
  5. Type “nmake /f MakeFile.vc mode=static DEBUG=yes” to build the debug version or
    Type “nmake /f MakeFile.vc mode=static DEBUG=no” to build the release versions

 

CAS Gateway – Taking wireshark logs with the CAS Gateway

Instructions 
1) Login to the CAS Gateways web interface and browse to the “System Actions” page /bin/system/
2) Under the debug logging, Change the level level from IMPORTANT (10) to ALL (100),
3) Ensure that the Log to SysLog (UDP: 514) is set to enabled. This is the default setting.
debugLogging

4) Click the “Save” button

5) Click the “Generate configuration File” to download the current configuration from the CAS Gateway.

6) Download and install Wireshark (http://www.wireshark.org/) on a local computer. Its a free packet capture tool

7) Run Wireshark and click the “Capture Options” button

CaptureOptions2
8) Set the “Capture Filter” to “port 47808 || port 514
9) Set the path to a folder where to store the Wireshark logs. “C:\temp\wireshark logs\2014April28_
10) Check the “Use multiple files” and “Next file every” check boxes. Set the next file every text area to “20“, “megabyte(s)
CaptureOptions
11) Click the “Start” button on the “Wirehsark Capture Options” dialog. The main dialog should fill up with BACnet messages as well as SysLog messages.
Wireshark
 
 
12) Reproduce the problem with the CAS Gateway, This may take a day or two if the problem is infrequent. 
13) Send Chipkin an archive of the Wireshark logs and the CAS Gateway configuration.
Note: Depending on your configuration a HUB (Not a switch or router) maybe required to capture all the information from the CAS Gateway.
http://www.chipkin.com/hubs-vs-switches-using-wireshark-to-sniff-network-packets/
NetworkSetup

How to download the database from the CAS Gateway

  1. Goto the System Action page. http://<ip address>/bin/system/
  2. Click “Save Database” button.
    • This will present you with a XML page that says the action was done correctly.
  3. Go back to the System Action page. http://<ip address>/bin/system/
  4. Click “Export the database from the device” link
    • This should download a database.db file

How to download the configuration from the CAS Gateway

  1. Goto the System Action page. http://<ip address>/bin/system/
  2. Click the “Generate Configuration File” link
    • This will generate the configuration file and redirect you to a page where you can download the newly generated configuration file.
  3. Click “Export Configuration” after the system has finished generating the configuration file.

Write to Out Of Service Property Using CAS BACnet Explorer

This article will describe the steps to use the CAS BACnet Explorer to write to the Out Of Service Property.

 

1) Open the CAS BACnet Explorer and discover for the device that you would like to write to the Out Of Service Property.

 

2) Click on the Out of Service Property to select it.
OutOfServiceSelectProperty

 

3) Write-Click on the Out of Service Property to bring up the Pop-Menu. Select the “WriteProperty” option.
OutOfServiceSelectWritePropertyOption

 

4) In the Write Property dialog, change the Data Value to either “True” or “False” depending on what value you want to write.
OutOfServiceWriteProperty

 

5) Check that the value did change.

 

Note: If the Out of Service property is not writable, then you may get the Write Access Denied error.
OutofServiceWriteError

CAS BACnet Explorer Version 2.02aQ

We have updated the CAS BACnet Explorer with the following changes.

  • Proper parsing of Forwarded-NPDU messages allowing the CAS BACnet Explorer to correctly discover devices behind BBMDs and BACnet Routers.
  • Added Cancel Button to all users to cancel long discovers without having to exit and close the CAS BACnet Explorer
  • Added Who-Has discovery method.
  • Added Time Synchronization functionality. Users can now set the local time of a BACnet device through the use of a Time Synchronization message.
  • Can detect if there are duplicate device IDs on the network and provides users information about which devices have the duplicate IDs.
  • Numerous bug fixes.

This new version was be released on Tuesday Dec 10, 2013

FieldServer DH+ FSB4013 Blue-Hose Connection

A 10-serial, 2-Ethernet port, 1 DH+ port protocol translator gateway enables data transfer between serial, Ethernet and Allen Bradley DH+ protocols. An extensive library of drivers provides easy interoperability between a variety of devices used in process control and building automation industries.
 
The FieldServer is an Allen Bradley DH+ protocol translator/gateway which enables devices using one protocol to communicate with devices using another protocol. An example is a PLC using one protocol needing to supply alarm information to a DCS using Data Highway Plus. In a single, comprehensive package the FieldServer provides the hardware and software necessary for this translation.
 
The FS-B4013 DH+ gateway includes eight RS-232 ports, two RS-485 ports, two Ethernet (10BaseT) ports, and one Allen Bradley DH+ port to interface to the devices. All the necessary software and instructions for configuration are supplied with the FieldServer. FieldServer Technologies also offers fee based configuration services. Besides Allen Bradley DH+, FieldServer are available for various fieldbuses.
DH+ cables are often called the Blue Hose because of the blue color of the cable made for this purpose. It’s a twisted pair with a shield. The Drained Shield is used for the ground terminal. DH+ is based on RS485 but it isn’t.
 
Supported Baud Rate: 115.2K Baud rate
 
DH+ terminal Specification:

Signal- = Blue = Terminal 1 = Terminal closest to white LED
Shield = Clear = Terminal 2
Signal+ = Clear = Terminal 3

Stretch Sensors (Resistors)

A stretch sensor is a cylindrical cord which can be stretched to achieve varying resistances. It’s a sort of variable resistor where the resistance can be adjusted by the intensity of the stretch. Usually when the sensor is stretched by 50% it reaches double it’s initial resistance.

Some stretch sensor applications:

  1. Various stress measuring.
  2. Physics experiments.
  3. Could be used in robotics.
  4. VR suits/gloves.
  5. Biometric displacement reading.
  6. Feedback sensor for air muscles.