Nos marques

Bienvenue sur le site Web de Schneider Electric

Bienvenue sur notre site Web.
		
En quoi pouvons-nous vous aider aujourd'hui ?
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 Belgium

Pièce(s) jointe(s)
scadapack474_counter.rcz [162.99 KB]
En savoir plus
Gamme :
En savoir plus
Gamme :
  • Documentation produits
  • Téléchargement de logiciels
  • Sélecteur de produits
  • Substitution et remplacement de produits
  • Centre d'aide et de contact
  • Trouver nos sites
  • Obtenir un devis
  • Où acheter
  • Communauté Schneider Electric
  • Carrières
  • Qui sommes-nous ?
  • Signaler une mauvaise conduite
  • Accessibilité
  • Salle de presse
  • Partenaires
  • EcoStruxure
  • Nos emplois
  • Blog
  • Soyez informé des nouveautés en premier ?
  • Protection des données
  • Mention sur les cookies
  • Conditions d utilisation
  • Conditions générales de vente et d'achat
  • Change your cookie settings