# Structured Text Sim

**URL:** https://community.factoryio.com/t/structured-text-sim/235
**Category:** Uncategorized
**Created:** [May 19, 2020, 5:49pm UTC](https://community.factoryio.com/t/structured-text-sim/235 "2020-05-19T17:49:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![paul.murray](https://dub1.discourse-cdn.com/flex017/user_avatar/community.factoryio.com/paul.murray/32/45_2.png) [@paul.murray](https://community.factoryio.com/u/paul.murray)
#### Post date: [May 19, 2020, 5:49pm UTC](https://community.factoryio.com/t/structured-text-sim/235/1 "2020-05-19T17:49:50Z")

</div>

I have used the Control IO for my class with good success. But it is only FBD. I would like to use Structured Text. We are doing everything remotely these days, and I am looking for a simple / reliable way to get my students using ST. Any suggestions?

---

<div class="post-metadata">

### Author: ![brunovgr](https://dub1.discourse-cdn.com/flex017/user_avatar/community.factoryio.com/brunovgr/32/12_2.png) [@brunovgr](https://community.factoryio.com/u/brunovgr)
#### Post date: [May 20, 2020, 10:11am UTC](https://community.factoryio.com/t/structured-text-sim/235/2 "2020-05-20T10:11:00Z")

</div>

@paul.murray I would recommend CODESYS. It follows the IEC 61131-3 standard which includes ST. The demo version allows your students to program the included soft PLC (CODESYS Control Win) which runs for two hours - after two hours they will have to restart it. The downside is that you will have to use Modbus TCP or OPC UA in order to connect it to Factory I/O.

You can find some tutorials here: [https://docs.factoryio.com/tutorials/codesys/](https://docs.factoryio.com/tutorials/codesys/)

---

<div class="post-metadata">

### Author: ![paul.murray](https://dub1.discourse-cdn.com/flex017/user_avatar/community.factoryio.com/paul.murray/32/45_2.png) [@paul.murray](https://community.factoryio.com/u/paul.murray)
#### Post date: [May 21, 2020, 6:25pm UTC](https://community.factoryio.com/t/structured-text-sim/235/3 "2020-05-21T18:25:23Z")

</div>

I see three different ways to connect FIO to Codesys (DA, UA & Modbus). Which one is better (aka, most simple and/or reliable)?

---

<div class="post-metadata">

### Author: ![brunovgr](https://dub1.discourse-cdn.com/flex017/user_avatar/community.factoryio.com/brunovgr/32/12_2.png) [@brunovgr](https://community.factoryio.com/u/brunovgr)
#### Post date: [May 22, 2020, 3:56pm UTC](https://community.factoryio.com/t/structured-text-sim/235/4 "2020-05-22T15:56:04Z")

</div>

I believe you will have to purchase a license in order to use the classic OPC DA, which offers no advantage over OPC UA. OPC UA and Modbus TCP drivers are included in the Codesys demo.

In my opinion Modbus TCP is the most straightforward to configure and use. However, if you intend to use analog values, keep in mind that Modbus registers only support 16-bit values. Factory I/O Modbus driver allows you to scale sensors’/actuators’ values as a workaround for this limitation. See more here:

[https://docs.factoryio.com/manual/drivers/modbus-client/](https://docs.factoryio.com/manual/drivers/modbus-client/) [https://docs.factoryio.com/manual/drivers/modbus-server/](https://docs.factoryio.com/manual/drivers/modbus-server/)

OPC UA works better when using analog values and allows you to get a list of variables available in the softPLC. I would recommend you to try both and see which one would work best for your students.

---

<div class="post-metadata">

### Author: ![bernard.riera](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@bernard.riera](https://community.factoryio.com/u/bernard.riera)
#### Post date: [May 26, 2020, 12:20pm UTC](https://community.factoryio.com/t/structured-text-sim/235/5 "2020-05-26T12:20:06Z")

</div>

I agree with Bruno, Modbus TCP is really easy to use with CODESYS

---

<div class="post-metadata">

### Author: ![nff37](https://avatars.discourse-cdn.com/v4/letter/n/e274bd/32.png) [@nff37](https://community.factoryio.com/u/nff37)
#### Post date: [May 26, 2020, 5:01pm UTC](https://community.factoryio.com/t/structured-text-sim/235/6 "2020-05-26T17:01:29Z")

</div>

Hallo ich kann TIA V15.1 nicht mit Factory IO Verbinden . Ich habe alles gemacht was auf einem Mail Support Factory IO mir geschickt hat. Aber Leider hat nicht Funktioniert. Kann Jemand mir Helfen
