我們的品牌

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

歡迎造訪施耐德電機全球網站

歡迎訪問我們的網站
		
我们今天能为您提供什么帮助?
Can a POU (Program Organization Unit) not scheduled in the Task be called by another POU in SoMachine?

Issue

This resolution is an example for a call to a subroutine. It provides an overview for calling a secondary POU not scheduled in the Task by a main POU.


Product Line
SoMachine
EcoStruxure Machine Expert

Environment
PLC Configuration Software Suite

Resolution
In order to be executed, POU (Program Organization Unit) must be scheduled in the Task Configuration. Or a main POU already scheduled in the Task Configuration can call to a secondary POU that is not schedule in the Task Configuration list. This resolution will demonstrate how to call a secondary POU from a main POU


NOTE: The screenshots below are from the SoMachine software environment. The procedure is the same in the newer EcoStruxure Machine Expert.
This method is valid for all types of PLCs supported in SoMachine and EcoStruxure Machine Expert.

1) Create 2 POU (Program Organization Unit) A Main and Secondary POU.

Add ObjectAdd a POU

2) Devices Window
Devices Tree

3) Add the Main POU to the Task configuration
Add Main POU to Task Configuration

4) Insert a Box in the Main POU FBD section. This box will be used to call the secondary POU.
Insert Box into Main POU

5) Link the Box to Secondary_POU
Link the Box to Secondary_POU

6) Add a conditional input to control the execution of Secondary_POU. In this example, when Call_SecondaryPOU is true, Secondary_POU gets executed. Otherwise if Call_SecondaryPOU is false, Secondary_POU does not executed.
Conditional execution

7) Running the project

Call_SecondaryPOU = False, Secondary Pou not being executed.


Secondary_POU not executed

Add block visualization

8) Running the project

Call_SecondaryPOU = True, Secondary Pou is being executed.

Secondary POU is executed

Add block is executed - see output

施耐德電機Taiwan

探索更多
系列:
探索更多
系列:

需要協助?

  • 產品選型工具

    快速輕鬆地為您的應用找到合適的產品和附件。

  • 取得報價

    立即線上提交您的銷售需求,專業團隊將主動聯繫您。

  • 購買地點

    輕鬆在您所在地區找到最近的施耐德電機經銷商。

  • 支援中心

    在同一位置找到滿足您所有需求的支援資源。

  • 產品文檔
  • 軟體下載
  • 產品選型工具
  • 產品替代和替換
  • 幫助和聯絡中心
  • 尋找我們的辦公室
  • 取得報價
  • 人才招募
  • 公司簡介
  • 舉報不當行為
  • 無障礙
  • 新聞中心
  • 投資者
  • 專業洞察
  • 台灣施耐德電機學院
  • 綠色影響力落差調查
  • Schneider Go Green 2025
  • 隱私政策
  • Cookie通告
  • 使用條款
  • Change your cookie settings