LoginSignup
0
1

More than 5 years have passed since last update.

Raspberry Pi > MODBUS > MinimalModbus > Linkと動作確認(失敗)

Last updated at Posted at 2018-07-04
Raspberry Pi 2 Model B (以下RPi)
Raspbian Jessie
pySerial 2.6-1.1
Python 2.7.9

RPiでMODBUS通信を行う場合、どういうライブラリが必要か?

下記を見つけた。
HOW TO USE MODBUS WITH RASPBERRY PI

上記で紹介されているのがMinimalModbus
http://minimalmodbus.readthedocs.io/en/master/index.html

pipでのインストール
http://minimalmodbus.readthedocs.io/en/master/installation.html

API
http://minimalmodbus.readthedocs.io/en/master/apiminimalmodbus.html

Manual testing of Modbus equipment
http://minimalmodbus.readthedocs.io/en/master/modbusdetails.html#manual-testing-of-modbus-equipment

setup

上記ドキュメントに基づきインストールできた。

$ sudo pip install minimalmodbus

MODBUS製品との通信

MODBUS製品と通信をしてみたが応答がない。

一方で、Windows 10でRS232Cテストツール(NonSoft様)で通信をするとデータシート通りの応答がある。

RPi + MinimalModbus + USBシリアル + pySerial
の組合せの問題だろうか。

MinimalModbus を使わない通信でも失敗した。

別途、とある組込み基板での実装を試したところ、応答を確認できた。
使用ラインはTX, RX, GNDのみ。

(調査は保留)。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1