Internet PLC Forum

General => Technical support => Topic started by: Domustec on July 15, 2003, 07:19:53 AM

Title: WRITEMODBUS
Post by: Domustec 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!!!!  :)
Title: Re: WRITEMODBUS
Post by: support 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