S7-1200 hsc

Rushome

Member
Join Date
Apr 2016
Location
Edinburgh
Posts
21
Hi

I am designing a small system at work which will deposit liquid through a valve at a specific position. I have purchased a s7-1200 and will be using either a 2000ppr AB encoder or a 4000ppr AB encoder. I have set it up currently with the 2000. I have set up the HSC and adjusted the input filters to allow it to see each pulse and according to the documentation, in the AB mode using two inputs it will handle pulses at upto 80khz. The shaft I am attaching the encoder to will only turn at maybe one revolution per second. Maybe even two seconds for a revolution. It varies little in speed. So by my calculations this PLC is more than capable of doing the task. But yesterday a contractor said to me it won't work. I've got it set up and it appears to be working but he's saying when it goes faster it won't work, then he just walked away. Is there some other factor I don't know? Or does he just mean it wouldn't handle being on a much faster shaft? Any info would be appreciated. Thanks.
 
I personally don't see an issue with your math. Seems like you should be able to run 40 RPS on the shaft @ 2000CPR before you exceed the HSC capabilities. That's with no filtering, but even if you filter if you're running 1-2 RPS max, seems like it would work fine to me.
 
Go in to PLC properties and change the filter level for the input that you are using for the HSC. Sorry I haven't got the urge to calculate the right filter time, so you will have to do that yourself, or make a guess for now.
 
I believe that if you're using the 1200 inputs as a HSC, it turns off the input filters. the HSC will count even the briefest flutter, which makes it a huge pain when using a reed switch instead of a real encoder.
 
I could be wrong, my experience was a long time ago (possibly V1 FW). It didn't actually disable the setting, but I think the HSC ignored the input filter.

We had a really low quality "encoder" that was really a magnetic reed switch that had a lot of bounce to it. Using the default input filter setting, the HSC counted a different number of pulses in each direction, because the contact in the "encoder" bounced a different number of times each way. When we turned the HSC off, it read just fine. When we hooked up an oscilloscope, the HSC was counting EXACTLY what was going on, not using the configured input filter. I don't know whether it was ignoring it, or maybe just silently changing to the lowest possible.

The motor was slow enough that we ended up just using a normal counter in the code, and had no issues.
 
It defaults to 6.4 ms- and stays there
Rushome's is probably not set low enough- since it stops counting at higher speeds

hsc.jpg
 
What I saw was that if you read the input itself (I0.0), the filter is correct. If you monitored the hardware HSC value (IW1000) the HSC wasn't affected by the configured value. It was monitoring the input directly.

Like I said, could be wrong, but that's what I remember seeing.
 
It changed one or two firmwares ago, now the filter does affect the HSC. It has bitten me on the backside a couple of times.
 
It changed one or two firmwares ago, now the filter does affect the HSC. It has bitten me on the backside a couple of times.

Ah, good to know. Looks like the filter times can be much faster, now, as well
 

Similar Topics

Hello, I use S7_1200. I Will measure frequency 5-100Hz. Any disadvantages or problems to consider if I use a Hardware HSC set to frequency and 1s?
Replies
5
Views
1,809
Hello all, I have a strange problem with a high speed counter with a s7-1200. I have set up the hack input - it is a 2 channel a/b type which...
Replies
2
Views
2,331
I am working with a 1214 siemens plc and I have connected the pulse output of a flowmeter into the digital input of the cpu with the HSC enabled...
Replies
2
Views
4,146
I am doing a PF correction and am using a micrologix 1200. I am trying to find the difference between 2 counts from my high speed counter. Is...
Replies
0
Views
1,158
I am using HSC_1 in S7-1200,Encoder has PPR 1000. In properties using external Reset option I can reset the HSC at 1000. But unable to reset at...
Replies
2
Views
4,931
Back
Top Bottom