Access the ALARMBUFFER object

The ALARMBUFFER object is part of the Publisher/Subscriber infrastructure. The Publisher/Subscriber infrastructure is part of the Logix controller communication subsystem. The Logix controller communication subsystem implements Publisher/Subscriber messaging patterns for CIP, which lets other devices receive messages sent by the controller subsystem. Currently, Digital and Analog Alarms and Batch Equipment Phase subsystems use the Publisher/Subscriber Infrastructure to deliver messages through CIP to subscribing applications.
Use the ALARMBUFFER object to help you determine the existence of connections to the Publisher/Subscriber subsystem and their status. An AlarmBuffer object instance exists for every subscribing application. This means that an AlarmBuffer object may exist at one point in time, but not exist at another time. For this reason, a Get System Value (GSV) instruction returns a status as part of the destination tag (INT[0].0). When the status bit is zero, this most likely means that the AlarmBuffer object no longer exists.
Attribute
Data Type
Instruction
Description
AlarmBufferInstance
DINT[n]
GSV
Returns the AlarmBuffer object IDs.
DINT[0]
Number of AlarmBuffer objects.
DINT[1...(n-1)
AlarmBuffer object IDs.
If the number of AlarmBuffer objects is greater than n-1, only the IDs of the first (n-1) objects are returned.
You do not have to specify an AlarmBuffer Instance ID for this attribute.
AlarmBufferStatus
INT[2]
GSV
Returns the status of the specified AlarmBuffer object. You have to specify the AlarmBuffer Instance ID to get the status of that individual instance.
INT[0].0
1-AlarmBufferStatus Attribute is valid.
0-AlarmBufferStatus Attribute is invalid.
INT[1]
AlarmBuffer Status Attribute value.
The Status attribute contains the following:
INT[1].0
1-Multi-message packets enabled.
0-Multi-message packets disabled.
INT[1].1
1-Buffer is enabled.
0-Buffer is disabled.
INT[1].2
1-Data stored in the buffer.
0-Buffer is empty.
INT[1].3
1-Buffer is full.
0-Buffer is not full.
INT[1].4
1-Initialization Status messages WILL NOT be sent (at subscription time and on Redundancy switchover).
0-Initialization Status messages WILL be sent.
All other bits are reserved and are set to 0.
BufferSize
INT[2]
GSV
Returns the buffer size (in kB) of the specified AlarmBuffer Object. You have to specify the Alarm Buffer Instance ID to get the buffer size of that individual instance.
INT[0].0
1-BufferSize Attribute is valid.
0-BufferSize Attribute is invalid.
INT[1]
Buffer Size Attribute value.
BufferUsage
INT[2]
GSV
Returns the percentage of buffer space used by the specified AlarmBuffer Object. You have to specify the AlarmBuffer Instance ID to get the buffer usage value of that individual instance.
INT[0].1
1-BufferUsage Attribute is valid.
0-BufferUsage Attribute is invalid.
INT[1]
BufferUsage Attribute value.
SubscriberName
STRING
GSV
Returns the subscriber name of the specified AlarmBuffer object. You have to specify the AlarmBuffer Instance ID to get the subscriber name of that individual instance.
Any string type can be referenced as a destination tag.
If the Subscriber Name cannot fit into the provided destination tag string, then only the part of the name that can fit in the destination tag is provided by the instruction.
If the AlarmBuffer object instance specified by the instance ID does not exist when the instruction is called, then the string length (.LEN member) is set to zero.
Note that if no subscriber name is provided when AlarmBuffer object is created by a subscriber, then the subscriber name attribute is set to a device serial number associated with a connection through which the Create service on the AlarmBuffer object was called.
GSV Instruction Example
Your program can contain a GSV instruction to obtain the list of current AlarmBufferInstances in the controller. This instruction will return the total count of alarm buffer objects currently present in the controller (DINT[0]) along with the associated AlarmBuffer object Instance ID (DINT[1] – DINT[n-1]) for each AlarmBuffer object that is present in the controller. The GSV instruction displays the value of the number of AlarmBuffer objects (DINT[0]) under the Dest (destination) tag name.
Your program can use the AlarmBuffer object Instance ID to obtain information related to a specific instance of the AlarmBuffer object that is present in the controller. A status word (INT[0]), indicating valid or invalid data, is returned in the destination tag for the AlarmBufferStatus, BufferSize, and BufferUsage attributes, as the alarm buffer objects can be created and deleted at any time. The returned value is in (INT[1]) when the Attribute Name equals AlarmBufferStatue, BufferSize, or BufferUsage. The returned value is the subscriber name when the Attribute Name is SubscriberName. No status is returned for the SubsriberName attribute.
ladder_icon Ladder Diagram
Following is an example of the GSV instruction retrieving the AlarmBuffer object IDs.
GSV instruction RLL retrieving the AlarmBuffer
Although the GSV of the AlarmBufferInstances returns the values into an array, you cannot use the array address to get attribute values for that instance. You must copy or move the value in myAlarmBufferInstances[x], (where x = 1, 2, 3,...) to a direct (unindexed) tag like the myAlarmBufferID shown in the following illustration.
Following is an example of the GSV instruction retrieving the buffer size of the AlarmBuffer object.
The number that is displayed under the Dest (destination) tag name is the valid or invalid bit value when the Attribute Name is AlarmBufferStatus, BufferSize or BufferUsage.
Structured Text
Following is an example of the GSV instruction retrieving the AlarmBuffer object IDs.
GSV(AlarmBuffer, AlarmBufferInstances, myAlarmBufferInstances[0]);
Following is an example of the GSV instruction retrieving the AlarmBuffer Object.
GSV(AlarmBuffer, myAlarmBufferID, BufferSize, myBufferSize[0]);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.