A Structural Testing Strategy for PLC Programs Specified by Function Block Diagram

함수 블록 다이어그램으로 명세된 PLC 프로그램에 대한 구조적 테스팅 기법

  • 지은경 (한국과학기술원 전자전산학과) ;
  • 전승재 (삼성전자 Visual Display 사업부) ;
  • 차성덕 (고려대학교 정보통신대학 컴퓨터.통신공학부)
  • Published : 2008.03.15

Abstract

As Programmable Logic Controllers(PLCs) are frequently used to implement real-time safety critical software, testing of PLC software is getting more important. We propose a structural testing technique on Function Block Diagram(FBD) which is one of the PLC programming languages. In order to test FBD networks, we define templates for function blocks including timer function blocks and propose an algorithm based on the templates to transform a unit FBD into a flowgraph. We generate test cases by applying existing testing techniques to the generated flowgraph. While the existing FBD testing technique do not consider infernal structure of FBD to generate test cases and can be applied only to FBD from which the specific intermediate model can be generated, this approach has advantages of systematic test case generation considering infernal structure of FBD and applicability to any FBD without regard to its intermediate format. Especially, the proposed method enables FBD networks including timer function blocks to be tested thoroughly. To demonstrate the effectiveness of the proposed method, we use trip logic of bistable processor of digital nuclear power plant protection systems which is being developed in Korea.

프로그래머블 로직 컨트롤러(PLC: Programmable Logic Controller)가 안전성이 중요한 실시간 시스템 구현에 많이 사용되면서, PLC 프로그램에 대한 테스팅의 중요성이 날로 높아지고 있다. 본 논문에서는 PLC 프로그래밍 언어 중 하나인 함수 블록 다이어그램(FBD: Function Block Diagram)에 대한 구조적 테스팅 방안을 제안한다. FBD를 테스트하기 위해 먼저 타이머 함수 블록을 비롯한 각 함수 및 함수 블록에 대한 흐름그래프 템플릿을 정의하고, 템플릿을 기반으로 한 변환 알고리즘을 제안하며, 알고리즘을 따라 FBD로부터 변환된 흐름그래프에 기존의 제어 흐름 테스팅 커버리지와 데이타 흐름 테스팅 커버리지를 적용한다. 기존 FBD 테스팅은 테스트 케이스 생성시 FBD 내부 구조를 고려하지 않으며, FBD 프로그램으로부터 특정 중간단계 모델을 생성해 낼 수 있는 경우에만 적용될 수 있는 단점을 가진 반면, 본 논문에 제안된 방법은 FBD 내부 구조를 고려한 체계적 테스트 케이스 생성이 가능하며, 중간단계 모델의 형식에 관계없이 어떤 FBD에도 적용될 수 있다는 장점을 가진다. 특히 제안된 기법은 여러 실행주기에 걸쳐 테스트 되어야 하는 타이머 함수 블록을 포함한 FBD에 대한 철저한 테스팅을 가능하게 한다. 제안된 기법을 현재 원전계측제어시스템 개발사업단에서 개발 중인 디지털 원자로 보호계통 비교논리 프로세서 트립 논리에 적용하여 그 효과를 확인하였다.

Keywords

References

  1. A. Mader, "A Classification of PLC Models and Applications," Proc. WODES 2000: 5th Workshop on Discrete Event Systems, Gent, Belgium, Aug. 21-23, 2000
  2. IEC, International Standard for Programmable Controllers: Programming Languages (Part 3), 1993
  3. S. Richter and J. Wittig, "Verification and validation process for safety I&C systems," Nuclear Plant Journal, pp.36-40, May-June 2003
  4. L. Baresi, M. Mauri, A. Monti, and M. Pezze, "PLCTOOLS: Design, Formal Validation, and Code Generation for Programmable Controllers," Formal methods in PLC programming Special Session at IEEE Conference on Systems, Man and Cybernetics (SMC'2000), Nashville, USA, Oct. 8-11, 2000
  5. KNICS, Korea Nuclear Instrumentation and Control System Research and Development Center, http://www.knics.re.kr
  6. R. Lewis. "Programming industrial control systems using IEC 1131-3 Revised Edition (IEE Control Engineering Series)," The Institute of Electrical Engineers, 1998
  7. Paul C. Jorgensen, "Software testing: a craftsman's approach," CRC Press, 1995
  8. M. Bani Younis and G. Frey, Formalization of Existing PLC Programs: A Survey, Proceedings of CESA 2003, Lille, France, July, 2003
  9. G. Frey and L. Litz, Formal Methods in PLC Programming, Proceedings of the IEEE Conference on Systems, Man and Cybernetics (SMC'2000), Nashville, USA, Oct. 8-11, 2000
  10. J. Yoo, S. Park, H. Bang, T. Kim and S. Cha, "Direct Control Flow Testing on Function Block Diagrams," The 6th International Topical Meeting on Nuclear Reactor Thermal Hydraulics, Operations and Safety (NUTHOS-6), Nara, JAPAN, Oct. 4-8, 2004
  11. Y. Oh, J. Yoo, S. Cha and H. Son, "Software Safety Analysis of Function Block Diagrams using Fault Trees," Reliability Engineering and System Safety, Vol.88, No.3, pp. 215-228, 2005 https://doi.org/10.1016/j.ress.2004.07.019