You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old April 6th, 2011, 08:39 AM   #1
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 826
Siemens S7-200 to S7-1200 Counter reset

Having a 'Blonde' moment here. I am converting a program from S7-200 to S7-1200 and I can't figure how to reset a counter that is in one FC from another FC.
Below is a counter in S7-1200, I know it has a reset input, but I don't want to reset it here:




I want to reset it like this, like I used to on the S7-200:


It won't let me clear the PV inside the DB associated with the counter, it says that it is read only. You can't use a bit logic reset. The only way I can see is to reset the variable DB22.DBW16, is it as simple as that?

Thanks

Bryan
Attached Images
File Type: jpg S71200 Counter.jpg (19.4 KB, 153 views)
File Type: jpg S7200 Counter reset.jpg (9.3 KB, 144 views)
  Reply With Quote
Old April 6th, 2011, 09:54 AM   #2
KalleOlsen
Member
Norway

KalleOlsen is offline
 
Join Date: Oct 2008
Location: Middle of Norway
Posts: 1,530
Don't have TIA here, but wasn't it something in the DB-definition ... one could declare the contents symbolic or not? Maybe I'm messing, but if you understand what I mean, could you try to unselect that option?

Kalle
  Reply With Quote
Old April 6th, 2011, 10:21 AM   #3
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 826
Hi Kalle

Thanks for that. Understand exactly what you meant so I created a new Counter, but when it creates an instance database for the Counter there isn't an option for Symbolic or not. I can't see anything in the properties for the timer or the database that I can 'adjust'. I think I will have to set up a PLC and create a test program to have a play.

Bryan
  Reply With Quote
Old April 7th, 2011, 05:31 AM   #4
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 826
After some testing I can say that setting DB22.DBW16 to zero does not reset the counter. I can't find anyway to get access to the DB associated with the Counter, it is read only. The only way to reset the counter seems to be with the Reset (R) input and I can't use that because this FC isn't running when I want to reset the Counter. The only other option would be to have the Counter in two different FCs but that sounds like a very very bad idea.

Plan B is to write my own Counter subroutine so that I can have any access I want.

Maybe they will add the reset function in future updates.
  Reply With Quote
Old April 7th, 2011, 08:12 AM   #5
Jeff23spl
Member
Canada

Jeff23spl is offline
 
Join Date: Jan 2010
Location: Canada
Posts: 736
i don'T know for counter as i never use them but for timing reset, their is a specail timer reset instruction....The coil unlatch reset doesn't work their...Their is a special one in the instruction tree...It may be you're problem..
I prefer to use .ADD. instruction instead of counter controling all the parameter by mylself
__________________
Siemens Addict
  Reply With Quote
Old April 7th, 2011, 10:25 AM   #6
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 826
Hi Jeff

I spotted the Timer Reset instruction but there doesn't seem to be an equivalent one for the Counter. I even wondered if I could choose not to use the IEC version of the counter. I am sure that in MicroWin you could choose which method to use, but I can't spot anything in the new software.

Some of the stuff in the new software is impressive but there is a lot that I would say isn't yet ready to be used in real life.
  Reply With Quote
Old April 8th, 2011, 02:56 PM   #7
Jeff23spl
Member
Canada

Jeff23spl is offline
 
Join Date: Jan 2010
Location: Canada
Posts: 736
i 100% agree with you, next week we are gonna get trainned for the new Version 11 of Portail that i expect to be renewed a little
__________________
Siemens Addict
  Reply With Quote
Old April 9th, 2011, 05:38 AM   #8
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 826
After your training, and if it isn't too big an ask, can you tell us what are the main differences. Or ask Siemens if they have the differences listed on a web page.

Thanks

B
  Reply With Quote
Old April 9th, 2011, 09:24 AM   #9
wolverine1981
Member
United States

wolverine1981 is offline
 
wolverine1981's Avatar
 
Join Date: Oct 2009
Location: Chicago, Illinois
Posts: 118
Hello

Here is a link to a some training modules I recectly found on Siemens Web site if you need.

Modules

M01 - S7-1200 Programming Startup
M02 - S7-1200 Function Blocks
M03 - S7-1200 IEC-Timer and IEC-Counter
M04 - S7-1200 Diagnostics
M05 - S7-1200 Analog Value Processing
M06 - S7-1200 Closed Loop Control
M07 - S7-1200 Networking
M08 - S7-1200 Human Machine Interface (WinCC Basic)


Link

https://www.automation.siemens.com/m...s/Default.aspx


Have A Good Day
Tom

Last edited by wolverine1981; April 9th, 2011 at 09:27 AM.
  Reply With Quote
Old April 12th, 2011, 08:49 AM   #10
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 826
Hi Wolverine.

I Googled 'IEC Counters +Siemens' and that site came up, nowhere does it mention a separate Counter Reset instruction. No other IEC Counter website mentions a separate Counter Reset instruction. So I can only guess that IEC Counters don't have a separate Reset instruction.

What I wanted to do was to reset the counter to zero before the FC ran, but what I have ended up with is setting it to zero the first time it runs.

Outside of the Counter FC I set a 'Counter Reset' bit, Tag 8


then when the FC goes through its first cycle I use the 'Counter Reset' to reset the counter and then in the next network I reset the 'Counter Reset' bit. I shouldn't need the Tag 8 contact in Network 3, it is just there for this short test program.
Attached Images
File Type: jpg Counter Reset Bit.jpg (17.7 KB, 84 views)
File Type: jpg Counter FC.jpg (30.9 KB, 82 views)
  Reply With Quote
Old April 12th, 2011, 10:31 AM   #11
TurpoUrpo
Member
Finland

TurpoUrpo is offline
 
Join Date: May 2008
Location: Finland
Posts: 1,336
Well, IEC counter is just function block, so there really cant be any async reset. You can call it second time with same idb, but that is really bad programming. Better to either use just add's & moves if you need value to be reset to some value from reset point onwards, else use way you did in above post.
  Reply With Quote
Old April 14th, 2011, 03:31 AM   #12
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 826
This still doesn't allow me to Move a zero to the CV for a counter (the data is still read only), but I thought it was interesting:
http://support.automation.siemens.co...ard&viewreg=WW

Sorry if this isn't anything new to you S7-300 guys but I am learning the new S7-1200 as I go.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Siemens S7 Counters qee LIVE PLC Questions And Answers 4 April 12th, 2011 06:34 AM
Beckhoff and Festo PLC comparison to Siemens S7 kemppioy LIVE PLC Questions And Answers 0 April 26th, 2008 04:12 PM
HSC counter s7 200 ungaro LIVE PLC Questions And Answers 3 January 9th, 2008 02:40 PM
Siemens S7 ethernet protocol fzhang LIVE PLC Questions And Answers 3 May 19th, 2004 12:06 PM
Siemens S7 PID Reset input format Andy32821 LIVE PLC Questions And Answers 2 August 31st, 2003 12:49 PM


All times are GMT -5. The time now is 09:20 PM.


.