ModbusTCP with PHP

F

Thread Starter

Fabou3377

I need to find a resource to interface php with modbus/TCP, Is there anybody know a resource?
 
G

Ganesh Okade

Hi,

Could you tell if your platform is Windows or Linux? If Windows, then there is a way to interface a dll into a PHP script. You can find many implementations of MODBUS in the form of a dll from various vendors.

If Linux, I am not too sure at the moment. Thanks.

Regards,
Ganesh Okade
Sunlux Technologies Ltd.
http://www.sunlux-india.com
 
M

Michael Griffin

M

Michael Griffin

In reply to Roy Yin: I had a look at your web site as I was curious, and noticed your mention of "XML Modbus protocol", "XML Modbus command", and "XML Modbus message". Is this just your way of describing an implementation of a set of web services, or is there actually some formal "XML Modbus" standard that I haven't heard of?
 
Modserver is a service program, just like OPC server. To control a RTU, C, PHP, or any script language connect to Modserver by using TCP socket or Unix Socket, and send XML format command to Modserver. Modserver parses the XML command, optimizes , creates a RTU acceptable Modbus command, and sends to RTU. It will format the response from RTU to readable XML format, and send back.

To write 25.4 register 40179 on slave 15
<modbus tranid="1"
unitid="15"
address="40179"
number="2"
function="16"
datatype="float"
byteorder="DCBA"
data="25.4" />
and response:
<modbus tranid="1" function="16" data="" state="0" />

-------------------------------
http://www.icscada.ca
 
Top