Global Counter is a powerful utility designed to manage persistent numeric values that need to exist beyond the lifespan of a single job or flow. Whether you need to track daily production totals, generate unique invoice numbers, or synchronize data between completely separate flows, this app provides a centralized solution.
Global Counter utilizes a centralized JSON database with advanced file-locking mechanisms. This ensures that your counters remain accurate and uncorrupted, even when multiple flows (or multiple Switch servers sharing a network drive) attempt to access or update them simultaneously.
Multi-Counter Operations: Configure up to 5 distinct counters within a single flow element. Perform complex logic in one step (e.g., "Get JobID", "Increment DailyTotal", and "Check BatchLimit").
Flexible Actions: Choose to Get (retrieve to Private Data), Set (update database), or Get & Set simultaneously.
Advanced Math: Go beyond simple +1 counting.
Increment: Add, Multiply, or Power (exponent).
Decrement: Subtract, Divide, or Root.
Fixed: Force a specific static value.
Bounds & Limits: Restrict your counters to a specific range (Min/Max).
Clamp: Stick to the limit (e.g., a progress counter that never exceeds 100%).
Rollover: Automatically loop values (e.g., 1–10 then back to 1).
Error: Fail the job if a limit is reached (e.g., "Daily ticket quota exhausted").
Smart Reset Triggers: Automate your counting logic with powerful schedules:
Periodic - Calendar: Reset automatically at Midnight (Daily), Weekly, Monthly, Quarterly, or Yearly.
Periodic - Interval: Reset after a set duration (e.g., every 30 minutes).
Fixed Date: Reset at a specific timestamp.
Data Formatting: Automatically format retrieved values with customizable padding (e.g., turn 1 into 0001), prefixes, and suffixes.
Reliability:
Atomic Writes: Uses temporary files and safe rename operations to prevent partial data writes.
Corruption Recovery: Automatically detects JSON corruption and creates backups to keep production moving.
Network Tunable: Configurable retry policies (stale timeout, min/max wait) specifically designed for high-latency network storage.
Storage: Stores data in a standard gc.json file. You can use the default Switch backing folder or specify a custom path (e.g., a network share) for multi-server access.
Output: Returns values as Private Data attached to the job (e.g., [CounterKey]-get or [CounterKey]-set).
Connections: Includes explicit "Success" and "Error" traffic light connections for robust error handling.
Significans Automation Inc. specializes in delivering next-generation automation to the Printing and Packaging industry. The company offers programming and expertise in custom workflow development, communication and project management, color management, prepress training, and end-to-end business integration. The company is driven by the conviction that customized automation is the only path forward.