Hi to everybody.
I have found in internet the publication of the software for the protocol modbus.
I have the necessity to use the program installing him/it on a system BEAGLEBONE BLACK ARM 3359 Rev. A5C OS. Angstrom.
I have to plan the system the Slavic formalities with protocol Modbus TCP/IP to transfer the data acquired by the Beaglebone to a system HMI and to visualize them.
- Beaglebone Slave ip 192.168.7.2 door 502
- HMI Master ip 192.168.7.3 door 502
- Connection Ethernet I register Modbus TCP/IP.
I have tried to correct the found errors and currently others are visualized not from there.
Unfortunately the system doesn’t work!
Is someone able to lend me a hand?
In advance I thank any of good heart.
For me it is different time that I look for a solution, I am now to I exhaust him.
Modbus is not supported on the BeagleBone Black. It requires that the Ethernet be connected to one of the PRU/ICSS devices which cannot be supported.
Thanks Gerard, for me is a disappointment! But I wonder me, if the modbus is a protocol and the bookstores of the software from me viewed they can opportunely be modified for being proper for the BBB. Because he cannot be supported.
The BB cannot be modified. But, there is another board that supports it.
It requires special SW in the PRU to support it.
Thanks for the information.
I’m not at all familiar with Modbus, so I expect I am wrong, but would not his use case be supported? He’s not doing direct Modbus communication, but rather encapsulating it inside TCP/IP and then sending it over the network. The gateway device is responsible for converting the TCPIP packets into correct modbus format for the actual modbus network[and vice versa going back]
Wouldn’t the PRU/ethernet configuration be used if using the Ethernet wiring to run an Ethercat network ?
For testing, instead of node.js I’d go with libmodbus as it is an extremely mature implementation: http://libmodbus.org/
Install libmodbus and compile the test apps https://github.com/stephane/libmodbus/tree/master/tests and run them.
Then modify the bandwidth-client and random-client to swap the localhost address[127.0.0.1, port 1502] with the gateway adddress[192.168.7.3, port 502] and rerun them to see if you get a connection.
After that, your dependent on what you actually want to do - you will need to copy one of the client apps and modify it to send the commands your interested in.
Opps. I think I have my terminology wrong. I automatically think of “master” as the server and “slave” as the client - but for Modbus this is reversed? Ie the Master is the system which makes the connection and requests data. While the slave is the one to wait for connections and respond?
If that’s the case, then you would need to change the port number in bandwidth-server and random-server from 1502 to 502[to match the HMI Master] and run them, then the HMI Master can connect to them and try to read/write data. Obviously once you have it connecting then you will need to modify your server code to respond to the appropriate commands.