How fast can a S7-200 count?

zanor

Member
Join Date
Sep 2005
Location
Oppland
Posts
8
How fast cana Siemens S7 200 CPU222 count and trigger an output?
Let's say I have a signal that is hi between 1000 and 3000 every minute and I want an output to be hi every 5 times, can this be done with this plc?

Sorry for my bad english.. :oops:
 
Surely it can be done, even with an S7-222. To be countable a signal has to remain in the on-state for at least one PLC cyle and in the off-state for at least one PLC-cycle too.

The S7-200 series may be a low-cost series, but their cycle time is below 2ms per 1k instructions. 1 minute should be more than enough.

Kind regards,
 
Just in case the English really is a problem and you meant 'second' rather than 'minute' you should be able to do that as well. The S7-200 has high-speed counters which can handle signals up to 30KHz, and a pulse generator output for up to 20KHz.

Ken
 
Response time is different than scan time. It depends on your output card. Tie the output to an input and put a line of logic Not input=output. From here you can add a timer and a counter to see the maximum frequency (on average) you can count on. There may be other things that can impede your response time.
 
Hmm I think I left out some important details... What I ment was, I have a signal that is hi and low 1000 to 3000 times per min. Nad I want the out put to be hi for a couple of milliseconds every 5 times the input is hi...

But if it is so that it uses 2ms for 1k program that would not be possible... or?
 
At 3000 on/off pulses/minute, and if the on duration and off duration of the signal are of equal length, it will be on for 0.01 second and off for 0.01 second (10ms). Your PLC scan time must be faster than this. Your input card response time must also be checked, but should be able to handle this frequency. The output pulses will be on once every .05 seconds for "a couple of milliseconds". Again, make sure your output card response is faster than that.
 
zanor said:
Hmm I think I left out some important details... What I ment was, I have a signal that is hi and low 1000 to 3000 times per min. Nad I want the out put to be hi for a couple of milliseconds every 5 times the input is hi...

But if it is so that it uses 2ms for 1k program that would not be possible... or?

Look at OB35 but it is no guarantee.
 
Maybe my math is off but doesnt 3000 pulses per minute basically equate to 50hz(50 pulses per second)? I get a count every 50ms(50 divided by 1000).

As was mentioned the S7-200 has 4 high speed counter inputs built in that are capable of 30Khz. It can definitely do the counting. Using my math above (if I did it correctly) it would count 5 pulses every 250ms. There are several ways to do this, a standard counter preset to 5 could trigger an output with a timer, the counter would also reset itself. If there is a scan issue using the standard counter you may need to use the high speed counter instruction.

The issue will be what the output is doing, a light would be a wasted effort at this speed.

THE MANUAL: http://cache.automation.siemens.com/dnl/DY1NjExNQAA_1109582_HB/S7-200_e.pdf
 
Maybe my math is off but doesnt 3000 pulses per minute basically equate to 50hz(50 pulses per second)? I get a count every 50ms(50 divided by 1000).
Sorry to disappoint you, but yes, your math is somewhat off. 50Hz means a count every 20ms (1s divided by 50).

Sorry, I couldn't resist:) .

Kind regards,
 
You could easily solve this with a S7-200,
no matter wich cycle time your main program has.

1.
At first cycle parametrize HSC counter with your target value 5.
Parametrize the output Q0.0 or Q0.1 as PWM output.
Start the HSC counter.
Use the wizard for HSC.

2.
When the HSC interrupt calls his associated interrupt
routine:
Start the HSC counter again.
Start your PWM output.

Instead PWM you could work with time interrupts too.
 

Similar Topics

I am just getting information about a need that a site has. They currently have a machine that has a ML1200 and is being interfaced to by a...
Replies
16
Views
6,659
Hi All, I've been playing with 2 stratix switches in my test bench and seeing how different configurations affect the behaviour when 2 managed...
Replies
3
Views
226
Dear all, Im using Allen Bradley Compact Logix L36ERM as a PLC. and facing a problem where I need to create a FIFO buffer that fills an...
Replies
5
Views
1,658
Dear Members; We have Fluke 754 hart communicator. We have wired up three transmitters of Rosemount Model C3051 with this input module. But when...
Replies
4
Views
1,847
Hi all, I have several machines utilising a PF755 on CIP motion. Occasionally the operator reports the jog speed ramps up rapidly, then the drive...
Replies
2
Views
1,366
Back
Top Bottom