Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Need help about ProviewR and Arduino communication

Need help about ProviewR and Arduino communication 4 months 2 weeks ago #11105

  • Maverick
  • Maverick's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 53
  • Karma: 0
Hi everyone,
Is there anyone who had any experience about Arduino and Modbus RTU over RS485? I'm doing some basic experiments about ProviewR and Arduino communication through Modbus RTU over RS485 by toggling two LEDs from an XttGraph object (the Arduino is set up as a Modbus RTU slave through /dev/ttyUSB0), but it's not working. So, I want to know what could be wrong, whether in the ProviewR project settings or in the Arduino sketch (I'm using the "ModbusRtu.h" library from github.com/smarmengol/Modbus-Master-Slave-for-Arduino ).
I've added the snapshots and my Arduino sketch as attachments below.

Any help greatly appreciated.

/Maverick

(My setup: ProviewR V5.7 amd64 on Ubuntu Mate 18.04)
The administrator has disabled public write access.

Need help about ProviewR and Arduino communication 4 months 2 weeks ago #11106

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 2898
  • Thank you received: 418
  • Karma: 124
Hi Maveric,

Slave id in the sketch is set to 1 so you should set UnitId in the module object to 1.

/Claes
The administrator has disabled public write access.

Need help about ProviewR and Arduino communication 4 months 1 week ago #11107

  • Maverick
  • Maverick's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 53
  • Karma: 0
Hi Claes,
Thank you for your answer. I've tried to set up the slave UnitId to 1, but it's not working. I've also tried to set the slave Address to 0, but still not working.
Maybe it's in the Arduino. Well, i'm going to try other Modbus RTU Arduino libraries.

/Maverick
The administrator has disabled public write access.

Need help about ProviewR and Arduino communication 4 months 1 week ago #11110

  • Maverick
  • Maverick's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 53
  • Karma: 0
Hi Claes,
After some research, I'm back again. This time, I am using an Arduino Modbus RTU Slave library from codeload.github.com/smarmengol/Modbus-Ma...ip/refs/heads/master
Still not able to toggle these two LED from a XttGraph in Proview, but at least, the good news is that after tweaking the /dev/ttyUSB0 serial port read/write permission settings, I finally managed to establish a working serial connection between Arduino and Proview Runtime monitor. I'm almost there, but it's not over yet... I'm wondering about what could be still wrong in my setup.
I've sent my Arduino sketch (with the Modbus RTU library) and some snapshots below as attachments.

(By the way, I'd like to have some useful advice from Brunad if he's still available and active on the forum)

/Maverick
Attachments:
The administrator has disabled public write access.

Need help about ProviewR and Arduino communication 4 months 6 days ago #11111

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 2898
  • Thank you received: 418
  • Karma: 124
Hi Maverick,

Another error I can see is that Representation in the ChanDi and ChanDo should be Bit8 for Coils

/Claes
The administrator has disabled public write access.

Need help about ProviewR and Arduino communication 4 months 3 days ago #11122

  • Maverick
  • Maverick's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 53
  • Karma: 0
Hi Claes,
Thanks for your answer but changing the ChanDo representation to Bit8 didn't work. Bit16 also didn't work either.

/Maverick
Last Edit: 4 months 3 days ago by Maverick.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.364 seconds