S7-200 high speed counter

doctor

Member
Join Date
Jan 2006
Location
Stafford
Posts
7
Hi guy's can anyone help me, I need to measure the time difference between the rising edge of one input and the rising edge of a second input, (duration is in the low milliseconds 4-40)then multiply this by three and at completion of this new value, instantly send an output pulse.
Can this be done with the S7-200 family and how?
 
Doc..

I presume you'll need some kind of built in high speed counter. Not sure what members of the 200 series family have this or how it would be configured though. I'm not even sure if a 200 series would be fast enough? But I'm sure the folks on here will have more info...

Good luck!

JT ;-)
 
Yes, S7 200 supports HSC (High Speed Counter) with frequency max 30KHZ.

If you use step7 microwin, then goto Tools menu and choose instruction wizard...
Then choose HSC and go through the steps to configure it.
To know more about HSCs then download the s7-200 datasheet.
 
Where are the signals coming from ? - if they are repetetive then you will need to store the data somewhere to generate the correct output, or are the signals more one-shot in nature ?
 
Simon the signals are from two sensors, the first being triggered by the leading edge of an approaching bottle on a conveyor, and the second is triggered by the neck of the bottle.
The measurement diff between them is approx 17mm.
I need to know the time it takes to travel the 17mm so that I can calculate the position of the back of the bottle.

An encoder cannot be used as the conveyor has a slip / lubricated belt and the conveyor speed is constantly changing, thus the acceleration coefficients are constantly changing, plus one other complication is that there are several different bottle sizes to accomodate.
Hope this puts a little more light on the problem.
 
To my opinion you don ’t need high speed counters to solve this issue!

You need to work with interrupts.



Siemens S7-200 has a function called “input interrupts” They can be activated on a rising edge of on input.



----manual---

I/O Interrupts

The CPU can generate an interrupt on rising

and/or falling edges of an input.

These rising/falling edge events can be used to signify a

condition that must receive immediate attention when the event happens.

----manual---



In your case, this is what you could do:



Input 1= activate interrupt routine, and start a timer

Input 2= activate interrupt routine, copy timer value and reset timer. Then make your calculation en set output, if required



Note: inputs I0.0, I0.1, I0.2 and I0.3 of each S7-200 CPU can be used for this function.

 
Thank you for your reply, and this in essance is what I am now doing, only using HSC1 and 2 to get better accuracy and consistancy with the timing (not being scan dependant) but as you say interupts playing a major part.
Thank you
 

Similar Topics

I have a current project replacing S7-200 PLC with S7-1200 PLC (6ES7 215-1AG40-0XB0). The program conversions are manually created. I just want...
Replies
3
Views
1,735
Looking for example of the use of the HSC in a CPU 1212C PLC. Not sure of how to establish Hardware ID, and which input to use the ID1000 is it...
Replies
1
Views
1,814
Hi everybody, I would like to start by letting you know that i'm a begginer in PLC programming and i can use a little help here, please. I'm...
Replies
1
Views
1,580
Greetings, I am trying to get a Incremental Shaft Encoder (white pages attached) to count on my HSC in my 1200 project. I have assigned the first...
Replies
17
Views
12,856
Hello everyone, I got a question about the High speed counter It needs to move out a slide when the count reaches 100pules, and it needs to move...
Replies
9
Views
4,106
Back
Top Bottom