Welcome, Guest
Username: Password: Remember me

TOPIC: System Tag to Script

System Tag to Script 4 months 3 weeks ago #1748

  • arifcorp
  • arifcorp's Avatar
  • Offline
  • Senior Member
  • Posts: 44
  • Karma: 0
Hi Ruslan

I have question about one of the system tags, SystemCurrentDateTimeNewDay.

I believe it turn to 'true' when the new day happen. I had created a script (General, OnDataChange) to do certain action when the new day occur
ie

If (Tags.SystemCurrentDateTimeNewDay ==1)
{
Tags.TagA = 0;
Tags.TagB = 0
}

Will this work as what I intended for?

Thanks
The administrator has disabled public write access.

System Tag to Script 4 months 3 weeks ago #1749

  • fatkhrus
  • fatkhrus's Avatar
  • Offline
  • Administrator
  • Posts: 604
  • Thank you received: 91
  • Karma: -116
Hello,

Yes, it will work. That's the reason of creation this system tag. Provide possibility to catch new day happening.

Best regards,
Ruslan
The administrator has disabled public write access.

System Tag to Script 4 months 3 weeks ago #1750

  • arifcorp
  • arifcorp's Avatar
  • Offline
  • Senior Member
  • Posts: 44
  • Karma: 0
Dear Ruslan,

I observe the Tags.SystemCurrentDateTimeNewDay remains 'true' after the next day. Not returning to false. Is the status flip flop or will change false after a while
I'm not sure is this normal or isolated case.

Thanks
The administrator has disabled public write access.

System Tag to Script 4 months 3 weeks ago #1751

  • fatkhrus
  • fatkhrus's Avatar
  • Offline
  • Administrator
  • Posts: 604
  • Thank you received: 91
  • Karma: -116
Hello,

Yes, unfortunately there is a mistake. We'll fix it in the next version. At this moment you can use Tags.SystemCurrentDateTimeNewHour and comparing Tags.SystemCurrentDateTimeHour with 0.

Best regards,
Ruslan
The administrator has disabled public write access.

System Tag to Script 4 months 3 weeks ago #1752

  • arifcorp
  • arifcorp's Avatar
  • Offline
  • Senior Member
  • Posts: 44
  • Karma: 0
Noted with thanks
The administrator has disabled public write access.
Go to top