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

TOPIC: Modbus RTU

Modbus RTU 2 years 8 months ago #11113

  • Sébastien
  • Sébastien's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 175
  • Thank you received: 2
  • Karma: 0
Bonjour, j'ai installé proview sous Ubuntu et je désire commander mon module WELLPRO 8028ADAM protocol MODBUS RTU (01 05 00 00 FF 00 8C 3A) ET UNE CARTE RELAIS DEUX VOIES (modbus aussi ), station mac avec USB/RS485 modbus, j'ai essayé en regardant la vidéo N°7 partie 2 mais impossible de piloter la carte, avez vous un projet fonctionnel exemple modbus RTU ou un tutoriel modbus RTU? J'ai vu sous NODE IO modbus RTU ( Modbus master, slave et module et modbus server et modbus server module )?? J'ai même fait le synoptique de la WELLPRO le voyant change bien de couleur mais ne pilote pas la carte ? en vous remerciant.
Attachments:
SEB
Last Edit: 2 years 8 months ago by Sébastien.
The administrator has disabled public write access.

Modbus RTU 2 years 8 months ago #11114

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Sebastien,

There is a description of Modbus TCP in Guide to IO Systems, and the RTU configuration for the modules and channels are more or less identical. You should of course use the RTU objects instead of TCP.

Note that the slave object should be child of the master object, and the module object child of the slave object.

/Claes
The administrator has disabled public write access.

Modbus RTU 2 years 8 months ago #11115

  • Sébastien
  • Sébastien's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 175
  • Thank you received: 2
  • Karma: 0
Hi Claes,

merci beaucoup pour la réponse,

j'ai bien utilisé le module RTU et après plusieurs éssais la led du WELLPRO réagit mais ne change pas d'état lorsque j'envoie une trame! Bien je vais voir le l'exemple IO et je vous tiens informer de tout ça!

Encore merci de l'île de la réunion.
SEB
The administrator has disabled public write access.

Modbus RTU 2 years 8 months ago #11116

  • Sébastien
  • Sébastien's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 175
  • Thank you received: 2
  • Karma: 0
Hi Claes,

voila je crois que je n'envoie pas la bonne information à la carte avec PROVIEWR, donc j'ai ma carte en Adress 1 donc UnitId = 1 après la fonction c'est 06 "Write single register" FC06 et je dois écrire la valeur "256" ( c'est ce que je fais avec un autre logiciel (Node-Red et ça fonctionne ) dans le registre 0001.

Valeur 256 dans le registre 0001 à l'adresse 1 avec la fonction 06

ProviewR :

donc ici avec proview j'ai DI ( O ou 1 ) qui est avec CHANDO0 ( au registre 0 donc 1 ) mais il sait pas si 0 = 256??? la led de la deuxième carte réagit aussi donc l'adressage est correcte mais la commande je bloque ......
Si vous avez une piste pour moi ? En vous remerciant.
SEB
The administrator has disabled public write access.

Modbus RTU 2 years 8 months ago #11118

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Seb,

Linux on x86 is Little Endian while the Modbus network format is Big Endian. Thus a 16 bit register that consists of two bytes should be swapped before it is sent. I suspect that your test software is not swapping and that's why you have to set the first bit in the second byte (256).

ProviewR though is byte swapping and you should set Representation in the ChanDo to Bit16 and Number to 0. This will set 1 that is then swapped to 256.

If the swapping problem is in the slave and your test software actually is swapping, set Representation to Bit16 and Number to 8. This will set 256 that is then swapped to 1.

/Claes
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 7.979 seconds