{}

브랜드

Impact-Company-Logo-English Black-01-177x54

슈나이더 일렉트릭 코리아 웹사이트에 방문해 주셔서 감사합니다.

슈나이더 일렉트릭 코리아 웹사이트 방문자 분들 모두 환영합니다.
FAQ 검색
What is the best practice to handle a logic with two Function Blocks in a Jump loop?

Issue
As defined in IEC61131-3, the outputs from deactivated functions (caused by EN=0 or an error during execution) are undefined and programmers have to avoid the kind of code below when have it inside of a Jump loop.
im1

Product Line
Ecostruxure Control Expert

Environment
Control Expert v14.1, Windows 10 version 1902 (OS Build 18362.30)

Resolution
The EcoStruxure Control Expert Help states that as defined in IEC61131-3, the outputs from deactivated functions (caused by EN=0 or an error during execution) are undefined. So based on the picture above, if the EN of FUNCBLOCK_1 is set to "0", the link on output OUT of FUNCBLOCK_1 maintains the old status it had during the last correctly executed cycle.
This should be taken in consideration while you are developing your program, specially if you have it inside of jump loops as in this scenario the same Function Block is executed multiple time the logic on the same cycle, and the output is maintained.
You can find below an illustration of this behavior:
im2

In this case, the value 1 of the ADD will be added to all the variables of the CountArray[LoopIndex] array if the first bit of the EnabelArray[LoopIndex] has the value 1 as the GE maintains the status of the first time that the logic is executed in the loop for the same scan of the PLC. To avoid this scenario, you should change your logic to one of the two best practices of programming shown below using a contact between the two Function Blocks or an AND.
im3 im4

P.S.: You can find more information about this topic on page 296 of the EcoStruxure Control Expert - Program Languages and Structure Reference Manual.


슈나이더 일렉트릭 Korea

자세히 알아보기
제품군
유용한 문서
자세히 알아보기
제품군