Applications
Using a standard cable to connect the PC with UDP_PPI master (CTH200).
Step 2: Set communication
Create a new project in MagicWorks PLC and add a CTH200 station, refer to chapter 2.2
Communicate with CTH200 PLC Communication Settings to establish a communication
connection between CTH200 PLC and PC.
Step 3: Program for UDP_PPI master (CTH200)
There are two methods to Read/Write the UDP_PPI Master.
Using UDP_NETR/UDP_NETW Instructions to program for the UDP_PPI Master
Parameter table for UDP_NETR/UDP_NETW Instruction:
The 1st byte for IP Address
The 2nd byte for IP Address
The 3rd byte for IP Address
The 4th byte for IP Address
The upper byte for port number
The lower byte for port number
The 1st byte for remote station pointer <I, Q, M, V, DB> (4 bytes)
The 2nd byte for remote station pointer
The 3rd byte for remote station pointer
The 4th byte for remote station pointer
D: Done (Function completely), 0= No, 1=Yes
A: Active (function sequence), 0=No, 1=Yes
E: Error, 0=No, 1=Yes
The lower 4 bits of the 1st byte is error code, defined as following:
Timeout Error; no response from remote station
Receive error; validation, frame or checksum error in the response
Offline error; duplicate address or Conflicts resulted by hardware fault
Queue overflow error; activated more than 8 UDP_NETR/UDP_NETW
block
illegal parameter; UDP_NETR/UDP_NETW table contains an illegal or
invalid value
No resources; the remote station is busy (uploading or downloading
sequences)
Error in layer 7; violate the application protocol
Information error; Data address error or Data length incorrect