Part 5: Peer-to-peer with Cytron IRIV PiControl and CODESYS

Part 5: Peer-to-peer with Cytron IRIV PiControl and CODESYS

Introduction

Most of the time, we can use our Cytron IRIV PiControl as a CODESYS PLC Controller by connecting both the IRIV PiControl and our laptop to an existing local network. However in the event an existing network is unavailable to be used, a connection between your laptop can be established with an IRIV PiControl as a CODESYS PLC Controller using peer-to-peer technique. 

Hardware

To complete this part of the tutorial, we will need the following hardware:

  • Cytron IRIV PiControl

  • Ethernet cable

 

Plug an ethernet cable connecting the IRIV PiControl to your laptop. For this tutorial, we will be using a laptop running Windows 10 operating system.

 

Take note of which of the 2 ethernet ports you used on the IRIV PiControl. The 10/100M or Gigabit port. 

 

 

Software

Turn on your IRIV PiControl and click on the network icon from the top right corner of the desktop. Select Advanced Options and then select Edit Connections…

 

 

Now select either Wired connection 2 or Wired connection 1 based on which of the 2 ethernet ports you used on the IRIV PiControl.

 

If you used the 10/100M ethernet port, select Wired Connection 2

 

If you used the Gigabit Ethernet port, select Wired Connection 1

 

 

 

Click on the IPv4 Settings tab, select Manual from the drop down next to Method, click Add, populate the Address, Netmask and Gateway fields accordingly. Lastly, click Save.

 

Address

192.168.1.2

Netmask

24

Gateway

192.168.1.1

 

 

On your Windows computer, open the network configuration window by first pressing Win + R. Then type in ncpa.cpl and hit enter

 

Select your network adapter and click Change settings of this connection

 

 

Select Internet Protocol Version 4 (TCP/IPv4) and click Properties

 

 

Select Use the following IP address and populate the IP address, Subnet mask, and Default gateway fields accordingly. Lastly, click Save.


 

Address

192.168.1.3

Subnet mask

255.255.255.0

Gateway

192.168.1.1

 

 

Open the command prompt by first pressing Win + R. Then type cmd and hit enter

 

 

Type in ping 192.168.1.2 and hit enter

 

 

It should say Sent = 4, Received = 4. This means that the peer-to-peer connection has been established successfully. 

 

Back in CODESYS, we can try to login into the IRIV PiControl. First, we must double-click the "Device (CODESYS Control for Raspberry Pi…)".

 

The device configuration window will open.

 

 

In the communication settings window, click on Scan Network

 

 

Next, select IRIV PiControl under “Gateway” and then click Ok

 

 

Type in "Admin" for the Name and "admin" for the Password. Then click OK. 

 

NOTE: If you used custom particulars for the name, password, and confirm password earlier, use your custom particular instead.

 

 

Next, click the login button

 

 

You should now be successful in logging into your IRIV PiControl as a CODESYS PLC Controller using the peer-to-peer technique. 

Hardware Components




Chat hỗ trợ
Chat ngay