The text of a manual · part 11 of 19
ControlLogix Sequence of Events Module 1756-IB16ISOE (24/48V dc), 1756-IH16ISOE (125V dc) User Manual: 7 - Using The Sequence of Events Module in FIFO Mode, pages 97 to 106
Pages 97 to 106 of 160, from ControlLogix Sequence of Events Module 1756-IB16ISOE (24/48V dc), 1756-IH16ISOE (125V dc) User Manual
The original document is the PDF (2.3 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Allen-Bradley 1756-IB16
Page 97
Using The Sequence of Events Module in FIFO Mode
7-11
Table 7.3 Input Tags in FIFO Mode Tag name:
Set on a Per Point or Description: Modulewide basis:
I.Fault
Per point(1)
Indicates if a fault has occurred for the input. 0 = no fault 1 = fault – The fault can be chatter or communication fault as described below: • Chatter - The Sequence of Events module can detect chatter on individual inputs and will set the appropriate tag to 1 when chatter exists on an input. For example, if the module has detected chatter on input 4, I.Fault.4 = 1. • Communication fault - The controller sets this tag to 1 for all 32 bits if a communication fault occurs on the module. This tag clears when the fault that causes the condition no longer exists.
I.Data
Per point
(1)
Status of the input point. This data is filtered if the Input Filter feature is used on the module. Thus, an input change must pass through the filter before it is seen in this tag. 0 = input is OFF 1 = input is ON For example, if input 3 is ON, I.Data.3 = 1.
I.NewData
Per point(1)
Flag indicating if new timestamp data was detected on the input. 0 = no new timestamp data on the input 1 = new timestamp data on the input (since last acknowledged) Because input data for all inputs is sent immediately after each timestamped transition and at each RPI, this tag is useful to quickly determine on which input the transition occurred. For example, if the Sequence of Events module sends new input data to the owner-controller and I.NewData.5 = 1, you know that at least one of the timestamps for input 5 (i.e., I.Timestamp[5].OffOn or I.Timestamp[5].OnOff) has new data. This tag only clears when the controller acknowledges the new data or all events on the module are reset. For more information, see page 7-17.
I.EventOverflow
Per point(1)
Set for an input when the module either: • Does not timestamp an input transition – The module has Latch CST enabled and the module’s on-board buffer contains 160 timestamps. In this case, the module does not have room in its on-board buffer to store the timestamp from any additional events and does not timestamp new transitions. or • Overwrites previously-recorded timestamp data – The module has Latch CST disabled and the on-board buffer contains 160 events. In this case, the module continues to timestamp input events. When the module records new transitions, it records the data in its buffer and overwrites the timestamp data from the oldest transition of the 160. This value is cleared if the module is reset or when an event is acknowledged.
Publication 1756-UM528A-EN-P - April 2004
Page 98
7-12
Using The Sequence of Events Module in FIFO Mode
Table 7.3 Input Tags in FIFO Mode Tag name:
Set on a Per Point or Description: Modulewide basis:
I.EventNumber
Per point(1)
Running count of the timestamped input transitions; this tag increments by one with each new event. The event number is the identifier that uniquely indicates which event the Sequence of Event module is returning to the controller. When you copy this value to the O.EventAck tag, the Sequence of Events module begins producing the next event in its buffer, as the next event becomes the current event. This value is cleared if the module is reset, as described on page 7-20.
I.CSTTimestamp[2]
Per point
64-bit CST timestamp in CST format for the current event. This value is cleared after the data has been acknowledged via the O.EventAck tag. For more information on clearing timestamp data, see page 7-17.
I.UCTTimestamp[2]
Per point
64-bit UCT timestamp in Universal Coordinated Time format for the event. UCT is expressed as microseconds elapsed since 1 January 1972. Typically, UCT format is only used in applications that also use the 1756HP-GPS module. For more information on the 1756HP-GPS module, see Appendix B. This value is cleared after the data has been acknowledged via the O.EventAck tag. For more information on clearing timestamp data, see page 7-17.
I.EventPoint
Per point
Input that recorded the event. Values are 0 - 15, where 0 = Input 0, 1 = Input 1, etc.
I.EventData
Per point
Indicates if input transitioned OFF or ON. 0 = input transitioned OFF 1 = input transitioned ON
I.ReturningUCTTime
Modulewide
Indicates if timestamps are in UCT format rather than CST. Typically, UCT format is only used in applications that also use the 1756HP-GPS module. For more information on the 1756HP-GPS module, see Appendix B. 0 = CST format only (UCT timestamp = 0 1 = UCT format available also For more information on UCT format, see Appendix B.
I.EventsQueuedCount (1)
Modulewide
Number of events currently stored in the module’s buffer that have not been read.
With the Per point tags, there is one bit per input. For example, bit 0 represents input 0, bit 7 represents input 7 and so on.
Publication 1756-UM528A-EN-P - April 2004
Page 99
Using The Sequence of Events Module in FIFO Mode
7-13
Standard Retrieval In Standard Retrieval, the controller retrieves the data for each event in the order in which the events occurred. This retrieval method includes the following: 1. At each RPI, the Sequence of Events produces the current event in its on-board buffer. 2. The controller copies relevant input data from the current event to a separate data structure for later use. 3. The controller clears the current event from the Sequence of Events module’s on-board buffer by acknowledging the data via the module’s output word. 4. When the current event is cleared, the next event in the module’s on-board buffer becomes the new current event. If no other events are present, the event data will be 0. 5. The Sequence of Events module produces the new current event as described in step 1. This process continues as long as the Sequence of Events module timestamps input transitions and the controller continues to retrieve the data for each transition.
Publication 1756-UM528A-EN-P - April 2004
Page 100
7-14
Using The Sequence of Events Module in FIFO Mode
Producing Current Event Data Figure 7.2 shows an example of the Sequence of Events module producing the current data for the controller to retrieve it. IMPORTANT
Remember, the current event is data that the module is currently producing from its on-board buffer at each RPI. For more information on how the Sequence of Events module produces data from its on-board buffer, see page 7-2.
In the example, the Sequence of Events module produces data from the current event for the controller. Figure 7.2 Sequence of Events module
1. Module stores data in on-board buffer.
0110010 1100110 0100010 1100110 1010010 1100110 1010011 0000110 1100101
1001110 1110011
ControlLogix controller
2. Module produces current event data.
Current event I.Fault I.Data I.NewData I.EventOverlow I.EventNumber I.CSTTimestamp[2] I.UCTTimestamp[2] I.EventPoint I.EventData I.ReturningUCTTime I.EventsQueuedCount 43810
Publication 1756-UM528A-EN-P - April 2004
Page 101
Using The Sequence of Events Module in FIFO Mode
7-15
Copying Relevant Input Data to a Separate Data Structure At each RPI, the Sequence of Events module sends input data for the current event to the controller; the data is stored in the controller tags. We recommend you use a COP or CPS instruction to programmatically copy relevant input data from the controller tags to a separate array in the controller’s memory. IMPORTANT
When the Sequence of Events module sends current event data at the RPI, it sends data for all the tags described in Table 7.3 on page 7-11. You typically will only need data from specific tags, though. We recommend you only copy data from those tags to a separate array. For example, if you only need data from the: • event number (I.EventNumber.x) • CST timestamp (I.CSTTimestamp[2]) • event point (I.EventPoint.x) • event data (I.EventData.x) tags for your application, we recommend you only copy the data from those tags to a separate array.
Later, you can combine data from multiple Sequence of Events modules and use a Sort routine to determine the order of events, with relative time reference, that occurred in a specific time period.
Publication 1756-UM528A-EN-P - April 2004
Page 102
7-16
Using The Sequence of Events Module in FIFO Mode
Figure 7.3 shows when to use the COP or CPS instruction. In this example, the Sequence of Events module has produced current event data for the controller at the RPI. The controller copies the relevant input data from the controller tags to a separate data structure. Figure 7.3 Sequence of Events module
1. Module stores data in on-board buffer.
0110010 1100110 0100010 1100110 1010010 1100110 1010011 0000110 1100101
ControlLogix controller
2. Module produces current event data.
Current event I.Fault I.Data I.NewData I.EventOverlow I.EventNumber I.CSTTimestamp[2] I.UCTTimestamp[2] I.EventPoint I.EventData I.ReturningUCTTime I.EventsQueuedCount
1001110 1110011
43811
Controller tags
3. Controller copies relevant data from controller tags to a separate array.
I.Fault I.Data I.NewData I.EventOverlow I.EventNumber I.CSTTimestamp[2] I.UCTTimestamp[2] I.EventPoint I.EventData I.ReturningUCTTime I.EventsQueuedCount
Separate array
Figure 7.4 shows an example of ladder logic in which the controller only moves the input number (I.EventPoint) and copies the CST timestamp (I.CSTTimestamp) from the controller tags to a separate data structure named Fifo_ExtractData[Index]. Figure 7.4
Publication 1756-UM528A-EN-P - April 2004
Page 103
Using The Sequence of Events Module in FIFO Mode
7-17
Acknowledging Latched Timestamp Data In FIFO mode, the Sequence of Events produces data for the current event data at each RPI until the data is acknowledged and, thus, cleared from the buffer. To clear data for the current event, and begin producing data for the next event in the Sequence of Events module’s on-board buffer when using Standard Retrieval, you must copy the event number from the current event (located in the I.EventNumber tag) to the module’s EventAck tag (i.e., O.EventAck). Figure 7.5 shows how to clear data for the current event from the Sequence of Events module. In this example, the controller has copied relevant input data from the controller tags to a separate data structure. The controller may use a COP or MOV instruction to copy the current event number to the Sequence of Events module’s O.EventAck tag and clear the data from the module’s on-board buffer. Figure 7.5
Sequence of Events module
1. Module stores data in on-board buffer. 0110010 1100110 0100010 1100110 1010010 1100110 1010011 0000110 1100101
1001110 1110011
Current event
ControlLogix controller
Controller tags 2. Module produces current event data. I.Fault I.Data I.NewData I.EventOverlow I.EventNumber I.CSTTimestamp[2] I.UCTTimestamp[2] I.EventPoint I.EventData I.ReturningUCTTime I.EventsQueuedCount
3. Controller copies relevant data from controller tags to a separate array.
I.Fault I.Data I.NewData I.EventOverlow I.EventNumber I.CSTTimestamp[2] I.UCTTimestamp[2] I.EventPoint I.EventData I.ReturningUCTTime I.EventsQueuedCount
Separate array
43812
4. To clear the current event from the Sequence of Events module buffer, the controller copies the current event number (I.EventNumber) to the O.EventAck tag.
Once the current event data is cleared from the Sequence of Events module’s buffer, the module begins producing data for the next event in its buffer at each RPI because that event has become the current event. At this point, the process returns to Producing Current Event Data on page 7-14.
Publication 1756-UM528A-EN-P - April 2004
Page 104
7-18
Using The Sequence of Events Module in FIFO Mode
Retrieval by Point Retrieval by Point is similar to Standard Retrieval by time except that with this method, the controller only retrieves timestamp data for input transitions that occurred on a specific point. The Sequence of Events module still timestamps input transitions for any events that occur on Enable CST Capture-enabled inputs. The module also stores the data in its on-board buffers as described on page 7-2 for up to 160 input transitions. IMPORTANT
Although the Sequence of Events module can still store the data for up to 160 timestamped transitions in its on-board buffer when you use the Retrieval by Point method, the module only stores up to 10 timestamps per input. You must manage the module buffer effectively to make sure that the module timestamps all transitions on a specific input. Consider the following example: You are using Retrieve by Point to retrieve timestamp data from input 4, and 10 of the first 34 input transitions that the Sequence of Events module timestamps occur on input 4. If Latch CST is enabled for the module and you fail to clear any of the timestamp data for input 4 before the input transitions again, the Sequence of Events module will not timestamp the next transition for input 4, even though there are 126 slots still available in the module’s on-board buffer.
Publication 1756-UM528A-EN-P - April 2004
Page 105
Using The Sequence of Events Module in FIFO Mode
7-19
Additional Module Settings Required with Retrieval by Point Method By default, the Sequence of Events module operates as if the controller will use Standard Retrieval to retrieve data. To use the Retrieval by Point method, you must change the following two tags in the module’s output word: • O.RetrieveByPoint = 1 (default value is 0) • O.PointtoRetrieve = input point for which you want the controller to retrieve data – For example, if you want to retrieve the data for input 10, you must change this tag to 10.
Retrieval Process Similar to Standard Retrieval After you make the output tag changes listed above, the controller retrieves the data for each transition on the specified input in the order in which the transitions occur. The steps to retrieve the data are the same as those described on page 7-13. The only exception to the process is that in Retrieval by Point, the current event is not necessarily the data in the first slot of of the on-board buffer. Instead, the current event is the first slot (out of the full 160) that contains data for a transition timestamped at the specified input. For example, if you are using Retrieval by Point to retrieve data for input 7 and the first transition that occurs on input 7 is the 5th transition the module timestamped, the current event is located in slot 5 of the module’s on-board buffer, as shown in Figure 7.6. Figure 7.6
0110010 1100110 0100010 1100110 1010010 1100110 1010011 0000110 1100101
1 2 3 4 5 6 7 8 9
4 2 8 11 7 1 2 9 10
1 0 0 1 1 1 0 159 12 1 1 1 0 0 1 1 160 5
0 1 1 0 0 0 1 1 0
0 1
Current event – The module produces the data in this slot because the controller is using the Retrieve by Point method to retrieve data. In this example: • O.RetrieveByPoint = 1 • O.PointtoRetrieve = 7 43813
Publication 1756-UM528A-EN-P - April 2004
Page 106
7-20
Using The Sequence of Events Module in FIFO Mode
Clearing All Data From the Module’s Buffers At Once
If necessary, you can reset the events in the Sequence of Events module’s on-board buffers, in effect clearing all data from previously timestamped transitions. In other words, when all data is cleared from the module’s buffers, all of the module’s input tags return to 0, except data that is a live, filtered view of the inputs. To reset events in the module’s buffer, transition the O.ResetEvents tag to 1 as described below: • If the bit = 0, change the bit to 1. • If the bit = 1, change the bit to 0, wait for at least one RPI, and change the bit to 1. Once the data is cleared, the module begins timestamping input transitions normally and storing them in its on-board buffer.
Changing Between Retrieval Methods
When using the Sequence of Events module in FIFO mode, you may determine that you need to change retrieval methods. You can change retrieval methods, but keep the following in mind before doing so: • The change will NOT take effect until all events are acknowledged/cleared from the module’s buffers. • When you change retrieval methods dynamically, the ideal way is to reset events in the module buffers (as described above) and immediately switch FIFO retrieval modes. Make sure you do not need the data being cleared from the module buffer prior to resetting events. To change retrieval methods, change the O.RetrieveByPoint tag to the new method. • To use the standard retrieval by time method, O.RetrieveByPoint = 0 • To use the retrieval by point method, O.RetrieveByPoint = 1
Chapter Summary and What’s Next
Publication 1756-UM528A-EN-P - April 2004
In this chapter, you read about using the Sequence of Events module’s features. Chapter 8 describes the Troubleshooting the Sequence of Events Module.