SAP Digital Manufacturing (SAP DM) has automation capabilities that streamline manufacturing processes to increase productivity. It ensures seamless data and process connectivity between your shop floor and business applications. This enables end-to-end manufacturing processes from planning to execution involving physical devices.
In this blog, we will guide you step by step through the process of setting up shop floor connectivity to enable communication between your own tag-based OPC UA server and SAP DM using the Production Connector and the Cloud Connector. By the end, you’ll be able to use a production process in SAP DM to read tags from a device you created on your OPC UA server.
Demo Video: Read Tags with Production Process
Introduction
Using the Production Connectivity Model, you can connect your physical devices with various systems, such as SAP systems, shop floor systems, and 3rd party systems. Together, the Production Connector and the Cloud Connector enable the connection between shop floor systems and SAP DM through a safe, stable, and traceable data communication channel using Transport Layer Security (TLS). When issues occur, detailed logs are available for review. This way, your data and processes can support your business needs without unauthorized access to critical information, nor unwanted loss of production time.
Physical devices – machines, facilities, transportation, or other physical means that enable shop floor processes – are represented as assets with static properties (attributes) and changing properties (indicators) in SAP DM. This way, you can work with assets in SAP DM the same way you would handle physical devices in the real world. And with shop floor connectivity established, you can use production processes to integrate and fully automate manufacturing operations.
For example, an asset represents an oven in the physical world. It has attributes representing the physical properties of the oven and indicators representing the constantly changing temperature and pressure inside the oven. If you want to know the temperature of the oven, you can run a function to retrieve the indicator that represents the temperature from the asset. If you want to change the temperature, you can enter the target temperature as a set point for the indicator.
In this blog, you’ll create such an oven device on your OPC UA server and use a production process from SAP DM to read its temperature.
Prerequisites
Before you can connect your shop floor to SAP DM, you’ve got to ensure that ....
Note: We use KEPServerEX in this blog to set up an OPC UA server as an example. We don’t recommend it for production usage.
Process Overview: You can complete this guide in six steps. Step 1 to 5 show how to connect the shop floor to SAP DM. Step 6 shows how to use this connectivity to retrieve information from the shop floor.
Step 1 – Configuration of the Production Connector
To begin, configure the Production Connector – the central on-premise middleware enabling communication between the shop floor and SAP DM.
Run the Control Center app of the Production Connector and as administrator. In the app, complete the following steps:
- Add an administrator user.
- Choose Cloud Integration.
- On the User Configuration tab, choose the Authorized Users tab.
- Choose Add Local User to create a new user.
- Enter your name and ID. Your ID is provided by your identity provider. Typically, this is your e-mail address on your subaccount.
- In the Assigned Production Connector Roles section, select at least the roles Administrator, CertificateAdministrator, and PCoConfigurator to enable connection to SAP DM.
- Choose Save Changes in the top-left corner to save your configurations. For more information, refer to Adding an Administrator User.
- Generate a server certificate.
- On the Server Security Settings tab, choose Generate Server Certificate.
- In the popup dialog, leave the default values unchanged and choose OK to generate a self-signed server certificate for test purposes. By default, the Common Name (CN) is the name of your device. Note: We don’t recommend using self-signed certificates for production scenarios. For more information on certificates, refer to Server Certificate.
- Configure JWT validation.
- Retrieve the URL of the User Account and Authentication service (UAA Service) from your subaccount.
- In the SAP BTP Cockpit, go to the subaccount in which you’ve subscribed to SAP DM.
- Go to the Instances and Subscriptions section.
- On the Instances tab, select the service instance for your SAP DM system to open its detailed view.
- Navigate to the Service Keys section and choose a service key to open the Credentials dialog.
- Choose the Form view.
- In the uaa section, copy the URL value in the url field to your clipboard. Typically, the URL ends with “ondemand.com”
- In the Control Center app, go to the JWT Validation tab.
- Paste the URL that you copied into the URL of UAA Service field.
- Choose Validate UAA Service URL. This automatically fills the Key ID and Public Key field.
For more information, such as retrieving the URL of UAA Service without access to the SAP BTP cockpit, refer to Settings for JWT Validation.
The steps above describe the necessary configuration for our example. For extra details, refer to Settings in the Control Center of the Production Connector.
Step 2 – Assisted Configuration of the Cloud Connector
To use the Production Connector with SAP DM, you must configure the Cloud Connector. In this blog, we’ll configure the Cloud Connector using the Assisted Configuration in the Control Center of the Production Connector.
- In the Control Center app of the Production Connector, go to Server Security Settings tab.
- Choose Assisted Configuration to start the dialog and follow its instructions. The following steps describe a basic first-time setup for a new Cloud Connector.
- Log on to the Cloud Connector with the initial user data.
- Choose Trust.
- Select Set Up Integration with the Cloud Connector to fully set up a new Cloud Connector.
- Add the subaccount on which SAP DM is running. You can find the Region and Subaccount ID in the SAP BTP Cockpit. You can name your own Location ID and Display Name.
- Use the default suggested values for mapping of virtual system to internal system and continue.
- Create the Cloud Connector System Certificate. For this test scenario, create a self-signed certificate.
- In the Cloud Connector Certificate section and the Production Connector Certificate section, choose Trust Certificate.
- Choose Save Summary as File to save your configuration. You’ll need the Location ID, Internal Host, and Virtual Host for subsequent configurations in SAP DM.
For more information, refer to Assisted Configuration of the Cloud Connector.
Step 3 – Configuration of your OPC UA Server
After installing KEPServerEX, run the KEPServerEX 6 Configuration app and complete the initial setup guide following its instructions. Make sure to configure the Administrative Credentials to access the OPC UA Configuration app later.
After the initial setup, a runtime is created and started as a service by default. It contains an example project with example channels. In this runtime, complete the following steps:
- Create your channel, device, and tags.
- On the left side, select Connectivity and choose New Channel to create a new channel. In this blog, we’ll create a channel of Simulator type and call it “My Channel”. Keep everything else as default.
- Select your channel and choose New Device to create a new device. In this blog, we’ll call it “Oven”. Keep everything else as default.
- Select your device and choose New Tag to create a new tag. In this blog, we’ll create these two tags:
Name | Description | Address | Data Type | Client Access | Scan rate |
uom | Unit of measure | S0001 | String | Read/Write | 100 |
temperature | Temperature of the oven | K0001 | Float | Read/Write | 100 |
Result:
- Complete the OPC UA configuration.
- On the left side, select Project and choose Properties to open the Property Editor.
- Select OPC UA, set Server Interface > Enable to Yes.
- In this blog, we’ll use the anonymous user authentication method to later connect the OPC UA server. Therefore, it’s necessary to set Client Sessions > Allow anonymous login to Yes.
- Choose OK.
- Run the OPC UA Configuration app as administrator. Enter “Administrator” as the username and the password you configured for Administrative Credentials.
- On the Server Endpoints tab, select the URL containing your computer device name and check Enabled. Note down this server endpoint URL as you will need it later.
- Choose Edit. In the TCP Connection section, select Default in the Network Adapter field. In the Security Policies section, select Basic256Sha256.
- Choose OK.
- In the Instance Certificates tab, export the server certificate for later use.
- Go back to the KEPServerEX Configuration app, choose Runtime > Reinitialize in the top-left corner to utilize the configurations you just made.
- Create a new inbound rule to enable remote OPC UA client access. Note: This is required for a Windows device to allow incoming connections from the intranet.
- Run the Windows Defender Firewall with Advanced Security app and select Inbound Rules on the left side.
- On the right side, choose New Rule to create a new rule in a guided dialog.
- Change the following settings while keeping everything else as default:
Field | Value |
Rule Type | Port |
Protocol and Ports > Specific local ports | <The series of number at the end of your endpoint URL after the colon> In this blog’s example, the port is 49320. |
Profile | Check Domain and Private Uncheck Public |
Name | <Name of your choice> In this blog, we’ll name it “OPC UA Server Interface (Kepware)” |
- Choose Finish. In the list of inbound rules, you should find your newly created rule.
Step 4 – Onboard Systems in the Configure Production Connectivity app in Digital Manufacturing
After you’ve configured the Production Connector, the Cloud Connector, and your OPC UA server, you can onboard them in SAP DM to establish shop floor connectivity.
Log on to SAP DM using your user (your e-mail for which you used to add an administrator in the Production Connector in step 1). Open the Configure Production Connectivity app and complete the following steps:
- Add the Cloud Connector.
- In the Cloud Connector tab, choose Create.
- Enter a name of your choice and the location ID that you saved at the end of step 2.
- Choose Create.
- Add the Production Connector.
- In the Production Connector tab, choose Create.
- Enter the following values:
Field | Value |
Name | <A name of your choice> |
Internal Host | <The internal host that you saved at the end of step 2> |
Cloud Connector | <The cloud connector you just created> |
Production Connector Virtual Host URL | <The virtual host that you saved at the end of step 2> |
- Choose Test Connection to verify if the connection has been established.
- Choose Create. The Production Connector instance is created in SAP DM and linked to the Cloud Connector. If the Cloud Connector is running, the status should display Connected.
- On the Certificates tab, generate a certificate for Cloud to Production Connector Certificate, Production Connector to Cloud Certificate (X.509 OAuth), and Internal Production Connector Certificate.
- Choose Refresh in the top right corner.
- Add your OPC UA Server.
- In the Shop Floor Systems tab, choose Create > OPC UA Server > Create OPC UA Server.
- Enter the following values:
Field | Value |
Name | <A name of your choice> |
Linked Production Connector | <The cloud connector you just created> |
OPC Server Endpoint URL | <The endpoint URL you noted down in step 3-2> |
Security Policy | Basic256Sha256 |
Security Mode | SignAndEncrypt |
Binary Encoding | YES |
Certificate Type | Generate Certificate |
Identify Certificate By | Subject |
Send Certificate Chain | NO |
Authentication Method | Anonymous |
- Choose Create and Submit.
- Create a new deployment group and choose Save. The status displays Awaiting Deployment.
- Choose your deployment group in the Deployment Group field to open the Deploy Shop Floor Elements app.
- Choose Deploy > Deploy and Activate. The deployment should be successful, but the activation fails because trust is not established. The agent instance Default Operations displays status Stopped.
- Establish trust between server and client.
- In the OPC UA Configuration app’s Trusted Clients tab, you can see a new untrusted client certificate. It was sent by SAP system and rejected by KEPServerEX. Select the client certificate and choose Trust.
- Go back to the KEPServerEX Configuration app, choose Runtime > Reinitialize to utilize the change you just made.
- In the Control Center app, choose Certificate Overview > Trusted Certificates.
- Select a random Store Path to open a folder for trusted certificates.
- Navigate to the ProdCon\CertificateStores\UA Applications\certs folder and check if it contains the server certificate you exported in step 3-2-i. It should have a name like “+KEPServerEX+UA Server+ [2199482A8A57F7889A03B54FB9342284C8C76E49].der”. If not, paste in the exported server certificate.
- Check in the ProdCon\CertificateStores\RejectedCertificates folder that it doesn’t contain a version of this certificate.
- Restart agent instance.
- Go back to the Configure Production Connectivity app in SAP DM and select your OPC UA Server.
- In the Agent Instances section, select the Default Operations instance and choose Start. If it fails, refer to Connectivity Issues.
For more information, refer to Configure Production Connectivity.
Step 5 – Creating and Connecting an Asset
You’ve set up connection between your OPC UA server with SAP DM. Now you can create an asset in SAP DM that stands for the “Oven” you’ve created in step 3. The asset’s indicators will connect to the tags “uom” and “temperature”.
- Create an asset and its indicators.
- Open the Manage Assets app and choose Create. In this blog, we’ll name the asset “Oven”.
- Select Equipment in the Node Type field.
- Choose Save.
- Choose Edit. You can add indicators in the Attributes and Indicators tab.
- Type in the Asset Type field to create a new type. We’ll create the type “oven_data”.
- Choose Create > Structure to create a structure “inside” that groups the indicators.
- Select the square in front of “inside” and choose Create > Indicator to create an indicator. Create the two indicators “uom” of type String and name “temperature” of type Numeric.
- Choose Save.
- Connect the indicators to the tags on your OPC UA server.
- Open the Manage Asset Connectivity app and select the asset “Oven” to open its details.
- In the Shop Floor System tab, choose Add.
- Select your OPC UA server and choose OK to add it.
- In the Structures tab, expand the “inside” node by choosing the > icon to display the indicators.
- Choose Connect at the end of an indicator to link a tag.
- Choose your OPC UA server in the Shop Floor System field, a list of channels on your server display in the Items section.
- Navigate to the corresponding tag and select it. In this blog, for the indicator “uom”, navigate to “My Channel” > “Oven” > “uom”. For the indicator “temperature”, navigate to “My Channel” > “Oven” > “temperature”.
Result:
For more information, refer to Asset Model.
Step 6 – Read Asset Indicators Using a Production Process
Your “Oven” on your OPC UA server now has a digital twin on SAP DM. You can read its tags using the built-in service “Read Indicators” provided by SAP DM services.
- Create a production process to read indicators.
- Open the Design Production Processes app and choose Create to create a production process design that groups your production processes.
- Open your design and choose Create to create a production process. Name it “ProdConCheck” and choose Cloud as the Runtime Type. Check Visible to Production Connector / Plant Connectivity Runtime.
- Choose Editor to open the Editor tab.
- Drag a Start, Read Indicators, and an End element to the canvas. You can find “Read Indicators” by searching under Services and Processes. “Read Indicator” is located under the DMC_Cloud > Built-in Services node.
- Use the arrow icon to connect the elements in the following order: Start → Read Indicators → End.
- Choose the Read Indicators element. The configuration panel appears on the right side.
- Under the Output tab, choose Add. Choose the asset “Oven” and your OPC UA server. Check the “uom” and “temperature” indicators and choose Select.
- Choose Save All.
- Choose Quick Deploy > Deploy and Activate.
For more information, refer to Design Production Processes.
- Change tag values and run the production process to read tags.
Demo Video: Read Tags with Production Process
- In the KEPServerEX Configuration app, choose Tools > Launch OPC Quick Client.
- In the OPC Quick Client dialog, choose My Channel.Oven.
- Select My Cannel.Oven.uom and choose Tools > Item > Synchronous Write. In the Write Value field, enter “Celsius” and choose OK.
- Select My Cannel.Oven.temperature and choose Tools > Item > Synchronous Write. In the Write Value field, enter “98” and choose OK.
- In your production process in SAP DM, choose Run.
- Open the Monitor Production Processes app and select the process instance you just ran, ProdConCheck#1, to see its details.
- Select the second step Read Indicators and choose Process Parameters View.
- The tag values are displayed under Output Parameters - Read Indicators.
🎊You did it! You’ve set up the Production Connector, Cloud Connector, and your OPC UA server and onboarded them in SAP DM, enabling connection to devices on the shop floor using the asset model. Shop floor connectivity is the basis for many automation processes. By completing this process, you've successfully taken the first crucial step toward transforming your manufacturing operations.
Next Steps
In the following blogs in our series, we’ll showcase how to use the connectivity to automate manufacturing processes.
For more information, refer to the user assistance for SAP Digital Manufacturing on the SAP Help Portal.
Do you like this blog? Feel free to tell us what you think in the comments. We appreciate your feedback.
Or, if you have any questions, please check the SAP Community Q&A Area, or comment down below.