Twido and PhpModbus

J

Thread Starter

Judoboy

Hi,

I have a Twido with an Ethernet port.
I want to use the PhpModBus scripts (http://code.google.com/p/phpmodbus/) in order to create a PHP web page that can read and write value on my Twido.

Nevertheless, it doesn't work and I can't find an example on Internet.

Did someone successfully implement the PhpModBus script (or another) to communicate with a Twido?
 
T

Tallak Tveide

I did not try phpmodbus, but my command line client modbus-cli should be helpful for you to see that the PLC is connected and responding to Modbus Ethernet. After installing the Ruby gem, you should be able to run for example:

modbus read 192.168.1.1 %MW0 3

To read the first three registers of the PLC.

Good luck!

Tallak Tveide

---

Installation instructions:

Install ruby (version 1.9.x should be fine). www.rubylang.com.

After installing ruby, open a command line prompt with ruby (on the start menu on windows), and then run:

gem install modbus-cli

Next run

modbus --help

to see if installation is successful.

The program is supplied free of charge under the MIT license, with source code at http://github.com/tallakt/modbus-cli/
 
Top