cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Who Me Too'd this topic

IR 809 - how to use RS-485 serial port?

gkujawsk
Level 4
Level 4

Hi guys,

I'm looking for some tips regarding how to properly use RS-485 serial port on IR 809

to connect to the MODBUS RTU sensor.

I followed the guides I've found, but the configs focused on RS-232. I've changed the media-type

to rs485 for the async 0 interface and set it to half-duplex.

I was not sure about the pinout for RS485. I followed this guide. According to the Table 8

PIN 1 should be RX/TX+  and PIN 2 should be RX/TX-.

http://www.cisco.com/c/en/us/td/docs/routers/access/800/809/hardware/install/guide/809hwinst/pview.html#70574

With this configuration my python app based on minimalmodbus module shows random garbage whenever

I try to read anything from /dev/ttyS1. Funny thing is that it reads random garbage from /dev/ttyS1 even when

there's no connection at all.

I verified the modbus sensor in my previous project based on 819, thus I'm sure that sensor works good.

<code>

import minimalmodbus

import serial

import time

instrument = minimalmodbus.Instrument('/dev/ttyS1', 1)

instrument.serial.baudrate = 9600

instrument.serial.bytesize = 8

instrument.serial.parity   = serial.PARITY_NONE

instrument.serial.stopbits = 2

instrument.serial.timeout  = 1

instrument.mode = minimalmodbus.MODE_RTU

temperature = instrument.read_register(5,2,4)

</code>

<error>

ValueError: Checksum error in rtu mode: '\x04\x00' instead of 'e\xc1' . The response is: '\x00\x00\x04\x00\x00\x04\x00' (plain response: '\x00\x00\x04\x00\x00\x04\x00')

</error>

Who Me Too'd this topic