315-2 DP to Scale on Profibus

runx999

Member
Join Date
Nov 2005
Location
Port Elizabeth
Posts
12
I have some scales running on a Profibus DP network with an 315 2DP as master. The ton/hour and total ton value is updated from the scale to DB’s in the plc. The system is currently working. I was wondering if there is not a more efficient way of doing this. I feel that the way I’m currently doing this is very long winded.

System Description

The scale updates the values into the internal scale registers every 100msec. While the values are being updated in the scale the plc doesn’t read the values from the scale. Once the values are updated the scale sets register 10. When the PLC reads register 10 = 1 we acknowledge it by writing into register 11 = 1. When the scale reads register 11 = 1 it sets register 10 = 0 which prevents the scale from updating the internal registers until the plc has completed reading the registers from 1 to 8. When the PLC has completed the read we acknowledge back to the scale by setting register 11 = 0. The loop will start from the beginning again on the scale updating the internal scale registers.

Scale Control Register

To read data in floating point from the scale we send to the scale
|-------------------------------------------------------------|
| PROFIBUS DP INPUT TO SCALE |
|--------------|----------------------------------|-----------|
| WORD NUMBER | DESCRIPTION | VALUE |
|--------------|----------------------------------|-----------|
| WORD 1 |COMMAND (Send 100 for float value)| 100 |
|--------------|----------------------------------|-----------|
| WORD 2 |PARAMETER NO | 1 |
|--------------|----------------------------------|-----------|

The scale answers with this
|-------------------------------------------------|
| PROFIBUS DP OUTPUT FROM SCALE |
|--------------|----------------------------------|
| WORD NUMBER | DESCRIPTION |
|--------------|----------------------------------|
| WORD 1 |COMMAND ECHO |
|--------------|----------------------------------|
| WORD 2 |STATUS WORD |
|--------------|----------------------------------|
| DWORD 3 |VALUE |
|-------------------------------------------------|


Here is the code that I'm using at the moment.

Network 1 :
network1aj1.jpg


Network 2:
network2aj1.jpg


Network 3:
network3aj1.jpg


Network 4:
network4aj1.jpg


Network 5:
network5aj1.jpg


The code loops through until it has all the data from the scale.
The loop then starts from the begining once the scale has updated
the values. And Set Register 10 = 1.

Any suggestions. Can one do this with SFC14 and SFC15?

Cheers
Andre
 
Last edited:
Sounds complex. What is the scale brand if someone have experience whit it?
I have used Siwarex-units in the S7-300 rack and current weight is in some PIW all the time depending of scale parameters.
 
Hi Seppoalanen

I'm not sure what brand it is. As far I know the scale has custom written firmware on it.

The internal scale registers are updated every 100msec in which time the plc can't read from the internal scale registers.

The plc request the updated internal scale registers by register number from the scale. So the values in the PIW changes for every register value that you request.

What I wanted to know if there is a more eligant way of doings this?
 
Which type of elegance are you after ?

Graceful and stylish or pleasingly ingenious and simple.

What you have coded does the job. Apart from removing redundant TRUE flags, I would leave as is.
 
Hi L D[AR2,P#0.0]

I know the code is working. The redundant TRUE flags are there just to easily switch parts of the code off while commisioning. They will be removed.

What you have coded does the job. Apart from removing redundant TRUE flags, I would leave as is.

I hear what you are saying. It works so leave it. I was just wanting to know if there are other ways of doing this and if so how other programmers would approach this programming task.

There must be a faster way of getting the data into the DB's.
 

Similar Topics

Dear sir, I am using SIMATIC 300, CPU 315-2DP , (6ES7 315-2AF03-0AB0) VIPA 603-1CC21 A1.0 RAM 32KB, Firmware=V4.0.8 The problem Im using MPI...
Replies
1
Views
69
Hi , Looking for some help. We have a 343-1 PN Lean Card & 315-2DP connected to an external system collecting data. After a recent shutdown...
Replies
0
Views
52
Got a VIPA 315-2AG23 that i try to go online with but can't seem to make it work through a network. I can go online if i'm plugged directly in the...
Replies
4
Views
234
I'll preface this by saying this is the first time I've worked on a Siemens system and I'm fairly unfamiliar with them. I might mess up some of...
Replies
29
Views
653
Hi We were having a few power cuts and the CPU would not work. I had to reset the memory and he CPU would read from the memory card and start...
Replies
13
Views
3,116
Back
Top Bottom