Introduction
This article is for users of MachineMetrics configuring a machine with a Siemens 840D SL controller. This article covers the configuration process of how to select data items for monitoring in the NCK using NCVar Selector and then modify the machine program to gather and prepare the data items for remote monitoring.
Required Materials
This process involves programming the machine and therefore requires a programming device with Simatic Manager or TIA Step7 software for programming. You should also have a trained technician capable of programming the machine to conduct the configuration.
Overview of Configuration Steps
- Establish direct network link to the machine and programming device with TIA Step 7/Simatic Manager.
- Backup the existing machine program to a known safe location.
- Import MachineMetrics install bundle for blocks into TIA Step 7/Simatic Manager.
- Add the call to MM_FC block to OB1 cyclic block.
- Download the updated program to the machine.
Note: If you have custom NCK data items that you intend to select, follow the instructions here for the default installation and consult the article on Siemens 840D SL - Custom Monitoring Configuration Install.
Establish Direct Network Link to Machine
- First place the machine in a safe state
- Connect the programming device to the programming port on the PLC using a network cable.
With the Programming device connected to the PLC on the 840D SL or Siemens Machine, we need to establish the static programming link.
Open the Control Panel in windows and navigate to the Network and Sharing Center. From the Network and Sharing Center, select Change adapter settings.
Right click the network adapter used for the link connected to the PLC and select Properties. In this example, we are using the Ethernet 2 link but note that the appropriate network adapter may be different on your programming device.
Select Internet Protocol Version 4 (TCP/IP) from the option list in the window and click the Properties button.
Select Use the following IP address radio toggle and in the IP Address field provide an available address for the programming device on the same subnet as the CPU. In this example I have chosen to use 192.168.7.77 which is available and assumed to be on the same subnet network as the CPU is configured.
Set the Subnet mask to 255.255.255.0, this field may even auto-populate on newer editions of Windows.
Note: We are using a direct cable connection between the programming PC and the machine PLC and we don't want to have any conflict with other devices that could be on the network. For example, if the network uses 192.168.1.x, then we want to use a different unused network address space such as 192.168.2.x or in the case of this example 192.168.7.x
Click the OK button.
Save and Backup the default PLC program
- Download the PLC program from the machine into TIA/Simatic Manager
-
IMPORTANT! Save the workspace to a safe location on disk as a backup
- If anything goes wrong or unexpected during your configuration, this will be your recovery files to restore the machine to it's previous state.
Configuring Monitored Data with NCVar Selector
MachineMetrics provides a default set of tracked values for the Siemens 840D SL machines rendering this step as optional configuration. Working with customer support liaison we can work to identify and track additional data items available in the NCK that may not be included in this default configuration.
The default data items pulled from the NCK are:
- Execution
- Workpiece and Program Name
- Active Tool ID
- Spindle Speed
- OpMode
- FeedRate (AX1/AX2/AX3)
- FeedRateOverride (AX1/AX2/AX3)
- ToolBasePos (AX1/AX2/AX3)
- ToolBasePos_Geo (AX1/AX2/AX3)
- ActParts/ReqParts/TotalParts
Work with your customer support liaison and see this article for more about how to add additional data items using the NCVar Selector process.
MachineMetrics Bundle Configuration Installation
The flow for this process assumes using the default provided installation file MM Siemens Simatic Manager NCVAR.awl and MM Simatic Manager Install-Bundle.awl.
Note: If your installation has custom data items added there are additional instructions provided in the next section. The process depicted shows screenshots from Simatic Manager, however the workflow and steps are similar conceptually in the updated TIA Portal software.
The the project open, right click on Sources in the project tree and select Insert New Object, then External Source... from the project tree.
Simatic Manager: This step will be to right click sources and select Insert New Object->External Source from the context menu.
Navigate to and select the MM Siemens Simatic Manager Install-Bundle.awl and click 'Open'
We can now observe the MM Siemens Simatic Manager Install Bundle.awl external file has been loaded into the project. The name is truncated due to character restrictions in Simatic Manager. Also, none of the objects have been loaded yet. We will do that in a later step when we compile the file.
Creating a Data Block
Before we compile, we need to prepare data blocks with the correct symbol names to receive the imported data. Right click on Blocks to open the context menu and then select Insert New Object then Data Block. Upon selection a configuration form will open.
Preparing DB120 NCVAR
We will first create the DB120 data block with the symbolic name NCVAR. This data block will hold the NCK address information for the parameters to be retrieved. These values are configured using the utility NCVar Selector detailed in the companion article Adding Data Items With NCVar Selector.
- Input DB120 into Name and type field.
- Ensure Shared DB is selected
- Input NCVAR into Symbolic Name field
Note: If you already have DB120 created and holding NCVAR values they will be overwritten by the import procedure. Ensure any custom data items that you want to retain are added to the NCVAR using the instructions from the companion article Custom Monitoring Configuration Install
Preparing Output Data Block
Next we will repeat the steps above for Creating a Data Block to create the area where values read from the NCK will be stored for monitoring. After inserting the data block, we will be presented with the configuration form as before:
- Input an available data block address for Name and type, here we have chosen to use DB104.
- Ensure Shared DB is selected from the dropdown
- Input MM_OUTPUT into the field for Symbolic Name
- Click OK
Preparing FB2 Status Data Block
Next we will repeat the steps above for Creating a Data Block to create the area where error values from the FB2 calls will be stored and made available. After inserting the data block, we will be presented with the configuration form as before:
- Input an available data block address for Name and type, here we have chosen to use DB103.
- Ensure Shared DB is selected from the dropdown
- Input MM_FB2_STATUS into the field for Symbolic Name
- Click OK
Preparing FB2 Instance Data Blocks
Next we need to repeat the steps above for Creating A Data Block to hold the parameters for calls required by the install. These steps will need to be multiple times to populate a symbol and parameter instance data block for each of:
- MM_FB2_1
- MM_FB2_2
- MM_FB2_3
After inserting the data block, we will be presented with the configuration form as before.
- Input an available data block address for Name and type, in this example we use DB100
-
Select Instance DB from the dropdown.
- Note that this is different than the previous data blocks created thus far.
- Ensure the subsequent dropdown is selected FB2 as the target function block.
- Input MM_FB2_1 for the symbolic name.
- Click OK
- Repeat the above process to create the required instance data blocks with symbols MM_FB2_2 and MM_FB2_3. Incrementing the data block to available address each time.
Prepare the MM Gather Function
Now we need to insert a new function block. Right click the Blocks from the project tree and select Insert New Object then Function from the context menu.
We will be presented with a configuration form similar to when we were configuring the data blocks. This function will hold all the calls to FB2 being made that do the work to retrieve the values from the NCK and update the other data blocks with their values. Configure this as follows:
- Select an available name for the FC, here we have choses FC100
- Input MM_FC in the field for Symbolic Name
- Click OK
With all required data blocks in place with appropriate symbol names, we can observe them by viewing the symbol table. Select the Program from the project tree and you should see an entry named Symbols
Double click that entry and you should see the symbol table list with the symbol names matching the corresponding selected data block addresses. Your symbol table may look different on your machine that has a loaded program set during commissioning, you may have additional entries to navigate.
With all the symbols mapped, we are prepared to load the install bundle. To load all the objects into the project, we click Sources in the project tree and right-click on MM Siemens Simatic Manager Install-Bundle.awl. From the context menu, select Compile to populate the project with the data blocks defined in the .awl file.
This will open a new panel, and if it works without errors it will present an empty pane.
We can confirm the data has been loaded by examining the data blocks directly. Navigate to blocks by clicking Blocks from the project tree. Here we see presented all the data blocks we created during the preparation step. By double-clicking on each block, we can view the contents.
Observe the newly populated data blocks in the project tree. We can see the following data blocks listed by symbol name with the addresses assigned:
| MM_FC | Function wrapping all FB2 calls for the default MM provided NCVAR data block |
| MM_FB2_1 | Data block for the first call to FB2 in MM_FC |
| MM_FB2_2 | Data block for the second call to FB2 in MM_FC |
| MM_FB2_3 | Data block for the third call to FB2 in MM_FC |
| MM_FB2_STATUS | Data block holding the FB2 output signals |
| MM_OUTPUT | Data block storing the output data to be read by MM edge device |
| DB120 | Data block defining the structure of data to be retrieved from the NCK by FB2 calls. Also sometimes seen as "NCVAR" |
All the data blocks have been loaded, below we inspect each of the loaded blocks to see the loaded contents.
DB120 NCVAR data block - Containing the data item structures for the NCK created by NCVar Selector
The MM_OUTPUT data block - Storing the data to be monitored by the MachineMetrics edge device
The MM_FB2_STATUS data block - This data block holds all signals and error codes generated by the calls to FB2 - GET done during gathering.
The MM_FC block - This is a convenience data block that contains all the FB2 - GET gathering calls to the NCK.
Note: The MM_FC block is also the main data block that will need to be modified if additional data items are added for monitoring.
The penultimate to configuration is adding a call to the MM_FC block into OB1. This makes it so the values from the NCK are gathered during each cycle.
Note: These screenshots were not generated while programming a real machine so the OB1 block is quite empty. In your live install OB1 will be populated with the programmed logic for your machine.
With all data blocks loaded and the program configured, the last step is to upload the modified program to the machine.
Select Download from the PLC navigation context menu or click the button shortcut on the ribbon bar.
Instructions for failure recovery
If something goes wrong in the compilation process, the controller will alarm. The operator and technician can clear the alarm from the HMI and then correct the error in the programming and then re-download a corrected program to the PLC.
In the case that there is a situation that cannot be resolve expediently, the technician should load the preserved backup from the initial steps of this guide to restore the machine to it's original working state.
If you have questions about this process, please reach out directly to your customer success manager or contact support@machinemetrics.com.
Comments
0 comments
Article is closed for comments.