Help with FC on S7 1200

tanito87

Member
Join Date
Oct 2013
Location
Buenos Aires
Posts
2
Hi everyone, well i think it's the first time i need to create a thread, becuase until now i have found all the answers in the forum.
Well, the thing is that im more or less new to Tia Portal, i have always worked with Rslogix 5000. And i made a few projects with a s7-315f, but i never had this problem.
I will try to be as clear as possbile becuase i don't speak english very well.
The problem is the next one: I am making a Batch processing with Ladder language. When it starts, it's the STEP N°1, and it executes the STEP N°1 FC (FC1). So when certains conditions are met, a TON counter starts, and after a X amount of time, it adds 1 to the "STEP COUNTER" (contador step in the picture), and FC1 stops being called, and FC2 (STEP N°2) is called.

So, the first run, everything works perfect. The second run appereantly, when executing the subroutine again the IN status of the TON timer was saved, and it justs skips all the steps.

I have tried all kind of methods, and i don't understand why the timer remains on, when nobody else is calling him, the subroutine is not being executed anymore, and when the second time you execute the subroutine the status of the BOOL that calls the timer is FALSE.

Thank in advance you for your advice

PS: The image 1 is the picture of the timer that remains on, which is %DB26, the second image shows how steps are called

ladder.jpg ladder2.jpg
 
Last edited:
Hint: i have always found that condition call of FC or FB is a bad idea. Call them uncobditionally and make conditions in them in network logic.
 

Similar Topics

Hi all, I'm in the process of upgrading a PanelView1200 HMI program to be developed in FactroyTalk View Studio. The filetype for PanelView 1200...
Replies
7
Views
279
Good, Code Totalizer: IF ( Hour = 23) and ( Minute = 59) and ( Second = 59) THEN totalizerDay_previous : = totalizerDay; totalizerDay= 0; End_IF...
Replies
8
Views
1,560
I have 3 control panels made by an OEM, they are all identical and have a Siemens S7-1200 PLC with a Siemens CB-1241 Modbus card talking to 2...
Replies
8
Views
4,521
Hi,I need to build a PLC panel with a CUP & I/O cards, the panel to be communicated with a remote (500 meter away) extension module station. I...
Replies
9
Views
2,539
Hi everyone I am completely new to using shift registers and am a bit stuck, my shift register works as should, it is for an overhead conveyor...
Replies
55
Views
15,587
Back
Top Bottom