Our Brands

Impact-Company-Logo-English Black-01-177x54

Welcome to the Schneider Electric Website

Welcome to our website.
		
How can we help you today?
You are currently viewing the content available in Vietnam. If you are looking for information for another region, please select the correct country from the top-left dropdown in the page and 'Navigate to Browse FAQs' in the Support menu.
SCADAPack 474: Logic Blocks for Pulse Counting and DI-Based Reset

This article explains how to implement a pulse counting mechanism using SCADAPack 474 logic, leveraging a soft counter and a digital input (DI) for reset functionality. The logic is designed to work with physical I/O constraints, where the external counter retains its value and cannot be reset to zero.


Connections

  • Pulse Input: Connect the pulse signal to PIO_SP474_CI1, which acts as the physical counter input.
  • Soft Counter: Use a SoftCounter variable to track the pulse count logically.
  • Reset Input: Connect a digital input to PIO_SP474_DI1, which will be used to trigger a logical reset.

Key Logic Operations

  1. Copy Counter Value to SoftCounter
    The current value from PIO_SP474_CI1 is copied to SoftCounter.VALUE during each scan cycle.

  2. Reset Temporary Counter Value
    A MOVE block resets tempCounterValue when required.

  3. Trigger-Based Reset Using DI1
    When PIO_SP474_DI1 transitions from high to low (falling edge), the value of PIO_SP474_CI1 is loaded into tempCounterValue. This simulates a reset by establishing a new reference point.

  4. Calculate Difference and Update SoftCounter
    The logic compares PIO_SP474_CI1.VALUE with tempCounterValue using GT, LT, and EQ blocks.
    Based on the comparison, a SUB_UDINT block calculates the difference and updates SoftCounter.VALUE.


Working Principle

Since the physical counter (PIO_SP474_CI1) cannot be reset, the logic uses a reference value (tempCounterValue) to simulate a reset. The SoftCounter reflects the number of pulses counted since the last reset trigger, calculated as:

The below image shows a screenshot of the counter working principle.

Working principle of the counter

This approach ensures accurate pulse tracking while respecting the hardware limitations of SCADAPack I/O.

Schneider Electric Vietnam

Attachment(s)
scadapack474_counter.rcz [162.99 KB]
Explore more
Range:
Users group

Discuss this topic with experts

Visit our community and get advice from experts and peers on this topic and more
Explore more
Range:
  • Products Documentation
  • Software Downloads
  • Product Selector
  • Product Substitution and Replacement
  • Help and Contact Center
  • Find our Offices
  • Get a Quote
  • Where to buy
  • Schneider Electric Community
  • Careers
  • Company Profile
  • Report a misconduct
  • Accessibility
  • Investors
  • EcoStruxure
  • Job Search
  • Blog
  • Privacy Policy
  • Cookie Notice
  • Terms of use
  • Change your cookie settings