Author Topic: modbus rtu  (Read 13712 times)

Jane

  • Newbie
  • Posts: 10
  • I'm a llama!
    • View Profile
modbus rtu
« on: July 07, 2011, 07:53:11 PM »
Hi,
I am looking on some help to get comunication between a T100MD+ and a Cymon PLC thru Modbus RTU..

To read register 403073, and assuming that the RTU has ID = 01 and has an RS232 port, then i can connect the PLC's RS232 port directly to Cymon PLC's RS232 port and use the built-in READMODBUS command such as:

SETBAUD 1,6
DM[1] = READMODBUS (1,1, 363073)
but i can not recieve.
what will be the format to read/write to/from that parameter?

« Last Edit: July 07, 2011, 09:13:11 PM by Jane »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:modbus rtu
« Reply #1 on: July 07, 2011, 11:28:12 PM »
The binary (zero offset) address you enter into READMODBUS is = 4xxxx - 40001.

So please try:

READMODBUS (1,1, 3072)

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:modbus rtu
« Reply #2 on: July 08, 2011, 02:58:59 PM »
What is the "36" doing in your address? This is not a modbus address space.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Jane

  • Newbie
  • Posts: 10
  • I'm a llama!
    • View Profile
modbus tcp/ip
« Reply #3 on: July 10, 2011, 07:23:22 PM »
Hi,
I am looking on some help to get comunication between a F1616 and a Cymon PLC thru Modbus tcp/ip..

To read register 403073 , and assuming that the device has ID = 01 and has an lan port, and ip address ="192.168.10.130".
then what  the modbus tcp/ip command at a F1616 ladder?

i want to receive a example source
« Last Edit: July 10, 2011, 11:32:26 PM by Jane »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:modbus tcp/ip
« Reply #4 on: July 11, 2011, 01:47:40 PM »
same as previous post. You use READMODBUS (4,1,3072) to read from slave ID = 01 of a Modbus/TCP slave the holding register address space 403073.

If you need a full example of making connection and send Modbus/TCP command please download the "TestEthernet.PC6" file from your C:\TRiLOGI\TL6\user\samples\Ethernet\TestEthernet.PC6

Note that the PLC only supports true Modbus/TCP defined by Modbus.org and it does not support the"encapsulated Modbus TCP/IP" that some vendors use.
« Last Edit: July 11, 2011, 01:50:12 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Jane

  • Newbie
  • Posts: 10
  • I'm a llama!
    • View Profile
Re:modbus rtu
« Reply #5 on: July 12, 2011, 12:29:49 AM »
i am sorry..

To read register 403073 , and assuming that the device has ID = 02 and has an lan port, and ip address ="192.168.10.130".
then  correct  the below modbus tcp/ip rtu command? but i can not recieve at all.
no ascii. i want to communicate thru modbus tcp/ip rtu

-----------------------------------------------------------
PRINT #4 "<RemoteFS 192.168.10.130:502>"
PRINT #4 READMODBUS (4,2,3072)  
PRINT #4 "</>"
delay(200)
FOR I = 1 to 10000
   A$ = INPUT$(4)
   IF LEN(A$) <> 0 RETURN: ENDIF
NEXT
IF LEN(A$)=0  
     SETLCD 3,1, "Fail to Synchronize"
     PRINT #4 "</REMOTEFS>"      
     RETURN
  ENDIF
-------------------------------------------------------------

i can communicate thru modbus rtu(serial)
port #11(rtu), but port #1(ascii)---rs232
port #13(rtu), port # 3(ascii)-rs 422
« Last Edit: July 12, 2011, 12:32:42 AM by Jane »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:modbus rtu
« Reply #6 on: July 12, 2011, 08:21:39 AM »
You need to first ascertain that the device at 192.168.1.130 is accessible on your network. You can use Ping to test this address and see if it responds. After that use the Modbus poll software (download from http://www.modbustools.com/) to try to access the Modbus/TCP device). If you can get a good connection and is able to monitor the address, then you can run tests from the PLC. Using a Modbus poll software on a PC let you interact with the Modbus/TCP device on the screen, which makes it easier to troubleshoot for any configuration problem.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS