Archive for the 'RS232' Category

Fix for mouse jumping around the screen randomly when connecting a USB to Serial converter

The problem:

When I connected my serial to USB converter (USB-Comi) to my computer my mouse pointer would randomly jump around the screen making it impossible to do any work. I tried reinstalling both the serial to USB converters drivers and my mouse drivers without an success.

The solution 

After some searching I found this article How to fix “crazy mouse” syndrome with USB serial adapters that was able to resolve the issue I was having.

You need to disable serial enumeration on the advanced settings of your virtual serial port. The serial port will still work and it should resolve your “crazy mouse” problem.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

CAS Gateway UL RS232 to RS485

To switch the CAS Gateway UL box from its default RS232 to RS485 you will need to open the box and change some of the jumpers.

For example this is a photo of the board set up in RS-232

 

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

CAS Modbus Scanner v1.02aB

CAS Modbus Scanner is a utility to retrieve coils, inputs, holding registers, and input registers from a Modbus enabled device. Values retrieved from the device can be viewed in many different formats including Binary, HEX, Uint16, Int16, Uint32, Int32, and Float32.

Features:

  • Can read; coil status (0xxxx), input status(2xxxx), input registers (3xxxx), and holding registers (4xxxx)
  • Data is viewable in Binary, HEX, Uint16, Int16,Uint32, Int32, and Float32
  • Multiple connections
  • Works with RS232 and RS485, TCP
  • Easy to use interface
  • 100% Free to use, no registration required.

New

  • Works with Modbus TCP
  • Works on Windows Vista and Windows 7 (32bit and 64bit)

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

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.

modbusexplorer

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.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Reducing latency on com ports

When a BYTE is sent from a serial device (BACnet MSTP thermostat) to a USB to 232/485 converters (USB-COMI-SI-M) it is cached on the USB converter until one of two things happened.

  • Transfer size – More then x BYTES are collected or
  • Latency timer – More then n Milliseconds (ms) expirer.

By default most ‘off the self’ USB to serial converters have a latency timer of 50ms and a transfer size of 4096 BYTES

The can be a major problem for PC utilities monitoring a serial network. The PC doesn’t get the BYTES fast enough to respond to the serial device before it times out.

For example:

On a network with a BACnet MSTP thermostat and a RS485 to USB converter connected to a PC. The BACnet MSTP thermostat will send a poll to the PC and will expect the PC to respond within 100ms. If the thermostat does not receive a response within this time the thermostat will assume that the device has gone offline. When the USB to 458 converter receives the message it will stay in its buffers for 50ms before being sent to the PC. Depending on the message it may take longer then 50 ms for the PC to respond to the poll and the thermostat will consider the PC offline.

Luckily we can set the Transfer size, and latency timer.

Most USB to 485 devices that I have used have the ability to set the transfer size and the latency timer.

  1. Start menu–> Settings –> Control panel –> device manager –> Ports (COM & LPT) –>{Select your USB to RS485 converter}
  2. Right click and select “Properties
  3. Select the “Port Settings” tab
  4. Click the “Advanced” button advancedsettingsforcomm10
  5. Change the Latency Timer (mSec) to 1 or the lowest possible setting.
  6. Change the USB Transfer sizes to 64 or the lowest possible settings
  7. Save and close.
Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Why can’t I change to 76800 baud rate on PC?

Q: Why can’t we change to a 76800 baud rate on a PC but are able to on some devices?

A: The reason for this is that the the standard 16C550 PC UART is too slow to keep up with the signals coming in and out. 76800 is not a standard multiple of the UART clock frequency.

Devices can be customized and therefore allow baud rates of 76800. If your PC has a customizable COM port card where you can program the bit clock then you would be able to set this value.

There is no fix for this, but if you find a converter that can change 76800 to a higher UART this could be a work around.

The standard frequencies are:

  • 150
  • 300
  • 1200
  • 2400
  • 4800
  • 9600
  • 19200
  • 38400
  • 115000
Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

RS232 Serial Port Sniffing / Snooping

Have you ever needed to snoop a RS232 serial port to observe the messages passing back and forth? It’s easier than you thought. All you need is application called HyperTerminal and the simple cable below. The cable can be assembled in minutes and requires a couple of diodes which you can probably buy for pennies. HyperTerminal is provided free with the Windows Operating System.
Here is what you need to do

1. Assemble the cable.
You need a 3 conductor cable and a 3 9-pin d-type connectors. We suggest you put a male on one end and a female on the other end and do not cross pins 2 and 3 over. That way you have a cable segment that will extend any cable without reuiring sex changes or worrying about 2-3 cross over. Put a female connector on the snoop end so it connects to your PC port without a sex change.
The Diode part number is 1N4148. The black band on a diode is the cathode end and corresponds to the vertical bar in the schematic of a diode.
A diagram is provided below the text of this article.

2. Connect
Connect the devices with your cable and connect the snoop to your computers serial port.

3. Run HyperTeminal
START, Programs, Accessories, (Communications), HyperTerminal
Set the port and configure it. In this example we use COM2 to snoop on a 9600,Even,8,1 conversation.

4. Capture Messages
In HyperTerminal, select the ‘Transfer’ menu.
Select Capture Text (even if the protocol you are snooping on is binary)
Specify a file name.
When you have captured enough, stop the capture and you can then use the file to view the conversations.

5. Limitations
No timing will be captured. All the messages sent and received by the devices you are snooping on will be ‘received’ only in HyperTerminal. This you will have to deduce the message ends/starts.
No timing information is available
If the messages are binary you will need to view the binary file in binary mode. You cant do this with notepad or WordPad. We use the Visual Slick Edit editor – Use Ctrl-Shift-H to change the view to binary.

ScreenShots

01.jpg

02.jpg

03.gif

04.jpg

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have



Pages