Hands-On RTAC Session Tag Processor Exercise Figure 1 Connection Diagram Tag Processor in the RTAC In the DNP3 Server and Introduction to the Tag Processor Exercise, the Tag Processor was introduced as a simple mapping tool to move tag data between intelligent electronic devices (IEDs). The Tag Processor can also be used to perform simple calculations, such as analog scaling and complex IEC 61131-3 calculations. It can be used to perform conditional statements using IEC 61131-3 logic expressions. It also can log and alarm changes in the states of tag values. In addition, there are a number of special Tag Processor functions that can be found in Section 3 of the ACSELERATOR RTAC SEL-5033 Software Instruction Manual. This exercise will explore some of these functions. Exercise Step 1. Scale the value of Control_Center_DNP.AI_0008 that references a phase-to-phase voltage by dividing by 1000 to report it in kv. To perform this calculation, you must use the real value in the magnitude portion of the tag type measured value (MV). Figure 2 Perform Simple Calculation Tag Processor Exercise Page 1 of 8 20120723
Step 2. Perform the same scaling operation on the other two voltages, but this time, use the SCALE_MV Tag Processor function. Use a ceiling of 32767 and a floor of 0, with no offset in the function. The SCALE_MV function scales the instmag using the following input parameters: IN : MV SCALE : REAL OFFSET : REAL CEILING : REAL FLOOR : REAL The output returns the following modified MV tags: instmag is the result of (* Calculate the scaling *) SCALE_MV.instCVal.mag:= IN.instMag * SCALE + OFFSET; (* Check for ceiling and floor *) IF SCALE_MV.instMag > CEILING THEN SCALE_MV.instMag := CEILING; END_IF IF SCALE_MV.instMag < FLOOR THEN SCALE_MV.instMag := FLOOR; END_IF t is the time of IN q is the quality of IN Figure 3 SCALE_MV Function Tag Processor Exercise Page 2 of 8 20120723
Step 3. Use the SCALE_MV function to report Feeder_1 kw, kvar, and kva to Control_Center_DNP.AI_0004, Control_Center_DNP.AI_0006, and Control_Center_DNP.AI_0007. Step 4. Figure 4 SCALE_MV Function Use Control_Center_DNP.AI_0012 as the destination tag to provide total power factor, using P and Q. Calculate power factor with the formula COS(ATAN(VAR/W)): COS(ATAN(Feeder_1_SEL.FM_INST_Q.instMag/Feeder_1_SEL.FM_INST_P.instMag)) Figure 5 Power Factor Calculation Tag Processor Exercise Page 3 of 8 20120723
Step 5. Use Control_Center_DNP.BI_0029 as the destination tag to provide the results of an OR expression of Feeder_1_SEL.FM_INST_PB5A_LED and Feeder_1_SEL.FM_INST_PB6A_LED. The OR function must be performed on the stval attribute of the tag, not on the entire SPS structure. Step 6. Figure 6 Tag Processor OR Statement Use Control_Center_DNP.BI_0030 as the destination tag to provide the results of an OR expression of Feeder_1_SEL.FM_INST_PB7A_LED and Feeder_1_SEL.FM_INST_PB8A_LED. This time, use the OR_SPS function in the Tag Processor. The OR_SPS function performs a logical OR on the stval of two SPS tags using the following inputs: IN1, IN2 : SPS. The output returns a modified SPS tag as follows: stval is the result of IN1.stVal OR IN2.stVal time is the most recent time between the two input SPS tags q is the result of an OR operation on each quality bit between the two SPS tags to reflect the worst case Figure 7 Tag Processor OR_SPS Function Tag Processor Exercise Page 4 of 8 20120723
Step 7. The Tag Processor can also be used to log the status point changes. Change the view by right-clicking on Drag a column header here to group by that column (shown near the top of Figure 8) and selecting the Logging view. You can also change the Tag Processor view from the Options button on the top right-hand corner of the Tag Processor window. Append a few more lines, creating a logger function for the 52A status from Feeder 1. Insert a Destination Tag Name, and change the Logging Alarm Enable parameter to True. Create a Logging Category called 'Feeder 1', and create a Logging On Message and Logging Off Message. Step 8. Figure 8 Tag Processor Logging Layout Create an alarm logger to log communications failures of all your devices. Log them to a group called 'Communications'. Figure 9 Create Alarm Logger Tag Processor Exercise Page 5 of 8 20120723
Step 9. Save and send your settings to the RTAC. View the Control_Center_DNP analog tags, and confirm that your scaling is working as expected. Figure 10 Control Center Scaled Analogs Tag Processor Exercise Page 6 of 8 20120723
Step 10. Check your calculation for power factor to ensure it is correct. Confirm that the validity is good for the point as well. Then disconnect the serial cable between the RTAC and the SEL-751 Feeder Protection Relay. What happens to the validity of the power factor calculation point compared with the other points? Figure 11 Online Power Factor Calculation The simple calculations made on the instantaneous magnitudes do not take into account the quality. When communication goes offline for a device, the quality becomes invalid. The scaling functions pass the quality on from the source data to the destination tag, so the quality of the source data is reflected in the DNP3 server tag. Tag Processor Exercise Page 7 of 8 20120723
Step 11. Check the results of your OR and OR_SPS statements for BI_0029 and BI_0030. The OR_SPS function addresses the quality and time attributes in the tag structure, so it is a better choice to use in a DNP3 server application. Shown in Figure 12 with the cable disconnected to the feeder relay, BI_0029 is still showing good quality and BI_0030 is invalid. Figure 12 Tag Processor OR_SPS Function More details regarding logic and how to perform these operations will be provided in the IEC 61131 Logic Exercise. Step 12. Reconnect the serial cable, and perform some operations on the breaker. Log in to the RTAC web server, and view the event changes and communications alarms that you created. Figure 13 Sequence of Events (SOE) Report in RTAC Web Server Tag Processor Exercise Page 8 of 8 20120723