# OPC UA with Siemens S7-1200 Safe PLC

**URL:** <https://forum.inductiveautomation.com/t/opc-ua-with-siemens-s7-1200-safe-plc/101663>\
**Category:** Ignition\
**Tags:** opcua, siemens, ignition81\
**Created:** [January 31, 2025, 9:45am UTC](https://forum.inductiveautomation.com/t/opc-ua-with-siemens-s7-1200-safe-plc/101663 "2025-01-31T09:45:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morten\_Jepsen](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Morten\_Jepsen](https://forum.inductiveautomation.com/u/Morten_Jepsen)\
**Post date:** [January 31, 2025, 9:45am UTC](https://forum.inductiveautomation.com/t/opc-ua-with-siemens-s7-1200-safe-plc/101663/1 "2025-01-31T09:45:24Z")

</div>

I have a Siemens S7-1214FC that i would like to get on data from. I tried getting it added to devices, but without luck.  
I tried opening a connection to it with TCP, which worked.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8b5dce8c0e0f8388da7769b7ba9b615b1eee7481.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/4/6439ea5c9b74d79225eb6eab0e1f1bd8df127e94.png)

I have this from the logs

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/3/831a4200d36ece78f58d26e58032468e31ce2163.png)

---

<div class="post-metadata">

**Author:** ![Morten\_Jepsen](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Morten\_Jepsen](https://forum.inductiveautomation.com/u/Morten_Jepsen)\
**Post date:** [January 31, 2025, 10:02am UTC](https://forum.inductiveautomation.com/t/opc-ua-with-siemens-s7-1200-safe-plc/101663/2 "2025-01-31T10:02:41Z")

</div>

Just an update, tried connecting the same PLC to my own laptop/ignition server, as my work PC is pretty locked without admin rights, and Im getting a different log.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/f/0f27664ebca1c67ac1dd4c2775bf0bed851ab82f.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 31, 2025, 1:20pm UTC](https://forum.inductiveautomation.com/t/opc-ua-with-siemens-s7-1200-safe-plc/101663/3 "2025-01-31T13:20:35Z")

</div>

"Connection Refused" is a pure network error. Either the target device is not listening on the expected port, or a firewall is blocking the traffic to make it look that way.

Is the Siemens PLC configured to allow legacy connections (as described in the IA docs)?

---

<div class="post-metadata">

**Author:** ![Marcus\_Sysum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/marcus_sysum/32/57944_2.png) [@Marcus\_Sysum](https://forum.inductiveautomation.com/u/Marcus_Sysum)\
**Post date:** [January 31, 2025, 3:19pm UTC](https://forum.inductiveautomation.com/t/opc-ua-with-siemens-s7-1200-safe-plc/101663/4 "2025-01-31T15:19:54Z")

</div>

In your config you have the port as 4840. Are you trying to connect to the opcua server of the S7-1200? The default port is 102 for the driver.

If using the driver to connect (not opcua) there are some considerations to note see the ignition [Manual](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/opc-ua/opc-ua-drivers/siemens)

When trying to connect using opcua use this for [reference](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/opc-ua/opc-ua-client-connection-settings)

The driver page is for direct connections which is different than connecting to the opcua server of the S7-1200

---

<div class="post-metadata">

**Author:** ![Morten\_Jepsen](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Morten\_Jepsen](https://forum.inductiveautomation.com/u/Morten_Jepsen)\
**Post date:** [February 3, 2025, 9:55am UTC](https://forum.inductiveautomation.com/t/opc-ua-with-siemens-s7-1200-safe-plc/101663/5 "2025-02-03T09:55:46Z")

</div>

I swapped to my personal laptop and disabled firewall, as my work laptop is locked. I set the port to 102, as its the driver id like to use. Now i get the following.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/5/250d3eeacde370e72c94bef1d6ae6ce3c36ceab6.png)

In TIA should i change the OPC UA port to 102? Its currently set to the default 4840

---

<div class="post-metadata">

**Author:** ![Cody\_Morgan](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@Cody\_Morgan](https://forum.inductiveautomation.com/u/Cody_Morgan)\
**Post date:** [February 4, 2025, 3:58pm UTC](https://forum.inductiveautomation.com/t/opc-ua-with-siemens-s7-1200-safe-plc/101663/6 "2025-02-04T15:58:01Z")

</div>

> [@Morten\_Jepsen](#):
>
> In TIA should i change the OPC UA port to 102? Its currently set to the default 4840

No. The Siemens driver does not connect to the PLC's OPC UA server. It connects using the S7 protocol.

Alternatively, you can create an OPC UA connection.
