Using Send_Req in Unity

L

Thread Starter

Lorenzo

<p>Can you help me with the setup of a send_req reading with a modbus TCP/IP connection? This is my configuration:
<pre>
Canale.addres -> is an array of int
Canale.addres[0]:=16#0600
Canale.addres[1]:=16#650A (high byte: station address; low byte: network addres)
Canale.addres[2]:=16#0000
Canale.addres[3]:=16#0100 (high byte: modbus addres; low byte: channel)
Canale.addres[4]:=16#0000
Canale.addres[5]:=16#0000

%mw100:=16#0003 (hig byte: 00 default; low byte: modbus cod. function)
%mw101:=16#0296
%mw102:16#0000
%mw103:16#0100 (high byte: adrres of the first word to read)
%mw104:16#0000 (high byte: number of the word to read)

%mw203:=10 (lenght of the data to send)

%mw300:10 (buffer)

SEND_REQ(Canale.addres, 16#009F,%mw100:5,%mw200:3,%mw300:10);
</pre>
<p>WHY DOESN'T IT WORK????
Thanks.

<p>L
 
Top