Reputation: 11
I have an interesting question ( i hope so ) I am trying to establish communication between Siemens S7 300 PLC and my java program using socket connection using IP , Port , Rack and SLot Although i can establish the connection from the socket , read and write from specfic DB Blocks , I never see 'Connected' in Simatic Manager , is this so because i dont connect with the PLC's DB ?
Is there any library which can do this for me ? Since i want to exchange real time telegrams from the PLC , i have to establish this connection
Kindly help !!
Upvotes: 1
Views: 3912
Reputation: 620
You can use s7connector which is written in java. This the github link; https://github.com/s7connector/s7connector
If you visit the link, it is showing how to connect to plc with ip, rack number, slot number. You can write and read data from DB. I have not test the library yet. Now, I am also looking for plc connector. After trying the library, I will update my answer.
I hope it will helpful.
Upvotes: 0
Reputation: 130
Take a look to: Snap7 - Step7 Ethernet Communication Suite
Excellent tool LGPL3 by Davide Nardella.
Overview
Snap7 is an open source, 32/64 bit, multi-platform Ethernet communication suite for interfacing natively with Siemens S7 PLCs. The new CPUs 1200/1500, the old S7200, the small LOGO 0BA7/0BA8 and SINAMICS Drives are also partially supported.
Although it has been designed to overcome the limitations of OPC servers when transferring large amounts of high speed data in industrial facilities, it scales well down to small Linux based arm or mips boards such as Raspberry PI, BeagleBone Black, pcDuino, CubieBoard, UDOO and ARDUINO YUN.
Three specialized components, Client, Server and Partner, allow you to definitively integrate your PC based systems into a PLC automation chain.
Upvotes: 0
Reputation: 3730
You can access S7 300 DBs with libnodave, in your case with libnodave-java.
Upvotes: 2
Reputation: 1881
You need to supply more helpful information.
Next:
When your Java connects to the PLC, it is connecting directly. SM Step 7 makes its own connections, completely separate from your Java program. Are you trying to synchronize these connections? Are you trying to make your Java connection show up as an external device?
Without knowing more about your intentions, its hard to give you specific answers. In my experience, synchronizing telegrams is usually not especially easy. It can be done, but I don't think you are going to find some magic library for free.
Upvotes: 2