阅读( 238 ) 我要纠错

8.3.6、 设置IP地址

TCP 端口号,默认值为 5005  UDP端口号为5007 BX-5MK系列只支持单机直连和固定 IP 模式。

参数

数据长度

默认值

描述

CmdGroup

1

0XA4

命令分组编号

Cmd

1

0x05

命令编号

 

Response

 

1

 

0x01

是否要求控制器回复。

0x01——控制器必须回复 0x02——控制器不必回复

Reserved

2

0

保留

 

 

 

 

 

ConnnectMode

 

 

 

 

 

1


控制器连接模式:

0x00–单机直连(PC与控制 器直接连接)

0x01 – 自动获取

IP DHCP

0x02 – 手动设置 IP Static IP

0x03 – 服务器模式(动态 IP

 

Static IP Settings

Static IP

Settings

Static IP

Settings

 

Static IP Settings

IPAddress

4


IP 地址

SubnetMask

4


子网掩码

Gateway

4


默认网关

Port

2


端口号

 

Server Mode Settings

Server Mode

Settings

Server Mode

Settings

 

Server Mode Settings

 

ServerMode

 

1


服务器模式是否使能,

1 – 使能,  0  禁止

ServerIPAddress

4


服务器 IP 地址

ServerPort

2


服务器,端口号

ServerAccessPassword

8


服务器访问密码

HeartBeatInterval

2


心跳时间间隔(单位:秒)

NetID

12


控制器网络 ID


  实例:

A5 A5 A5 A5 A5 A5 A5 A5 FE FF 00 80 00 00 00 00 00 00 FE 02 31 00 A4 05 01 00 00 02 C0 A8 00 EB FF FF FF 00 C0 A8 00 01 8D 13 00 C0 A8 00 01 71 17 30 30 30 30 30 30 30 30 14 00 42 58 2D 4E 45

54 30 30 30 30 30 16 90 5A


×