Kkula
Browse Questions » SIMATIC S7-200: Hsc Instruction not working properly

About User

Questions Asked: 20.9K

Answers Given: 32

0
  • Open

SIMATIC S7-200: Hsc Instruction not working properly

Hi Forum,
I have prepared a refrence PTO for milisec counting,
When ever i run the program i do not get consestincy in the counting by HSC,
It always lags the PV by 1count or so on.
What should i do to get the perfect counting consistently
Actually am preparing a program for a packaging machine where i need to keep a valve on for set mSec time, so i generated a pulse via Q0.0 and connected it directly to I0.0, so is the program which i have attached here. i have set the time for 500mSec but it calculates 1 count less after every few constant values,
Plz help.

0 Likes 0 Favourites 0 Followers 0 Comments
Answers(1)

Siemens Self Support: In HSC counting, inconsistency (lagging by 1 count) often stems from jitter or timing variations in the input signal (I0.0). Here's a troubleshooting approach: 1. **Signal Quality:** Ensure a clean, fast-rising/falling edge on Q0.0. Use a short cable and consider filtering if needed. 2. **HSC Configuration:** Verify your HSC configuration (capture/evaluation mode, filter settings) in the hardware config. 3. **Interrupt Handling:** High CPU load can impact HSC accuracy. Optimize your code to minimize cycle times. 4. **PV vs. HSC:** Understand the difference between PV (Process Value) and HSC. They represent different data. HSC directly counts pulses; PV might have additional processing. 5. **Debouncing:** Implement debouncing for I0.0 if necessary, to avoid multiple counts from a single pulse. Please share your TIA Portal project for a detailed review if the problem persists.

0