The Modicon M262 is the first PLC launched by Schneider Electric aimed at the Industrial Internet of Things (IIoT), capable of connecting directly to cloud platforms via protocols such as MQTT and HTTP, with TLS network security encryption.
The left side of the image below shows the traditional method of connecting PLCs to the cloud, which requires a protocol gateway for relay.
The right side shows the Modicon M262, which can connect directly to the cloud when accessing the internet through its Ethernet port, thus easily and conveniently achieving communication between machines and the cloud.

To further understand this IIoT-ready controller, I built a small IoT application using the Alibaba Cloud IoT platform and Schneider Electric’s Modicon M262.
System Architecture:

The M262 controls the LXM32S servo drive via the Sercos III bus and publishes information such as the speed and position of the servo motor to the Alibaba Cloud IoT platform via MQTT TLS, enabling remote device monitoring and management.
Development Steps:

1. Alibaba Cloud IoT Cloud Development
1. Log in to the console
Alibaba Cloud IoT platform
https://iot.console.aliyun.com
2. Create a new product
In the IoT console, go to Device Management – Products on the left, click to create a product, and enter the product information.

3. Define the product model
In the product details – Function Definition tab, add defined attributes.

4. Add devices
In the IoT console, go to Device Management – Devices on the left, click to add a device, and select the product created in the previous step.

5. Device identity
Remember the ProductKey, DeviceName, and DeviceSecret;

2. Modicon M262 Side Development
1. Connect Ethernet port 2 to the router via an Ethernet cable, configured for DHCP address allocation. This step aims to connect the PLC to the internet;
2. Connect Ethernet port 1 to the LXM32S servo for controlling and collecting servo motor data;
3. Import the Alibaba Cloud root certificate in the “Security Screen” of the Machine Expert software;

4. Program Implementation
4.1. The server address for the IoT platform of Alibaba Cloud or other clouds is mostly a domain name, but the MQTT function block only supports IP addresses, so domain name resolution is required first;
Domain name format:
${YourProductKey}.iot-as-mqtt.${region}.aliyuncs.com
Resolution method:
This can be achieved through the FB_DNSClient block or other online tools;
4.2. Generate Username and Password based on the identity information of the cloud device;



4.3. Construct JSON formatted data for publishing to the cloud;

4.4 The MQTT client program is as follows:

3. Online Operation
Run the PLC program;
Open the Alibaba Cloud IoT console;

……
This is the implementation process of connecting the machine directly to the cloud via the Modicon M262.
IIoT, here we come, are you ready?
