S7-300 Function conflict

vitajim

Member
Join Date
May 2005
Location
Athens
Posts
3
Hi to all the plc community,

I’m a very new member here, and I’m also very new into the plc world. I just took a course this semester in my University (National Technical Univ. Of Athens Greece).

The plcs that we are taught are Siemens S7-300, and there is a project that I have to complete concerning a motor control (Start/Stop, with Star/Triangle connections, and Left/Right).

In this project I used a function for Y-D. So I have implemented a function FC1 for the Y-D switch and I have used this FC1 in two networks in the OB1. In the one network I give a “Start_Left” command to the function as an input, and the function gives out a “Y_Left” command (for 10secs) and then a “D_Left” command (after 10secs) as output

And in the other network of the OB1, I give a “Start_Right” command to the same function FC1 and I get a “Y_Right” and a “D_Right” command as an output.

The problem is that when I set “1” the Start_Left and have “0” the Start_Right, the program sets on both Y_Left and Y_Right, and also both D_Left and D_Right. It looks like the results from the function that is used for the Start_Left command update also the values of the Start_Right function.


How can I overcome this problem? Is there a way for the two implementations of the same function not to interfere with each other?

Thanks a lot for your patience.

P.S. All the code (in OB1 and the Function) is written in Ladder.
 
Last edited:
Not having used siemens much, I am unsure of the FC1 function, but if you are using it in 2 networks or rungs, then you could possible be writing to the same address with the one input? Check your address's to make sure they are all unique.
I am sure somewhere here though will know siemens well and will be able to tell you exactly what is happening.
 
Normally they don't interfere with each other.
I would check the following:

1, Within FC1, are you using global or local variables? Global are the M0.1, Q2.0, I1.1 etc (english version, the letters change in other languages).
Local variables are declared at the top of your FC, are used within your FC only, and are de-allocated (or cleared) once the FC has finished its call. You will want to use local variables for this one.

2, Look for byte or word logic, sometimes when this is used without care it can produce un-expected results.

3, Variable declarations. I am not sure about the Siemens, but I think it may be possible to declare multiple variables with the same address. This is easy to do if you are simply copying multiple groups of similar variables.

Hope this helps,

Doug
 
Some definitions:

The variables that I use inside the function are local and Boolean.



I think that the problem must be related to the wrong use of EN (enable). When the simulation starts, both networks in OB1 have the EN active and thus both functions run simultaneously, I would like to know if there is a way to activate only one at a time.

Is there a way to post the project? I don't know how.

I also have it in zip format (170kb). I can e-mail it to anyone available.
 
You are using timers T21 and T22 in FC2. If you call FC2 more than once, the timers will not operate independantly - hence your problem. One method to overcome your problem is to make the timer numbers input parameters to FC2, you can then specify different timer numbers for each call to FC2.
 

Similar Topics

Hi, How is a ADDMX function setup to communicate to slave devices (Modbus TCP/IP) that connected to BMENOS0300 in a M580 Remote drop. I have...
Replies
3
Views
2,681
Hello all, Newbie in Siemens, I want to ask if there will be any issue when I download the instance datablock of a certain Function block? Also...
Replies
6
Views
4,406
I am using an Allen Bradley PanelView 300 Micro with Panelbuilder32 software. I am unsure on how to assign a screen to a function key? (F1, F2...
Replies
2
Views
3,058
The communication is between micrologix 1100 and GE power relay MM300, I have the following informations : And the command adress is as...
Replies
0
Views
1,257
Hi. I've been learning from this forum a lot. Thanks to You i've managed to create an alarm function. It's a function that will handle 32 trigger...
Replies
4
Views
2,123
Back
Top Bottom