Download PTQ 101M User Manual
Transcript
Configuring the Processor with Concept 2.5 PTQ-101M ♦ Quantum Platform IEC 60870-5-101 Master Communication Module How to Set up and Use the Sample Function Block for Concept 2.5.1 EVENTFB Function Block Overview The purpose of the EVENTFB sample function block is to transfer the events into a buffer that consists of an array of elements that stores all data in a convenient format for the user. The block 9903 passes data into a compacted format thus occupying the minimum amount of registers. For example, the block 9903 originally reserves the same register for Hour and Minute (one byte for each value), so the user application would need to extract each value. The EVENTFB sample function block already extracts each event value into a separate register. The following illustration shows the structure of each element of the buffer (extracted from the data type definition file). TYPE EVENT101: STRUCT Session : WORD; (* Session configured for this Master *) Sector : WORD; (* Sector configured for this session *) COT : WORD; (* Cause of transmission of the event message *) Reserved : WORD; (* Reserved*) PointIndex : ARRAY[0..1] OF WORD; (* This is the point index in remote device that generated the event*) ASDU : WORD; (* ASDU Type *) Milliseconds: UINT; (* Timestamp - milliseconds *) Seconds: UINT; (* Timestamp - Seconds * Minutes: BYTE; (* Timestamp - minutes and hours *) Hours: BYTE (* Timestamp - minutes and hours *) Month : BYTE; (* This contains the month of the event occurred*) Day : BYTE; (* This contains the day of the Event occurred*) Year: WORD ; (* This contains the year the event occurred *) Qualifier: WORD; (* Point qualifier, quality/sequence value see protocol specification*) Value: ARRAY[0..1] OF WORD; (* Data value - data size depends on ASDU type *) END_STRUCT; END_TYPE The data structure that stores the incoming events consists on a circular buffer that can store up to 199 events. So the buffer consists on an array of 199 "EVENT101" elements presented previously. The element index can vary from 0 to 199. If the last event updated was located at index 199 then the next event will be copied to index 0. The following illustration shows an instance example of the EVENTFB function block. ProSoft Technology, Inc. May 14, 2008 Page 23 of 181