Web Server Communication Program
Preliminary Information
The PLC-S CM3-SP32MDTF-SD or CM3-SP32MDCF-SD CPU can host a web server. The web server allows the user to control data registers, CPU functions, and more. The web server runs on HTML, while most browsers use HTML5. However, most browsers can read HTML websites, allowing the web server to be viewed in browsers like Google Chrome, Mozilla Firefox, and Microsoft Edge.
Important notice: When the web server firmware is loaded onto the PLC-S CPU, the CPU will lose all non-web server Ethernet functionality. The CIMON Protocol, Modbus, and more will not work through the Ethernet port. A communication module like the CM3-SP01EET will be required to use the CPU's original Ethernet functionality.
- Required items:
- PLC-S CM3-SP32MDTF-SD or CM3-SP32MDCF-SD CPU
- PLC-S CPU Web firmware:
- CM3-SP32MDCF-SD
- CM3-SP32MDTF-SD
- SD Card
Create a WEB folder on the SD Card
- Plug the SD card into the computer. On the SD card, create a folder named WEB.
Load the Web Server Firmware on the PLC-S CPU
- Connect the CPU to CICON. To do this, navigate to Online and Connect. To change the method of connecting to the PLC-S, navigate to Online and Connect Option. Afterwards, click Connect.
Optionally, the Connect icon in the toolbar can be clicked.
- Navigate to Online and click Firmware Upgrade.
![]()
- Click the Path button to navigate to the web server firmware's location. An example firmware name is SP32MDT_v0630_2307_SVN2586_WEB.bin. The firmware file must match the CPU type.
- Once the path is selected, the firmware should appear in the white box. Click the firmware to install, and then click OK.
![]()
- Click Yes to load the firmware onto the PLC-S CPU.
This will appear while the firmware is downloading:
![]()
- Once the firmware is downloaded, switch the PLC-S CPU to STOP MODE, POWER CYCLE the PLC-S CPU, and switch the PLC-S CPU to RUN MODE.
Create a New Web Server Project
- Select the PLC-S and click Next.
![]()
- Name the project, select the path, and click OK.
![]()
- In the Project Tree, right-click Program and click New Program.
- Create a new Web Server Setting program. Select OK when finished.
![]()
- Select the Port to use, User Security (optional), and IP Address Security (optional), and click OK.
Configure the Web Server Manager
The Web Server Manager is where the web pages for the web server are configured.
- Navigate to the Tool drop-down and select Web Server Manager.
- This is where you can configure the web server name and primary page that will appear in the browser tab in green. To create a new page, select New page.
![]()
- Create a name for the page. CICON will notify you if the name of the page is not valid. Select Ok when finished.
- The information in green is an optional setting to configure for the web server. To add controlled data registers to the web server, select Device.
![]()
- These are the data register settings. The Device information box specifies the data register to include on the web server. This consists of all allowable data registers: M, X, Y, K, L, F, T, C, S, Z, R, Q, and D. The information in green defines the variable data type, name, read or write, and description.
- All the added data registers will appear in the gray box highlighted in blue. Once complete, click Ok.
![]()
- To add the new page, click the page under the File name highlighted in blue. Then, click Add menu links.
![]()
- All pages to add to the web server will appear in the gray box highlighted in blue. Once complete, select Next.
![]()
- The files on the left will be written to the SD card. Confirm that the SD card is inserted into the PLC-S CPU. Click Save.
![]()
- After clicking Save, this message will appear, notifying that the information has been saved. Click OK.
- Click Write to PLC. When the Remote-RUN window appears, select Yes.
Connecting to the Web Server
- Navigate to a browser that supports HTML. Make sure the PLC is connected to the network properly via Ethernet. The Ethernet cord must be plugged into the PLC-S CPU. In the browser’s search bar, Type the IP address of the PLC followed by a colon and the port defined in the Web Server Project.
- The web server will redirect to the main page defined in the Web Server Manager. This is where the data registers can be modified. Click edit to modify a data register's value.
![]()
- Enter a value allowed by the data register’s data type. This example uses a DWORD data register. After clicking send, the Success! message will appear in the bottom left.
![]()
- The value of the data register on the web page will appear to be updated.
- In CICON, the Memory Monitor will also display the updated changes made on the web server.
Adding Security to the Web Server
- To add security to the web server, navigate to the Web Server Project. Check either User Security, IP Address Security, or both. When complete, click Save.
- In the Project Tree, right-click Program and click New Program. Create a new Security(User / IP) program. Click OK.
![]()
Enable User ID Security
- In the newly created Security(User / IP) program, check the User ID box.
- Click Add to add a new user to the web server.
- Create a user ID, password, and user level. When finished, click Check ID to ensure the user ID is valid. If the success message says OK, click Add.
- All added users will appear in the white box below. Once complete, click Save.
![]()
Enable User IP Address Security
- To allow only specific IP addresses to view the web server, check the User IP Address box in the newly created Security(User / IP) program.
- Under the IP Address tab, select Add to add new IP addresses to the security program.
- Enter the IP address of the computer or device allowed to access the web server. The IP address must be on the same network as the web server/PLC-S CPU. Click Add.
- All IP addresses added will appear in the white box below. Once complete, select Save.
- The following page will appear on the web server's main page. If User IP Address is enabled, only IP addresses allowed to view the web server will see this page. Otherwise, the page will continuously load and never display on the web server.
If User ID is enabled, the login page shown below will appear. The user viewing the page must know the user ID and password defined when enabling the User ID. Otherwise, they cannot log in to the main web page on the web server.