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 March 9th, 2017, 05:33 AM   #1
arthur.hauer
Member
Brazil

arthur.hauer is offline
 
arthur.hauer's Avatar
 
Join Date: Nov 2016
Location: Paraná
Posts: 25
Timing S5

Hi all!

I got a newby question for you: I need to time multiple events individually in Siemens S5-95U. To do that, a timer generates a pulse every second. That timer is placed in a function block called by OB 1. Is this good practice? Should I use multiple timers for each event?

Thanks in advance,
Arthur

Post Scriptum: Timing doesn't need to be very precise, the maximum time count is around 10 hours.
  Reply With Quote
Old January 12th, 2018, 11:36 AM   #2
arthur.hauer
Member
Brazil

arthur.hauer is offline
 
arthur.hauer's Avatar
 
Join Date: Nov 2016
Location: Paraná
Posts: 25
After experimenting, the conclusion is: using a single timer to generate a pulse train and using this pulse train to time events isn't very accurate. If you don't need very high resolution and is willing to have 10s/min error, it's a solution that saves timers.
Another solution I tried was using OB13(periodic call) to generate those pulses. Again, there was error, but this time much smaller (0.00833s/min).
Undoubtedly, using an individual timer for each event is the more precise solution.
  Reply With Quote
Old January 12th, 2018, 08:44 PM   #3
iant
Lifetime Supporting Member + Moderator
Australia

iant is offline
 
iant's Avatar
 
Join Date: May 2002
Location: Melbourne
Posts: 3,664
I am not familiar with S5. They are very old.
Many older types have issues with the restart of the program cycle.
Normally use a pulsed time signal. Then an add block
Add one to a register every second. Then compare that number.
Shouldn’t have errors then
__________________

Give all the answers
- People seldom learn.

Guide People to the posibilities
- Their Answers will come easily.
- Their Knowledge will grow.

They will then teach others

Regards
Ian Trost
  Reply With Quote
Old January 12th, 2018, 09:55 PM   #4
Geoff White
Member
Australia

Geoff White is offline
 
Join Date: Oct 2005
Location: Brisbane
Posts: 272
There is a built in word with bits that flip every 10s 1s 0.1s etc that you can use for that purpose. It should be extremely accurate.
  Reply With Quote
Old January 16th, 2018, 03:29 AM   #5
JBA-DK
Member
Denmark

JBA-DK is offline
 
Join Date: Sep 2015
Location: Haderslev
Posts: 51
Is this plc in a production or is it just for learning?
  Reply With Quote
Old January 16th, 2018, 05:08 AM   #6
arthur.hauer
Member
Brazil

arthur.hauer is offline
 
arthur.hauer's Avatar
 
Join Date: Nov 2016
Location: Paraná
Posts: 25
Quote:
Originally Posted by Geoff White View Post
There is a built in word with bits that flip every 10s 1s 0.1s etc that you can use for that purpose. It should be extremely accurate.
I don't think S5s have that clock byte like S7s do...
Well, I know S5-95U doesn't!
Even so, I used this approach in a S7-300 and got great results!
  Reply With Quote
Old January 16th, 2018, 05:10 AM   #7
arthur.hauer
Member
Brazil

arthur.hauer is offline
 
arthur.hauer's Avatar
 
Join Date: Nov 2016
Location: Paraná
Posts: 25
Quote:
Originally Posted by JBA-DK View Post
Is this plc in a production or is it just for learning?
Production... It controls a fiber optic painting machine (a very old one though)!
  Reply With Quote
Old January 16th, 2018, 06:07 AM   #8
Geoff White
Member
Australia

Geoff White is offline
 
Join Date: Oct 2005
Location: Brisbane
Posts: 272
If you get desperate you can accumulate the scan times until you add up to your preset then start accumulating with the remainder after subtracting your interval. There will be some jitter but the average interval should not drift.
  Reply With Quote
Old January 16th, 2018, 07:03 AM   #9
Manglemender
Member
United Kingdom

Manglemender is offline
 
Join Date: Jul 2007
Location: Lancashire
Posts: 1,107
If you wanted something more accurate then you could connect a more precise time signal to an interrupt enabled digital input and count those pulses.

Nick
  Reply With Quote
Old January 16th, 2018, 12:54 PM   #10
JBA-DK
Member
Denmark

JBA-DK is offline
 
Join Date: Sep 2015
Location: Haderslev
Posts: 51
I hope you have spare parts for this old S5 system. I have a couple of cpu' s and many input and output cards and software. I am replacing these systems as there old and obsolete. But there very reliable and they are still in use around the world.
  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
Communicating and moving data from S5 to S7 PLC russg LIVE PLC Questions And Answers 33 March 18th, 2015 12:12 PM
S5 programming adapter Karolewsky LIVE PLC Questions And Answers 3 January 24th, 2012 06:20 AM
Converting S5 projects to S7-300 emokar LIVE PLC Questions And Answers 8 April 23rd, 2007 08:59 AM
S5 to S7 timodc LIVE PLC Questions And Answers 8 November 2nd, 2006 02:07 PM
Addressing a 'bit' in a dataword with S5 Johnny T LIVE PLC Questions And Answers 9 January 24th, 2006 01:29 PM


All times are GMT -5. The time now is 12:29 PM.


.