Siemens S7-313 to OP270B Communication

qee

Member
Join Date
Dec 2003
Posts
23
Hello All,

I'm new to this forum so please be gentle with me!

Can anybody please explain how I can read/write data to a Siemens OP270B HMI from a Siemens S7-313C-2 DP Processor.

I have been told to use 1 FC (function) and 1 DB (data block) within the PLC to handle all the required information.

How I understand it is a “function” is what Siemens call a “subroutine” i.e called from the main program file and the “data block” is how Siemens define “data files” i.e In Allen-Bradley terms – N160 etc.

What I’m intending to do is to call an FC from within OB1 (main program file)
and have all the hmi indicators, buttons and data, read and written from this FC via a designated DB.

But I’m having trouble finding how this can actually be achieved?
Is it possible to read and write from a DB in the PLC directly to and from the OP270B?

The help that I have read on communication between the two mentions “area controllers” that are defined within Pro tool but most of these appear to have size restrictions.

As I’m new to Siemens I’m struggling to get my head around the overall program structure and design philosophy that this PLC requires.

And advice or suggestions would be greatly appreciated, no matter how small.
 
Hello Gee;
Just to keep things simple:
Any data address you program in your PLC is directly available to your OP270 (once your communications are effective, of course). If you integrate ProTool in the Step 7 environment (Start--> Simatic--> ProTool CS--> ProTool setup), any symbolic address inyour program will also become available to your OP270 program.
Say in your program you want to start a sequence with a bit controlled by the OP; say you choose address M12.6, and give it the symbolic name "Start sequence 1". Save and download the function to the PLC. Set up a ProTool object in the Step 7 project, open it, use a Function key's properties to )Functions) SET a bit; symbolic names available will be shown, and yuou can select "Start sequence 1" from the list. Using different functions for text displays or input boxes you can read/write data fron the OP to/from the PLC. You can also select addresses in absolute form (M12.6, DB22,DBW6...).

Area pointer are used to set-up defined jobs in the PLC that will impact the OP. Alarm messages are a case in point. You create an area pointer of 2 words in the OP; that gives you 16 bits, say in DB1, DBW1 and DBW2; this will control 16 different alarm messages that you create with ProTool. When alarm conditions are satisfied in the PLC, activate the corresponding bit in the area pointer (for message 2, set DB1.DBX1.1) and message 2 will appear on your alarm screen. To acknowledge the alarms, set-up another area pointer for acknowledgement (same size as the alarm area pointer) and trigger the corresponding bit in your program.

So you do not need to program an FC to read/write to an OP; data addresses are whatever you need them to be in your program; arear pointers are defined for specific exchanges, not data tranfers.
Hope this helps,
Daniel Chartier
 
Daniel is right; basically it is the OP270 that does all the polling af tag data or area pointers.

There are two exceptions though, which I think should be mentioned:

1. "PLC jobs". These are messages from the PLC to the OP to trigger certain actions - for example switching the OP to a particular screen.

2. "ALARM-S". This is an alternative to the normal alarm system that uses area pointers. Basically it means that it is the PLC that sends a message to the OP when an alarm has been triggered. This offloads the network bandwith, as it happens by event as opposed to the continous polling by the area pointer method.
Notice: ALARM-S is only possible if both the OP project (Protool) is integrated in the PLC project (STEP7).
 
Thanks guys you have been a great help so far.

However as I mentioned I have been told to use a DB to read/write all the data for the OP270. I know it’s probably no the easiest or best way to do this but it is in the spec of the project. The problem that I’m having is that I’m unsure how you integrate an S7 project in OP270 and see the available DB addresses.

Can this be done or am I barking up the wrong tree?

If so how would any of you go about addressing words in the OP270 from a Data Block in the S7?

Also if I define a Data Block in S7 all I am able to see is the DB listed in the symbol table (e.g. DB60) of the S7. How do you make use of the individual data or word elements of that DB? I’ll continue reading the manuals and hopefully gain more of an idea.

If any one has any suggestions it would be a big help and very much appreciated.

Thanks for your help once again.

QEE
 
The requirement for using DBs is probably to keep the Merker area free. The Merker area is a fixed memory, whereas the DBs are setup when needed.

You have to setup one or several DBs for the OP comm.
The symbol table only contain the symbol for each DB, not the sub-addresses within.
The symbols for the DB sub-adresses have to be setup in the declaration of the DB.
Also, each sub-address must be setup for the desired type (BOOL, WORD, INT, REAL .. etc).

Examples: 
Address Type Symbol Symbol comment
DB10.DBX4.0 BOOL M1_RUN Motor "running" status
DB10.DBX4.1 BOOL M1_ERR Motor "error" status
DB10.DBW6 INT M1_AMP Motor "Current" [A]


If the Symbol for DB10 is "OP", then the complete symbol for DB10.DBW6 is "OP.M1_AMP".
If the Protool project is integrated in STEP7, then the tags can be referenced by symbols. If not they have to be referenced by address.
Also, be sure to match the types of the tags in Protool and the addresses in STEP7.

You might be tempted to use "instance DBs" (that is: one DB for each "object"). But that is not advisable. If possible, keep all OP data in one DB. Otherwise the communication will be degraded by the call to many segmented addresses.

Edit: To integrate Protool in STEP7, you have to have the STEP7 project on your PC, and you must select the setting "Protool integration in STEP7" in Protool.

Edit again:
If you are the person who shall do the STEP7 programming, then you need a starter course ! STEP7 is too complicated to get into by oneself.
If someone else shall do or has done the STEP7 program, then all you need is an address listing to setup the tags and area pointers. Protool is relatively easy to get into by one self :)
 
Last edited:

Similar Topics

I'm using a 3rd party USB to MPI adapter cable. I can see 157 blocks of various types listed under Accessible Nodes in Simatic Manager. The Upload...
Replies
28
Views
8,116
Hello everybody i have a cpu 313-c and when i am terning power on all leds stay for a sort time on and after go off exept sf led blinking has...
Replies
1
Views
2,328
hi everybody...its nice to see all of you helping the people and sharing thoughts with one another....🍻 Rely i admired the forum people...
Replies
2
Views
1,770
Hi i am new one in simens hmi & drives. I am using CPU313-2DP . I have to connect simens HMI(MP277) & SIMENS DRIVES at same time. how should i...
Replies
3
Views
3,339
Hi, I am currently using a Siemens Simatic S7 313 PLC with built in high speed counters. The issue I have is that the counter appears to increase...
Replies
0
Views
4,596
Back
Top Bottom