How-To Guides
DeviceHub Guides

Use the Status Register to Connect a PLC

9min
the status register option in device configurations allows you to set up a connection with a plc device that won't successfully connect using the default connection configuration between manufacturing connect edge and the device user scenario the default configuration for a plc in your production environment can't connect to manufacturing connect edge you will therefore use the status register option to create a custom configuration to connect the plc to manufacturing connect edge set up and use the status register option complete the following tasks to use the status register option before you begin for this user scenario, the modbus slave simulator is used to complete these steps, you will need to download the modbus slave simulator step 1 set up modbus simulator to set up the modbus slave simulator open modbus slave simulator navigate to setup > slave definition configure the following parameters slave id 1 function 03 holding register (4x) address 0 quantity 10 click ok navigate to connection > connect configure the following parameters connection modbus tcp/ip ip address enter the ipv4 address for your computer if needed, use the ipconfig command in the command prompt window and copy the ipv4 address port 502 ipv4 select this option click ok the simulator successfully connects step 2 connect modbus device in manufacturing connect edge you can now follow the steps to connect a device docid 3eyafppweuvmblcey17sq configure the following parameters device type modbus driver name modbus tcp name enter a name for the modbus tcp ethernet driver network address enter the ip address you configured in the modbus slave simulator network port 502 station id this is the slave id configured in the slave definition in the modbus slave simulator enter 1 after adding the device, the device shows a successful connection to the slave simulator now that the device is successfully connected, you can test the status register function step 3 update slave definition function to test the status register function, you will need to update the function parameter in the slave definition of the slave simulator this simulates a plc device with a default configuration that can't connect to manufacturing connect edge to update the slave definition function in the modbus slave simulator, navigate to connection > disconnect navigate to setup > slave definition update the function to 04 input register (3x) click ok navigate to connection > connect and click ok the manufacturing connect edge device you created should now show a disconnected status due to the change in function from the slave simulator step 4 configure status register in manufacturing connect edge you can now set up the status register option in the device configuration to successfully connect to the slave simulator to configure the status register in manufacturing connect edge in manufacturing connect edge, click the action menu for the device and select edit select the status register check box configure the following parameters name i analog input registers value type int32 click update device the device now shows a successful connection again based on the status register configuration step 5 test tags now that the device is successfully connected using status register, you can now test that tags in the device can be read you will do the following create a tag in manufacturing connect edge update register values for the connected device in modbus slave simulator use analytics docid\ fgjkboqwgvggd2nuqgro5 to read the tag values and confirm the tags are successfully configured to test the tags for the device in manufacturing connect edge, navigate to devicehub > tags select the modbus tcp device click the add tag icon and select add a tag configure the following parameters name this needs to be the same register as used in the modbus slave simulator select i analog input registers tag name enter a name for the modbus tcp ethernet driver tag value type int16 polling interval the interval in seconds that the tag will poll for data enter 1 address the register that the tag will start reading data enter 1 count the number of registers that that the tag will read enter 5 click add tag click the copy icon for the tag's raw topic you will refer to this later in modbus slave simulator, double click the cell in column 00000 and row 1 this is the cell that the tag you created will start reading from (address parameter) enter the value 5 and click ok do the same for row 2 to 5 and enter the following values 11 , 22 , 44 , 66 in manufacturing connect edge, navigate to analytics click add a processor the create a processor dialog box opens select datahub subscribe in the topic field, paste the tag's raw topic that you copied earlier from step 6 click save click the view icon for the processor under instance messages, verify that success displays true and value displays the five values you configured in the modbus slave simulator ( 5 , 11 , 22 , 44 , 66 )