I just noticed that you changed the provider in all your tag paths to [~]
where I recommended [.]
. Are your tags in the root of a provider, or in a folder?
They are in default. I changed it back to [.] and it is still not working.
Can you clarify what .after does? I can’t find documentation for it
It is method of java.util.Date
, which is what Ignition uses for its datetime objects.
Is the if statement just comparing if offTS < onTS? and vice versa in the If NOT
>
, but yeah.
Any ideas why this is not working still then? I had it working on my virtual machine many months ago, but now in the actual gateway I can’t get it going
I changed the tag path to [default] and now getting this. It only appears when the tag is off. When the bool is on, no errors
There's an extra opening square bracket in the writeBlocking.
Wow it is working now, Such a headache for an easy fix. Thanks
In the future, please paste code and errors as text, not screenshots, using the "Preformatted text" button in the forum's comment editor. That helps us find little things more easily.
Apologies, the gateway is not internet connected so it makes it a little more difficult. Thanks again
Runtime counters really should be in the PLC. If you want a "resettable" one add a button to store the current runtime total and display the difference between the stored one and the current one. You could even go so far as to have an array of the last couple reset totals. No need to reinvent the wheel.
As for manual entry to update the runtime from time to time I would make a protected field with a confirmation popup to change the total. This should also write all of the resettables to that new total value.
Agreed, I wouldn't ever design a system to store the runtime counter in the HMI. However, this is an old SMAR PLC, that I did not have a valid copy of and the tag names/descriptions are not stored in the PLC. Also do not have much experience working in SMAR.
They had the original runtime counter in a NI-Lookout system that bit the dust, hence the upgrade to Ignition. Being that the system is live and I don't have the knowledge with SMAR, opted to keep the runtime counter in the HMI