Welcome, Guest
Username: Password: Remember me

TOPIC: Add Date and Time to ASUP->DetectText attribute

Add Date and Time to ASUP->DetectText attribute 5 years 5 months ago #9884

  • barnes
  • barnes's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 92
  • Karma: 0
Is there a way to print the date and time or other variables in the ASUP-DetectText attribute? I can see the alarm in the event list. It has a date and time but no alarm value.


Concatenate ("DetectText", $Date, $Time, $Variable) at the time of the alarm event
The administrator has disabled public write access.

Add Date and Time to ASUP->DetectText attribute 5 years 5 months ago #9886

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi barnes,

If you use a DSup instead the text can be modified in a DataArithm before the dsup is triggered.

/Claes

dsup.png
The administrator has disabled public write access.

Add Date and Time to ASUP->DetectText attribute 5 years 5 months ago #9887

  • barnes
  • barnes's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 92
  • Karma: 0
Thank you for the hints. Here is what I came up with for the ASup. I had to use a digital value to latch the code so it would only execute once due to slowing the Proview PLC code down.



It seems to work but its a round about way to make it happen.
Last Edit: 5 years 5 months ago by barnes.
The administrator has disabled public write access.

Add Date and Time to ASUP->DetectText attribute 5 years 5 months ago #9888

  • barnes
  • barnes's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 92
  • Karma: 0
Although this seems to work, it is an awful lot of work for each ASUP/DSup tag.

It seems the correct place to do this would be in the operator place so that you only have to set this up once for all displayed alarms.

Any alarm that gets displayed could be concatenated with the date and time variables.


Where might I find this part of the runtime code?
The administrator has disabled public write access.

Add Date and Time to ASUP->DetectText attribute 5 years 5 months ago #9890

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
It's much more efficient to use a DataArithm and a GetData instead of GetObjectInfo()and SetObjectInfo().

The alarm text is copied from the alarm message to the display object in xtt/lib/xtt/src/xtt_evlist.cpp ItemAlarm::ItemAlarm().

/Claes
The administrator has disabled public write access.

Add Date and Time to ASUP->DetectText attribute 5 years 5 months ago #9891

  • barnes
  • barnes's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 92
  • Karma: 0
Thank you. I will take a look and post the results if I get it to work.
The administrator has disabled public write access.
Time to create page: 9.301 seconds