Siemens S7-200 Programming

simon1293

Member
Join Date
Nov 2012
Location
the back of beyond
Posts
6
Hello Folks,

I am new to the forum, and to programming.
I have made an attempt at a program with Microwin for a particular application and would like some feedback upon my attempt.
Also is there any way this program can be simulated other than loading it to a PLC ?

Thanks in advance

Simon
 
okey on the glance i can se the mostly it -won't work. i see you use timers in subroutine that you call more than once. that is practically impossible in s7-200. there are some special libraries that allow that but general rule is - don't do that.

other hint: if you want for timer to be sure that it counted minimum interval, use x + 1

also, if i am right reset_auto_cycle_flag will almost always be on as it will follow m0.0 and m0.0 in on after 1 sec and stays that way because you never reset timer, except if services are not on.

i will look for simulator somewhere if i has it
 
i see you use timers in subroutine that you call more than once.

If this is true, I can't see it.

I can see that M0.0 will go off when the start pushbutton is released. (unless it's mechanically latching). I guess this was not your intention?
 
okey on the glance i can se the mostly it -won't work. i see you use timers in subroutine that you call more than once. that is practically impossible in s7-200. there are some special libraries that allow that but general rule is - don't do that.

other hint: if you want for timer to be sure that it counted minimum interval, use x + 1

also, if i am right reset_auto_cycle_flag will almost always be on as it will follow m0.0 and m0.0 in on after 1 sec and stays that way because you never reset timer, except if services are not on.

i will look for simulator somewhere if i has it
Thanks for your reply, the M0.0 contact was meant to be NC, I didn't see that.
Simon
 
If this is true, I can't see it.

if you look carefully you'll see he calls bowl_control 2 times, in networks 1 and 3, and that sub contains T115, T116, T111.

To OP:
in addition to JasonWade regarding to M0.0 and pushbutton/latch button that can be done in one network, no need for separate routine

i would also guess that maybe 1s timer is for rising edge detection?
 
If this is true, I can't see it.

I can see that M0.0 will go off when the start pushbutton is released. (unless it's mechanically latching). I guess this was not your intention?
Yes the M0.0 is mechanically latched off an external contactor.
Balash pointed out M0.0 will always be on, but should have been an NC contact, the intention was to keep the reset condition when the services ceased.
Thanks for your reply
Simon
 
if you look carefully you'll see he calls bowl_control 2 times, in networks 1 and 3, and that sub contains T115, T116, T111.

To OP:
in addition to JasonWade regarding to M0.0 and pushbutton/latch button that can be done in one network, no need for separate routine

i would also guess that maybe 1s timer is for rising edge detection?
Could you dumb down an explanation of my timer use ?
 
i don't know what part to explain so i'll do both...

s7-200 has a problem that it uses same memory space for timers so when you use timers in subroutine that is called more than once they are overwritten. and you can't pass them as parameters to sub as well. same goes for counters and edge detection instruction. keep it out of subs, or call that subs only once per cycle.

as for rising edge disregard my remark. i see you use latch button i0.0 so i guess 1s is delay and not rising edge detection
 
Thanks Balash, this is why i want the feedback, always learning...
Other than the elements of the program you have identified as being incorrect, are there any other pointers you would give with regard to it ?
 

Similar Topics

I have an opportunity to quote an HMI project for one of my customers. It's a small project, and the customer is not the type with deep pockets...
Replies
3
Views
24,844
Dear Friends, I need Programming software for Siemens S7-200 PLC. Is there any free version available. I googled out but find nothing.
Replies
2
Views
3,828
Hello, I am currently doing a Siemens PLC course at TAFE (Australian after school education). I have purchased a Siemens S7-222 PLC so I can...
Replies
10
Views
14,586
Hi all, I'm desperate, confused, and it's late at night. I forgot how to go online to a S7-200 with my Siemens field PG. Which protocol do i...
Replies
5
Views
10,234
I'm new to the Siemens plc and Step7 software. I have a S7-200 and I like to combine a bunch of alarm bits (%m10.0-%m10.7 & %m11.0-%m11.7) into...
Replies
1
Views
3,013
Back
Top Bottom