Auto Start & Complete With PCo In SAP Digital Manufacturing
2024-1-9 16:23:30 Author: blogs.sap.com(查看原文) 阅读量:4 收藏

Introduction

SAP Digital Manufacturing enables data exchange between automation and DM via PCo. By using the Design Production Processes and Manage Automatic Triggers applications, we can automatically start and finish SFCs for orders with the help of sensors for machines that do not have RFID technology. We can view these processes instantly on the POD.

Before delving into the details of the design we created, let’s first explain the scenario we went through:

We have a machine (resource) called WC_DISC1 on the shop floor that operates on a FIFO logic. To select the order for production, we use the worklist on the POD. By clicking the start button, the system automatically triggers a design that writes the order number to the specified tag address.

Now, the machine knows which order it is processing. In our scenario, we assumed there are 2 sensors on the machine operating through a single tag address, with a distance of x meters between them. When a product passes through the first sensor, the value “1” is written to the tag address, and when it passes through the second sensor, the value “2” is recorded on the tag address.

After creating the relevant designs on DM, we set up a trigger, and our design is activated when the value at the designated tag address is either 1 or 2. When the value is read as 1, the design identifies the SFCs for the order and starts by selecting the smallest SFC that is not in an active status. Conversely, when the value 2 is read, the design locates the smallest active SFC for that order and completes it.

Subsequently, the design updates the tag value to 0 once the Start or Complete operation is finished. This way, when the next values of 1 or 2 are written, the trigger system we’ve established resumes its functionality.

PCo Connection

Equipment to be monitored for tags triggered by PCo requires the creation of corresponding Indicators in DM before tags are linked by PCo. The created Indicators must then be assigned to Indicator Groups. These Indicators, organized under the Indicator Group framework, serve as data when creating Equipment Templates.

After creating the Equipment, to link its included Indicators to PCo Tags, navigate to the Manage Equipment Connectivity App and choose the newly created equipment. In the Service Providers section, you will see the OPC connection established earlier through the Manage Service Provider App.

Select the Service Provider and then navigate to the Indicator Groups section. To establish tag connections for the added Indicators, click the chain icon on the left side of the respective row. From the tags created with Kepware in the DM, choose the path of the desired tag.

Connecting%20Data%20Source%20To%20Indicator

Connecting Data Source To Indicator

Design Production Process

Start

  • Firstly, upon receiving the signal ‘1’, we initiate the design of our diagram for the SFC initialization process.
  • We establish three parameters for start control: ‘inOrder,’ ‘inPlant,’ and ‘inResourceFromTag.’
  • In the initial step, we utilize the ‘Retrieve_SFC_Centric_Worklist’ service to identify the SFCs on the resource.
  • We link the ‘Plant’ and ‘Order’ inputs to the respective fields within the service.

Retrieve_SFC_Worklist%20Input%20Parameters

Retrieve_SFC_Worklist Input Parameters

  • For the second process, we craft the ‘getSfcAndOperation’ script task to identify the smallest SFC of the order with ‘New’ or ‘In Queue’ status, along with its operation.
  • As the third step, initiate the ‘Start SFCs’ service by providing the relevant input values.

Start%20SFCs%20Input%20Parameters

Start_SFCs Input Parameters

  • Finally, use the ‘Write Indicator Values’ service to set the tag value to ‘0’ after the transactions are completed.

Write%20Ind%u0131cator%20Values%20Parameters

Write Indicator Values Parameters

Complete

We create a cloud process named ‘Z_TAG_CMP’.

  • Firstly, upon receiving the signal ‘2’, we commence the design for the SFC completion process.
  • We establish three parameters for start control: ‘inPlant,’ ‘inResourceFromTag,’ and ‘inOrder.’
  • In the initial step, we utilize the ‘Retrieve_SFC_Centric_Worklist’ service to identify the active SFCs in that resource.
  • We link the ‘Plant’ and ‘Resource’ inputs to the respective fields within the service.
  • For the second process, we craft a script task to identify the smallest active SFC of the order and its operation.
  • As the third step, initiate the ‘Complete SFCs’ service by providing the relevant input values.

  • Finally, use the ‘Write Indicator Values’ service to set the tag value to ‘0’ after the transactions are completed.

Final Design

We create a cloud process called ‘Z_TAG_CHANGE.’

  • Define ‘inPlant’ and ‘inStatus’ inputs in the Start control. ‘inStatus’ input represents the value received from the tag.
  • As the next step, use the ‘Read Indicator Values’ service to retrieve the order number (written to the machine tag address when starting the order) and the resource name from the relevant tag addresses.

Z_TAG_CHANGE%20Design

Z_TAG_CHANGE Design

  • Then, by adding a condition, if the value written on the status tag is ‘1’, initiate the ‘Z_TAG_STR’ process; and if it is ‘2’, initiate the ‘Z_TAG_CMP’ process.
  • Finally, complete the design with output control.

Manage Automatic Triggers

We create a Subscription through the Manage Automatic Triggers application, defining our relevant tag address as an Indicator. When the tag value is ‘1’ or ‘2’, we set the code to ‘On Change to True,’ as shown in the image, for our trigger system to operate.

Manage%20Automatic%20Triggers

Manage Automatic Triggers

Next, we select the design that we created. For input values, we assign the fixed plant number to ‘inPlant’ and choose the relevant tag address for ‘inStatus.’ After deploying, our trigger system is now ready to operate.

Demo Video

If you like this post or have any questions, please let us know in the comments.

All questions are highly appreciated.

Emir İslam Özgül & Ege Aksöyek


文章来源: https://blogs.sap.com/2024/01/09/auto-start-complete-with-pco-in-sap-digital-manufacturing/
如有侵权请联系:admin#unsafe.sh