EasyManuals Logo

COTRUST CTH200 Series User Manual

COTRUST CTH200 Series
350 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #146 background imageLoading...
Page #146 background image
Applications
136
6.2.3 Operating Steps
Step 1: Connection
Connect PC with Modbus_TCP master with a standard network cable.
Step 2: Set Communications
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 the Modbus master (CTH200 PLC)
1) Open the Program Block in MagicWorks PLC to program for the Modbus_TCP master. You
can use either Ct_Mbus_master_tcp_single library or Modbus TCP Wizard, here are
MBTCPS_EXE instruction from Ct_Mbus_master_tcp_single library as example:
<Note> If multiple R/W operations need to be configured, it’s recommended to use the Modbus
TCP Wizard in the MagicWorks PLC. For details, refer to Magicworks PLC User Manual.
2) When finishing program, compile and download it into Modbus_TCP master device.
The following table is the definition of MBTCPS_EXE instruction
Symbol
Variable
type
Data
type
Description
EN
IN
BOOL
Enable instruction
RUN
IN
BOOL
Start communication, edge triggered
CmdIndex
IN
BYTE
number for calling MBTCPS_EXE, which cannot
be repeated, valid range 1~255
SlaveIP0
IN
BYTE
1st byte of the slave address
SlaveIP1
IN
BYTE
2nd byte of the slave address
SlaveIP2
IN
BYTE
3rd byte of the slave address
SlaveIP3
IN
BYTE
4th byte of the slave address
SlavePort
IN
WORD
Monitored port of slave, if the slave is a CTH200
PLC, then the port is default as 502.
RW
IN
BYTE
Read = 0; Write = 1
RemoteAddr
IN
DWORD
ModBus Address (default as 40001)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the COTRUST CTH200 Series and is the answer not in the manual?

COTRUST CTH200 Series Specifications

General IconGeneral
BrandCOTRUST
ModelCTH200 Series
CategoryController
LanguageEnglish