RUT955 - Send Modbus Data (RTU) to Azure IoT Hub

Product

RUT955

Brand

Teltonika

Highlight Information

Pin connection RS485 4/2 Wire การเชื่อมต่อกับ 485 device และ

Azure MQTT

Author

@Lakkhanaphon Saengchinda

Importance

medium

Publish Doc

YES

Years

2020

RUT955 มี 1 Port RS485 รองรับการเชื่อมต่อแบบ Full-Duplex (4-Wire) และ Half-Duplex (2-Wire)

ซึ่งมี Connector pin-out ดังภาพ

การเชื่อมต่อแบบ 4 Wire

การเชื่อมต่อแบบ 2 Wire

 

RUT955 Configuration

  • Install Packet IOT Azure บน RUT955 โดยไปที่ System > Package Manager แล้วคลิก Install Azure IoT Hub package

  • Add Modbus Device โดยไปที่ Service → Modbus เลือกแถบเมนู Modbus Serial Master เลือก Interface RS485

  • ปรับ Baud rate, Parity, Stop bits, Flow control ให้ตรงกับ Slave Device ที่ต้องการสื่อสาร แล้วคลิก Add slave Device โดยตั้งชื่อ ใส่ Slave ID แล้วกด Add

ทำการ Add Device ให้ครบทุกตัว

  • จากนั้นกดปุ่ม Edit ที่ Device ที่ Add มา ทีละตัวเพื่อ Add Register Address → กด Save

  • สามารถตรวจสอบค่าจาก Address ที่อ่านได้โดยการกดปุ่ม Test ที่ Address นั้นๆ

ในการ Add Register Address เข้าไปให้ต้องทำการ Save ก่อนทุกครั้ง ไม่เช่นนั้นจะไม่สามารถตรวจสอบค่าได้

 

  • ตั้งค่าให้ใส่ Data สู่ Azure IoT Hub โดยไปที่แถบ Modbus Data to Server ไปที่ส่วน New Modbus data sender เลือก Protocol Azure MQTT ใส่ Connection string

Note: Connection string ใช้ IOT Device Primary Connection String

สามารถ Add ได้หลาย Device IoT hub