Author Topic: WRITEMODBUS  (Read 10894 times)

Domustec

  • Newbie
  • Posts: 1
  • I love YaBB 1G - SP1!
    • View Profile
WRITEMODBUS
« on: July 15, 2003, 07:19:53 AM »
Hi.
I'm very novice in the MODBUS-RTU protocol, and I want to communicate whit an equipment by RS-485, with MODBUS-RTU Protocol.
In the manual of the equipment says that to put the machine ON I need to send, to Register #1, "0008H". But this word is in hexadecimal, and I don't know what I must write to the register to put the machine ON.

Thanks.


PS: sorry my bad english!!!!  :)
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: WRITEMODBUS
« Reply #1 on: July 15, 2003, 11:24:31 AM »
Please find out from the manual or your equipment supplier whether Register #1 is the MODBUS holding register #1(in Modicon this is usually labelled as 40002). If so, then you can just use:

WRITEMODBUS  13, 1, 1, &H8

13 - First parameter means to use RTU to write to COMM3.
1 - Assume slave ID = 01
1 - Register #1, which correspond to 40002
&H8  - hexadecimal representation of the number 0008H

« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS