# WireLinX™ IoT PLC

{% hint style="success" %}

## Author

P' Toon (EE, Burapha University)

* [www.Buraphatronics.com](http://www.buraphatronics.com/)

<img src="https://1856353139-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2FHPqjFQ45KBYW9cMNIo2u%2FToon.png?alt=media&#x26;token=4ba1f785-62bb-4a1a-bd4e-fdb43b32a902" alt="" data-size="original">
{% endhint %}

## **WireLinx Programmable Logic Control (PLC) User Manual**

<figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/pic_10.png" alt=""><figcaption></figcaption></figure>

### **Table of Contents**

* **WireLinx Programmable Logic Control (PLC) User Manual**
  * **Table of Contents**
  * **1. Introduction**
    * Overview of WireLinx PLC
    * Key Features
    * Applications
  * **2. Hardware Specifications**
  * **3. Getting Started**
    * Installing Required Software
    * Configuring the Web Interfac
  * **4. Programming WireLinx PLC**
    * Supported Programming Languages
    * Internal Memory Structure
  * **5. Communication Protocols**
    * Wi-Fi and Web-based Configuration
    * RS-232 and RS-485 Communication
    * Modbus RTU & Modbus TCP
  * **6. Working with I/O**
  * **7. Safety and Maintenance**
  * **Training Topics for Basic PLC**

***

### **1. Introduction**

#### **Overview of WireLinx PLC**

WireLinx PLC is a programmable logic controller designed for industrial automation and IoT applications. It features a modular and flexible architecture, allowing for seamless integration with existing systems.

<figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-41.png" alt=""><figcaption></figcaption></figure>

#### **Key Features**

* **Core Processor:** ESP32-S3 with built-in Wi-Fi
* **Digital Inputs:** Source Type with Isolation
* **Digital Outputs:** Sink Type with Isolation
* **Communication Interfaces:** RS232 , RS485
* **Real-Time Clock (RTC) Support**
* **Web-Based Configuration Interface**
* **Supports Ladder Logic Programming**

#### **Applications**

WireLinx PLC can be used in:

* Industrial automation
* Smart building systems
* SCADA & remote monitoring
* Energy management
* IoT & smart agriculture

***

### **2. Hardware Specifications**

<figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/layout_1.png" alt=""><figcaption></figcaption></figure>

| No. | Component                 | Specification                                 | Number     |
| --- | ------------------------- | --------------------------------------------- | ---------- |
|     | **Processor**             | ESP32-S3                                      |            |
| 1   | **Power Suppply**         | DC Voltage 24VDC.                             |            |
| 2   | **Analog Inputs**         | Voltage Input 0-10V. Resolution 16 Bits       | 4 Channels |
| 3   | **Digital Inputs**        | 24VDC Source Type                             | 8 Points   |
| 4   | **Digital Outputs**       | 24VDC Sink Type 100 mA/ch                     | 8 Points   |
| 5   | **RS-485**                | 1 Channel Support ASCII , FXCPU , ModbusSlave | 1 Channel  |
| 6   | **RS-232**                | 1 Channel Support ASCII , FXCPU , ModbusSlave | 1 Channel  |
| 7   | **USB**                   | USB-Serial Programmable Port                  | 1 Channel  |
| 8   | **Jumper**                | Switch Select Power Source Terminal / USB     |            |
| 9   | **LoRa extenal antenna**  | Support antenna 2.4 GHZ                       |            |
| 10  | **Wi-Fi extenal antenna** | Support antenna 433 Mhz                       |            |

***

### **3. Getting Started**

#### **Installing Required Software**

* **Download and install GX-WORK2**

#### **Operating Buttons and Status Indicators**

![](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-29.png)

<br>

<table data-header-hidden data-full-width="true"><thead><tr><th></th><th align="center"></th><th align="center"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>No</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Symbol</strong></td><td><strong>Status</strong></td><td><strong>Descriptions</strong></td></tr><tr><td>1</td><td align="center">LED</td><td align="center">Power</td><td>ON = Power Ready</td><td>Indicator power plc ready for use.</td></tr><tr><td>2</td><td align="center">LED</td><td align="center">RUN</td><td>ON = PLC RUNOFF= PLC STOP</td><td>Indicator plc operation status</td></tr><tr><td>3</td><td align="center">LED</td><td align="center">ERR</td><td>ON = PLC ERROROFF= NORMAL</td><td>Indicator PLC operation abnornal</td></tr><tr><td>4</td><td align="center">LED</td><td align="center">WAP</td><td>ON = Wifi AccessPoint EnableOFF = Wifi AccessPoint DisableBLINK = Communication Working</td><td>Indicator wifi accesspoint status</td></tr><tr><td>5</td><td align="center">LED</td><td align="center">STA</td><td>ON = Wifi Station ConnectedOFF = Wifi Station DisconnectBLINK = Communication Working</td><td>Indicator wifi accesspoint status</td></tr><tr><td>6</td><td align="center">BUTTON</td><td align="center">RESET</td><td>Press = RESET PLC</td><td>Restart PLC</td></tr><tr><td>7</td><td align="center">BUTTON</td><td align="center">RUN/STOP</td><td>Press = RUN OR STOP PLC</td><td>Run/Stop PLC</td></tr></tbody></table>

**About Button Operation**

* **Reset PLC :** Press for restart all process

  <figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-30.png" alt=""><figcaption></figcaption></figure>
* **Run/Stop PLC :** Press hold 2 sec for switch to toggle before mode.

  <figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-31.png" alt=""><figcaption></figcaption></figure>
* **Reset parameter config:** Reset Default Parameter config.

  <figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-32.png" alt=""><figcaption></figcaption></figure>

***

### **4. Programming WireLinx PLC**

#### **Supported Programming Languages**

* **Ladder Logic**

#### **Internal Memory Structure**

<table data-header-hidden data-full-width="true"><thead><tr><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Memory Type</strong></td><td><strong>Usage</strong></td><td><strong>Address Range</strong></td><td><strong>Capacity</strong></td></tr><tr><td><strong>X (Input Relays)</strong></td><td>Represents physical input points</td><td>X0 - X377</td><td>256 points</td></tr><tr><td><strong>Y (Output Relays)</strong></td><td>Represents physical output points</td><td>Y0 - Y377</td><td>256 points</td></tr><tr><td><strong>M (Internal Relays)</strong></td><td>General-purpose internal logic storage</td><td>M0 - M3071</td><td>3072 points</td></tr><tr><td><strong>S (Step Relays)</strong></td><td>Used for step sequence control</td><td>S0 - S999</td><td>1000 points</td></tr><tr><td><strong>D (Data Registers)</strong></td><td>Stores numerical values for processing</td><td>D0 - D7999</td><td>8000 words (16-bit each)</td></tr><tr><td><strong>D (Data System)</strong></td><td>Stores numerical values for processing</td><td>D8000 - D8250</td><td>251 words (16-bit each)</td></tr><tr><td><strong>T (Timers)</strong></td><td>Used for timing operations</td><td>T0 - T255</td><td>256 timers</td></tr><tr><td><strong>C (Counters)</strong></td><td>Used for counting operations</td><td>C0 - C199</td><td>200 counters</td></tr></tbody></table>

**See detail About D8000 - D8250**

***

### **5. Communication Protocols**

#### **Wi-Fi and Web-based Configuration**

* Wireless access to PLC settings.

  <br>

  <figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-18.png" alt=""><figcaption></figcaption></figure>
* Remote programming and monitoring.

#### **RS-232 and RS-485 Communication**

* **RS-232:** Used for general-purpose serial communication.
* **RS-485:** Ideal for industrial communication and Modbus RTU.

#### **Modbus RTU & Modbus TCP**

* Table Modbus Address Mapping common with ModbusTCP Server and ModbusRTU Slave Mode.

<table data-header-hidden data-full-width="true"><thead><tr><th></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Modbus</strong></td><td><strong>PLC</strong></td><td><strong>Type</strong></td><td><strong>Access</strong></td><td><strong>Function Code</strong></td><td><strong>Description</strong></td></tr><tr><td><strong>00001 - 01000</strong></td><td><strong>S0 - S999</strong></td><td><strong>Coil (Discrete Output)</strong></td><td>Read/Write</td><td>01 (Read) / 05, 15 (Write)</td><td>Stores ON/OFF values for outputs</td></tr><tr><td><strong>10001 - 11536</strong></td><td><strong>M1 - M1535</strong></td><td><strong>Discrete Input</strong></td><td>Read-only</td><td>02 (Read)</td><td>Stores ON/OFF values for inputs</td></tr><tr><td><strong>30001 - 33000</strong></td><td><strong>D0 - 02999</strong></td><td><strong>Input Register</strong></td><td>Read-only</td><td>04 (Read)</td><td>Stores analog input values</td></tr><tr><td><strong>40001 - 43000</strong></td><td><strong>D3000 - 05999</strong></td><td><strong>Holding Register</strong></td><td>Read/Write</td><td>03 (Read) / 06, 16 (Write)</td><td>Stores analog output and parameters</td></tr></tbody></table>

***

### **6. Working with I/O**

* #### Example input wiring connection

  <figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/input_wiring.png" alt=""><figcaption></figcaption></figure>
* #### Example output wiring connection

  <figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/output_wiring.png" alt=""><figcaption></figcaption></figure>

***

### **7. Safety and Maintenance**

***

### **Training Topics for Basic PLC**

#### prepare for trainee

* Notebook for training.
* install gx-work2.
* install ch340 driver. [**Download**](https://wch-ic.com/products/CH340.html)
* drawing training kit. **Download**

<figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/training_1.png" alt=""><figcaption></figcaption></figure>

### Why need choose PLC.

### 1.Ladder Logic Basics.

<table data-full-width="true"><thead><tr><th align="center">No.</th><th>Symbol</th><th>Description</th></tr></thead><tbody><tr><td align="center">1</td><td><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-7.png" alt="alt text"></td><td>Contact Normally Open</td></tr><tr><td align="center">2</td><td><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-9.png" alt="alt text"></td><td>Contact Normally Close</td></tr><tr><td align="center">3</td><td><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-8.png" alt="alt text"></td><td>Coil</td></tr><tr><td align="center">4</td><td><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-10.png" alt="alt text"></td><td>Timer</td></tr><tr><td align="center">5</td><td><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-11.png" alt="alt text"></td><td>Counter</td></tr><tr><td align="center">6</td><td><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-13.png" alt="alt text"></td><td>Instruction Set</td></tr></tbody></table>

**How to understand ladder logic.**

![alt text](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-36.png)

<figure><img src="https://github.com/donusdonus/WireLinx-official/raw/main/img/image-37.png" alt=""><figcaption></figcaption></figure>

### 2. Programming with GX-WORK 2.

2.1 new project and test connection[![Video Title](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-19.png)](https://youtu.be/2iR9Q22t5_0)

\
2.2 download ladder logic to plc.

[![Video Title](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-20.png)](https://www.youtube.com/watch?v=Tfad3BvSHQI)

\
2.3 upload ladder logic from plc.

[![Video Title](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-21.png)](https://www.youtube.com/watch?v=ina59Y-c82w)

\
2.4 monitoring and modify value.

[![Video Title](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-22.png)](https://youtu.be/pGsTwQJBvRU)

### 3. PLC Basic Programming Exercises.

3.1 Create simple ladder logic program to turn on an output when a switch is pressed<br>

```
    Objective : Basic Ladder Logic and applie.
    - Switch Selector X3 make Y0 ON.
    - Press Button X1 make Y2 ON.
    - Press Button X2 make Y3 ON.
```

![](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-26.png)

3.2 Write program to self-holding circuit a relay using a start and stop button.<br>

```
    Objective : Convert Electrical circuit to ladder logic.
    - Self hold circuit.
    - interlock coil between Y4 and Y5 for protect load short circuit.
    - Press button X1 make Y4 ON.
    - Press button X2 make Y5 ON.
    - Press button X0 for stop process
```

![](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-25.png)

\
3.3 Write timer to turn off relay automatically after a preset time.

```
    Objective : Convert Electrical circuit to ladder logic.
    - Switch X3 for start process.
    - When process start Y3 and Y4 on-off swap indcator inverval 1 sec (Timer1-Timer2)
```

![](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-27.png)

3.4 Write program to counter the number of cycle.

```
    Objective : use timer and counter on ladder logic.
    - Press button X1 for reset counter C0.
    - When C0 on stop process.
```

![](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-28.png)

\
3.5 Convert Electrical function process to ladder logic process.

```
    Objective : Convert Electrical circuit to ladder logic.
    - operation 2 mode 
      - 1.semi auto  
      - 2.auto
```

![](https://github.com/donusdonus/WireLinx-official/raw/main/img/image-15.png)

4\. **Communication Protocols** - Configuring RS-232 and RS-485 - Setting up Modbus communication

5. **Web-Based Configuration**
   * Connecting via Wi-Fi
   * Remote setup and diagnostics
6. **Troubleshooting & Maintenance**
   * Common PLC issues and solutions
   * Firmware updates and system diagnostics

***
