Some basic communications with profibus

pmurray

Member
Join Date
Nov 2007
Location
The Wesht
Posts
3
I am in the initial stages of setting up a profibus network using siemens 315 2DP plcs. I have followed this guide to setup the network. So far I have used the following code to get an input in the master to turn on an output in the slave.

 

in the master:

I0.0 Q40
--| |-----------( )

in the slave:

I40 Q4.0
-| |-------------( )



This project will have three parts flowing through various machines each machine with its own plc. One of these machines uses three sensors to determine the type of part. I would like to use the sensor status (either on or off depending on the part) to create a memory word. I want to send that word to the next machine on the line so it can then appropriately deal with whatever part has been given to it.

My question for now is: are the system functions SFC_14 and SFC_15 the correct functions to use to transfer the word. Or will the word be too small for these functions to work since it seems they are used for transfering 4bytes of data while I have less than one to transfer. Also i believe that I will have to change the consistency ( the table on step 17 in the document I linked to)from unit to total length as well as the byte size for these functions to work is this correct?

I'm in a bit over my head so any help is great :oops:
 
Last edited:
If all you are having to do is transfer a word, I think you can just use the Load and Transfer commands in STL, or the Move command in ladder logic. (These can be used to move a byte, word, or double-word (i.e. 1,2, or 4 bytes))

The SFC14/SFC15 is usually used if three or more than four bytes have to be transferred "consistently", or as I understand it, all arriving at the same time. Someone correct me if I'm wrong but I think if you move 1,2, or 4 bytes with the Move(ladder) or Load/Transfer(STL)commands that the bits are sent consistently.

The document you are looking at isn't perfect. It swaps around the Q40 and I40 addresses. They are slave addresses on page 17, then magically master addresses on page 27.

The little bit of ladder you've shown should work OK if the configuration table is set up with a Q40 output byte for the master and an I40 input byte for the slave.

If you setup another row in the configuration table for the next slave, it could have an identical row (Q40 output from master to I40 input for slave) and it would also receive the required byte in I40. Make sense?
 
tim2 said:
If all you are having to do is transfer a word, I think you can just use the Load and Transfer commands in STL, or the Move command in ladder logic. (These can be used to move a byte, word, or double-word (i.e. 1,2, or 4 bytes))

The SFC14/SFC15 is usually used if three or more than four bytes have to be transferred "consistently", or as I understand it, all arriving at the same time. Someone correct me if I'm wrong but I think if you move 1,2, or 4 bytes with the Move(ladder) or Load/Transfer(STL)commands that the bits are sent consistently.

The document you are looking at isn't perfect. It swaps around the Q40 and I40 addresses. They are slave addresses on page 17, then magically master addresses on page 27.

The little bit of ladder you've shown should work OK if the configuration table is set up with a Q40 output byte for the master and an I40 input byte for the slave.

If you setup another row in the configuration table for the next slave, it could have an identical row (Q40 output from master to I40 input for slave) and it would also receive the required byte in I40. Make sense?

ok thanks tim. The guide has the master output Q40 configured with the slave input I40 (and vice versa) which is why my little program works. I'll look into the "move" command I haven't seen very much on it. Which will probably lead to more questions than answers :whistle: But if I can use it to transfer a simple word then it will be a good chunk of the communication on the project dealt with. All documentation and books seem more geared towards the sfc 14 and 15.
 

Similar Topics

Not sure if I titled that right in using the correct terminology, but What are good references that I can go to, use, or read up on that will give...
Replies
1
Views
1,712
Hi all, I have a noob question regarding data handling from sensors. I understand configurations and I/O mapping sensor input/output variables...
Replies
2
Views
218
Hello I am new here and new to PLC's, I wrote this program for a class that I am taking and my local tech school. The description is switch 7 will...
Replies
0
Views
413
Hello I am new here and new to PLC's, I wrote this program for a class that I am taking and my local tech school. The description is switch 7 will...
Replies
10
Views
1,971
I’m a bit stuck on HMI (KTP-1200) programming… See the picture attached. The PASS or FAIL box should only appear when the toggle switch is...
Replies
7
Views
1,070
Back
Top Bottom