AdvancedHMI - Siemens PLCs S7-200/1200/300/400 Beta drivers

BryanG

Member
Join Date
Feb 2005
Location
Manchester
Posts
1,967
I have been working to get a Siemens driver library called libnodave to work with Advanced HMI to give access to Siemens PLCs.

I have tested on Siemens S7-200(PPI) and briefly on S7-1200(Ethernet) though it should also work with S7-300 and S7-400. I can't just supply the Siemens drivers because I have had to make some 'under the hood' changes to AdvancedHMI to get things to work. The changes are because Siemens memory descriptors don't carry data type information just data length.

Tested on the S7-200:
M memory: Read and Write (bits, bytes, words, doublewords and real/float)
V/DB memory: Read and Write (bytes, words, doublewords and real/float)
Q outputs: Read and Write (bits tested, programmed for bytes, words and doublewords)
I Inputs: Read (programmed but not tested for bits, bytes, words and double words)

Connections supported by libnodave:
S7-200: PPI and ISOTCP via an Ethernet module
S7-1200: ISOTCP
S7-300 and S7-400: MPI, ISOTCP and something called MPI over IBH.

It should work with S7-500 over a programming cable but I haven't put the code in for that yet.

I have been using an ancient laptop for my testing and would be interested on feedback from other systems. I haven't done Strings yet and the system retrieves one lot of data at a time from the PLC and so is very inefficient. If the system works then maybe Archie will integrate my changes into the 'proper' version of AdvancedHMI.

Bryan



If you are happy do some testing of the current system please download the files from:
http://www.davron.co.uk/AdvancedHMI.html
The usual disclaimers apply.
Use the SiemensPLCs driver and in its properties you will find all the connections settings.
In each Control you will find extra properties for Data Type, it is a drop down list and self explanatory. The system doesn't check that you have chosen the correct data type to match the memory location. So you could put VW10/DB.DBW10 but give it a Data Type of Unsigned Byte, obviously you will get duff data if you do this.
 
If you want to look, I've done a high level wrapper for libnodave, wich does also a little bit of optimation. For Example when you read many tags from the same db, it combines the read request so that you need less requests.
I've also a patche Version of libnodave in my lib wich supports routing for the S7 Connections!

http://siemensplctoolboxlib.codeplex.com/
 
Hi jogibear

I did find SiemensPLCToolBox but I couldn't see how to get it to work with AdvancedHMI, I am very much a beginner with Visual Studio. As 'Proof of Concept' I decided to work directly with your libnodave library. I also found your Linux based HMI but haven't had a chance to 'play' yet.
 
Sorry I got confused about which one you programmed. I also found S7net but couldn't see a way in to it. There was no problem with your lib, I just found it very complex to see how I could get it to work with AdvancedHMI. When I opened your files I didn't have any idea where to start. I tried looking in the libnodave folders but as I said I am very much a beginner and my head almost exploded.
 
I'm just curious how the battle is going with this. I have been looking into playing around with this a little bit. I just downloaded Visual studio 2010 C# and would mainly be interested in playing around with the S7-1200's.

Have you guys been playing around with it much lately?

-Joel
:site:
 
Now I see the Advance HMI is in VB.net. At first I was looking at the siemens toolbox, that one is done in C#.
 
I am still working on the Siemens (libnodave) drivers but am very busy doing paying work. I should be back on the case in about one month. In the mean time I did brief tests with the S7-1200 and everything listed above seemed to work. You can download my test programs or set up your own and in the SiemensPLCs driver set Rack and Slot to 0, set the IP address to match the PLC. You can't download Archies version and add my drivers because I had to make changes to his code to get things to work.

Bryan
 
hello BryanG I have a problem with you programmed HMI Advanced, and wanted to know if I can throw a help, the problem is that he says it does not recognize the data type that sends the PLC, leave a clearer picture for you to understand, not if I'm wrong I to program the PLC or am I doing something wrong in VB.net, could you pass me some kind of help or instructions for this problem, I know this is old but appreciate your help. -
 
What is the data type you are trying to read and which box did you put the name in to? Can you send a screen shot of the properties.
 
Lets just check the PLC settings first and then the object settings:

In the PLC settings you need:
COM Port - that is the computer serial port that the PPI cable is connected to.
COM Port Baud Rate - set this to match the PPI cable.
Interface speed to match Port Baud
and for the S7-200 choose PPI S7200 for the SiemensCommType. In the attached I have selected ISOTCP because this test system is with an S7-1200.

For the object settings you need:
CommComponent
Data Type - to match your data type.
PLCaddressText (if you are using a basic label). For me it was DB4.DBD194, because again I was working with an S7-1200.

That should do the job. I have had problems with bits above M0.7 on the S7-1200, I can't remember if I tried those on the S7-200.

Bryan

PLC settings.jpg object settings.jpg
 
Looks interesting!

For those who would prefer C# over VB, if this is a DLL project (have not looked into it yet), you could compile it with VB.NET 2008 express and use the DLL thus generated within a C# program, say, using C# 2008 express. That's the beauty of .NET.
If it's not a DLL project, well, someone could modify it such that it is usable as a DLL with components to be used in programs loading it.
 

Similar Topics

I would like to temporarily install AdvancedHMI on the same computer as FactoryTalk View SE. I am waiting for another contractor to finish the FTV...
Replies
3
Views
518
Hi all, just wanna ask if anyone has used an M221 controller and successfully connected to AdvancedHMI
Replies
1
Views
1,281
MessageDisplayByValue question is there a way to embed a tag value in the messages of the MessageDisplayByValue function ??? Similar to what is...
Replies
10
Views
2,775
Hi All I have been switching between 2017 and 2019, all depending on which one i found more stable, at the moment I use 2019 I was just...
Replies
1
Views
1,455
I tried to use AdvancedHMI as a Modubius Client and it does poll the data from a Modbus server. But I am unable to use AdvancedHMI as a server...
Replies
10
Views
3,010
Back
Top Bottom