User Guide > Objects > Working with Objects > UC_CAUSE* Readbuffer Variables

UC_CAUSE* ReadBuffer Variables

In some situations it is helpful to use the scripts of executable objects to read specific variables from the read buffer. The supplied values are derived from the activating object.

Values for read buffer variables are only available if the object has been activated via:

If the task has been activated in a different way, the variables do not include a value.

The following read buffer variables are available: 

You can retrieve the values using the script statement :READ. The following example reads all variables and then outputs their values in the report:

:READ &UC_CAUSE_NAME,,
:
READ &UC_CAUSE_NR,,
:
READ &UC_CAUSE_STATE,,
:
READ &UC_CAUSE_RETCODE,,

:PRINT "Causing task:"
:PRINT "Name: &UC_CAUSE_NAME"
:PRINT "RunID: &UC_CAUSE_NR"
:PRINT "Status: &UC_CAUSE_STATE"
:PRINT "Return code: &UC_CAUSE_RETCODE"

Notification objects of type ALARM include a script which can be used to read this data and write it to the notification text.