runx999
Member
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 :
Network 2:
Network 3:
Network 4:
Network 5:
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
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 :
Network 2:
Network 3:
Network 4:
Network 5:
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: