Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial shows how to do a Modbus - RTU communication with the RevPi Connect and an a USB-RS485 converter.

Here we are using QModMaster as Modbus Master and the RevPi Connects RS485 interface.

So the PC acts as the Modbus Master and the RevPi Connect acts as the Modbus Slave.

You need the following

Have

Take a look at the pinout

Signal

Sub-D Pin

RS485-

1

RS485+

2

GND

5

+5V

6

  • Some USB-Serial adaptors have just the two data signal lines, i.e. the USB-RS485 Converter from our shop

Image RemovedImage Added

Signal

Pin

RS485-

D+

RS485+

D-

Preparation

  • Have Take a look at the tutorial “How to Connect Serial Devices

    • Connect the RS485+ signal line

    • Connect the RS485- signal line

    • Optionally connect the GND pin

Instructions for the Modbus-RTU Slave

  • Make the PiCtory configuration

  • Configure the RevPi Connect and the

ModbusRTU
  • Modbus RTU Slave

Image Modified
  • Configure the Modbus RTU Slave serial interface as follows

Image Modified
Configure the Modbus RTU Slave serial interface as follows
  • Save the configuration

Image Modified
  • Reset the driver

Image Modified

Instructions for the Modbus-RTU Master

  • Open qModMaster

  • Configure the serial interface parameter

Image Removed
Image Added
3.
  • Transfer 1,2,3 to the Registers

Image Modified
4.
  • Read it out on the RevPi Connect

on
  • shell using the

terminal
  • “piTest” command

Code Block
languagebash
pi@RevPi14607:~ $ piTest -1 -r Input_1
2 Byte-Value of Input_1: 1 dez (=0001 hex)
pi@RevPi14607:~ $ piTest -1 -r Input_2
2 Byte-Value of Input_2: 2 dez (=0002 hex)
pi@RevPi14607:~ $ piTest -1 -r Input_3
2 Byte-Value of Input_3: 3 dez (=0003 hex)

Verwandte Artikel

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@968
showSpacefalse
sortmodified
typepage
reversetrue
labelskb-how-to-article
cqllabel = "kb-how-to-article" and type = "page" and space = "KS"
Page Properties
hiddentrue

Verwandte Vorgänge