AdvancedHMI Software

General Category => Support Questions => Topic started by: Dufniall89 on August 09, 2021, 05:07:39 PM

Title: creaating a counter using datasubscriber and clearing counts after 60 sec
Post by: Dufniall89 on August 09, 2021, 05:07:39 PM
Hello everyone,

    i'm working on a project, but i keep getting stuck and i want to make sure i'm doing it the right way... lol if there is such a thing.

in short i have a PLC "item[0].Sort.Destination" i need to count every time there is a value of 2 or 3 each one will add a plus 1 so their counter and clear the counter after a set time.
 
   i'm looking at using the datasubscriber to get the value and an if statement to add to the counter, and an if statement to clear the count once the set time is reached.

more to follow as i write more code...
Title: Re: creaating a counter using datasubscriber and clearing counts after 60 sec
Post by: MajorFault on August 09, 2021, 05:57:20 PM
Why can't this be done in the PLC?
Title: Re: creaating a counter using datasubscriber and clearing counts after 60 sec
Post by: Dufniall89 on August 10, 2021, 09:36:08 AM
I suppose it could be, but i'm trying to make something like a SCADA to monitor the volume going to different destinations. it might be a better project for ignition... but i don't know
Title: Re: creaating a counter using datasubscriber and clearing counts after 60 sec
Post by: MajorFault on August 10, 2021, 10:53:06 AM
it might be a better project for ignition... but i don't know
If you have a choice between AHMI and Ignition, then yes use Ignition. 

But, your example and request really makes no sense to be done in the HMI... any HMI.  If you want to increment a counter, that is a job for the PLC.
Title: Re: creaating a counter using datasubscriber and clearing counts after 60 sec
Post by: bachphi on August 10, 2021, 12:22:23 PM
IT?
Title: Re: creaating a counter using datasubscriber and clearing counts after 60 sec
Post by: MajorFault on August 11, 2021, 08:53:47 PM
IT?
WAS?