Linux and Mitsubishi PLC read/write

G

Thread Starter

getut

We are needing to create some web apps served from linux/apache web server/PHP, but perl or python will also do. What are our options for reading and writing to mainly Q series PLCs, but also possibly some GOT touch panels over the network from the linux web server?
 
The Q series Ethernet modules support their own proprietary network protocol (I think it's the MC protocol). This rides on top of UDP or TCP, I don't remember. They also support Modbus with their Modbus Ethernet card. Be careful because the standard Ethernet card won't do Modbus and vice versa. I believe both cards will do the MC protocol.

You will have to write a program that can read and write with their proprietary protocol, use Modbus, or write a backend software for the Q that can interface to a custom protocol that you define over TCP or UDP. I don't recommend the latter because custom Ethernet programming in the Q processor can be a bit painful.

Modbus is probably your best bet and you would run a Modbus master on your linux box using one of the available modbusTCP libraries for linux. This would need to be integrated to apache through pipes or shared memory I am guessing (I have not done much web server work.)

Can your GOT panels simply reference registers on the Q CPUs? This would be the simplest way. Trying to do anything complex in the GOT can be frustrating. It displays and edits Q registers and bits really well, but the scripting/programming aspect of the GOT is really not that great and depends somewhat on the model of GOT. I've never done any real scripting on the GOT but given how limited the GOT is in general I would just flat out say that it won't integrate to apache in any great way unless you use their direct MC protocol with a program running on your server.

BTW, what is the nature of your data, is it mainly to display logged information, or do you want quasi realtime back and forth communication, or are you mainly reading registers from the Q with the intermittent write to a Q register? I say this because if you are mainly storing data to a database that apache then serves up through HTTP then your task could be completely different. You could use some kind of OPC server that has the MC protocol built in that then logs to your database. Alternately you could send log messages out of the Ethernet module quite easily and have a service on your linux box that parses these messages and stores to a database (I've done this and it works well). The latter is better on network traffic because it can be event driven and only has one way traffic. Not sure it matters these days with Ethernet being so fast.

KEJR
 
Top