I have a relatively special question here. At least I think it's special as Google didn't seem to be able to provide me with the information I was looking for.
I have recently purchased a S7 Starter Kit, containing a S7 1212C PLC. It's all setup and running.
What I would like to do, is to write a Java Program (without native libraries) that communicates with that controller. I know there are the S7 Java Beans, but these seem to work only with the 200/300/400 Sieries. Are there any (open-source) implementations of Java protocol-stacks, that allow to access such a PLC from Java? If not, I would be really glad to get some pointers to some specifications that would allow me to implement a rudimentary stack myself (It seems the Web is filled with high-level information, but there seems to be very little low-level stuff around :-()
Help greatly appreciated,
Chris
There is a beta tester only Java version of libnodave, but I don't know if 1212 is supported.
In order to be able to close this. There is no pure Java way to actually use ProfinetIO the problem is that initiating the Communication is not an issue and polling values is also possible, but in order to initiate a normal Profinet IO communication I would have to access the IP stack below TCP and UDP which Java does not allow. Unfortunately the "real time" state information sent by the plc is sent using an IP frame type Java does not support.
The S7-1200 and S7-1500 series are capable of communicating via ModbusTCP (see https://www.dmcinfo.com/latest-thinking/blog/id/8869/using-an-s7-1200-plc-as-a-modbus-tcp-slave).
There's a Java library to communicate via ModbusTCP: http://jamod.sourceforge.net (haven't tried it yet).
Maybe this combination will work for you.
I don't know if this is helpful for you, but we have a java library (LGPL 3.0) which talks natively via TCP/IP with S7 devices.
have a look at http://openscada.org
The code itself can be found at http://git.openscada.org/?p=org.openscada.atlantis.git;a=tree;f=org.openscada.da.server.dave;hb=HEAD
Check out Moka7: it's an implementation of the S7 protocol in Java.
Related
As you all know, OFED's Socket Direct protocol is deprecated and OFED's 3.x releases do not come with SDP at all. Hence, Java's SDP also fails to work. I was wondering what is the proper method to program infiniband in Java? Is there any portable solution other than just writing JNI code?
My requirement is achieve RDMA among collection of infiniband powered machines.
jVerbs might be what you're looking for. Here's a little bit of documentation.
jVerbs looks interesting otherwise you might like to try rsockets with LD_PRELOAD.
Use Fast-MPJ or any other mpi in java which gives infinband device layer support. open-mpi was expected to release openMPI for java recently.
If you are looking for SDP replacement try IBM's JSOR API - it uses the same idea of providing RDMA behind good old Java sockets. It is faster than SDP and still supported. Works fine with OFED 3.1.
I am working on a web service for which we have already developed apps for iPhone and Android. To cover the rest of the web enabled phones, temporarily or otherwise, we are going to use a web app. We would like the app to conform nicely to each device as well as cover as many devices as possible including low end devices.
Can anyone point me to a framework for such an application, if such a thing exists. What I'm looking for is device/user agent detection and perhaps a boilerplate template for a wide range of mobile devices. Either Java or PHP wil do. I'm looking for the best solution between the two.
Thanks
You could look into jquery mobile. I don't think the serverside code for mobile device(database, logic) is that much different from normal browser code. Maybe you should render less output to screen, but not more than that? I think you could achieve that thanks to jquery mobile.
Such a thing doesn't exist, lots of the subcomponents are available for free but getting that correct mix with the right amount of genius in it to make it work for you as some readymade framework is a pipe dream.
In fact if adapting to mobile isn't your core business, you should outsource it to some other company of which it is since at this point those companies have been in the field for almost a decade. (This, by the way is the nearly obligatory "I work for such a company, buy our stuff" plug)
But, to elaborate a bit further and actually help you, WURFL is usually mentioned when detection frameworks are mentioned. Unfortunately WURFL is only about 95% accurate and lacks a truly consistent structure.
For further reading on my thoughts about this, you should read these other semirelated posts I have made over my time here:
answer to question on building a CMS for mobile context
How mobile phone adaptation should be done in general terms
Parsing useful information from the User-Agent header string
You could use Java with the JSF2.0 framework. In that case I suggest to use an third party component library like PrimeFaces, more explicitly PrimeFaces's TouchFaces
For device detection you could use a library like WURFL which has an API for both Java and PHP.
I suggest you to have a look a this book:
Designing-Progressive-Enhancement-Building-Everyone
I am planning on implementing a NIDS (Net Intrusion Detection System) in the Java programming language.
After searching, I found two libraries for this.
1) Jpcap
2) jNetPcap
Which one should I use and why?
Which is more preferable to use?
It appears development has stopped on Jpcap. Their last release was 2007. In contrast, jNetPcap has had very recent releases. The underlying libpcap C library that they both wrap has continued to evolve, so I would go with jNetPcap for that reason.
On the other hand, libpcap is a fairly simple API. If you are comfortable with C, then you may gain performance advantages by using the library directly instead of going through a Java wrapper. Something to consider, anyway.
One simple idea I've had for network intrusion was to listen for messages on the braodcast IP address. New comers to the network may likely need an IP address from the DHCP server. If this is so, then they will have to send out a broadcast that a DHCP server will respond to . You could write a program that sits on client A and displays popups whenever it hears something on the broadcast address.
If it's still an issue, use .NET version jnetpcap. I built a NIDS for a master's term project and I tried to use Java and get jpcap and similar working but it was near impossible. So I went for the most viable option c# and it worked alot easier, even thought I didn't know it then.
Also use ikvm since you will need to use weka.jar from .NET as well.
Read about Server push here.
I want to push data to client from my web application in real time.
I was looking at TCP sockets as one of the options.
For HTTP I found a variety of frameworks for Java, PHP, Python and others over here.
However I don't know whether any of these support Push.
What options and frameworks would you
suggest for implementing Server push?
What language would you advocate for implementing the same and why?
I'm using Orbited right now, it's great!
If you are doing chat or subscription type stuff use stompservice and orbited.
If you are doing 1 to 1 client mapping use TCPSocket.
I can give you some code examples if you want.
How about Orbited, it's very good and being used by Echowaves
Comet is the protocol you want. What Comet implementation is best, is a harder call.
If you're OK with Java (or, I guess, Jython), or .NET (where IronPython's a possibility), I suspect (not having extensively tried them all!-) that stream hub must be a major contender. It'a typical "freemium" product -- you can get a free ("as in free beer";-) version, or you can try the pricey Web Edition, or the even-pricier Enterprise Edition; feature comparison is here (e.g., free edition: no https, no more than 10 concurrent users, no .NET).
Ok, I'm using ASP.NET with PokeIn comet ajax library on my project. Also, I tried Atmosphere under JAVA.. My last choice was PokeIn.. Because, only server push support is not solving the problems. You will need some kind of client to server object serialization and object life time management. PokeIn covered all these needs for me.
What about Ajax Push Engine?
I'm personally biased, but I like WebSync, for IIS/.NET. It integrates with IIS, so no other server software necessary, just a dll to add to your project.
I believe xmpp implementation is one which is being use by a lot of big companies but the common thing is to use a comet server as well.
a lot of implementation in python for thoses you can google around.
Have you tried StreamHub Push Server?
I am not sure exactly what I am asking....The guys that do the software development for the company I work for write everything in VB. I am currently the Web developer for this company and I specialize in Flex apps. I am thinking about expanding into their area. But I do not want to do VB, I don't mean to bash on VB but the coding syntax is not for me. So I am wondering if Java can integrate with VB? Also not sure if it matters but I think everything they do is procedural, and I will be doing OOP.
Thanks.
There are lots of integration opportunities, but before examining them, if I were you I would re-examine the question itself.
It should be exceptional to introduce a new language into an established project. The desires or aesthetic preference or skillset of a single developer is not a good enough justification to do so. Introducing a new language into a project should be a strategic decision for the project, not a backhanded one.
If you do choose to expand the core languages used to develop the system,
COM interop
is possible with JACOB. I believe IBM has a bridge as well.(Check alphaworks)
Java-.NET bridging
is possible via JNBridge and other bridges. This makes sense only if VB.NET is in use.
SOAP, XML document exchange, REST
suitable over a services boundary. It requires TCP or HTTP or some network protocol.
common data stores
can serve as a rendezvous point. Both Java and VB can read and update data in SQL Server, Oracle, MSMQ, MQSeries, and so on. Even a filesystem can be an integration point.
Think of data format as related to, but ideally independent of, the integration mechanism. What I mean is: You can use an XML document for integration, whether it is stored in a database, or sent over a REST interface, or stored in a filesystem, or put/get on a queue. You can use a comma-separated file over any of those mechanisms as well.
Potentially they could expose a service layer via soap or something simpler? Also you could always work against the same database with different languages however unless most of the logic is in stored procedures (not necessarily recommending this approach) then you end up with repeated code.
Not really. Java uses CORBA for interop, and VB uses COM for interop. You may be able to make a bridge using JNI, but I understand that can be quite the pain.
I haven't done this by I believe you have the following options:
Use the Java-COM bridge, as VB uses COM. This library was already mentioned here several times
If you are using VB.net, you probably use hessian, As it has both Java and C# implementations.
You could bridge the two using a C/C++ adapter to map JNI calls with COM. But that would be horrible. I hope there is a better solution, but my understanding is that it is pretty hard to integrate .NET code and Java as both vendors (Sun and Microsoft) don't have any incentive to streamline that kind of development.