⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sc_cfg.h

📁 一个完整的RTU程序源码,用DOS平台,支持16串口,在天津港用的很多,8个规约103,modbus,cdt,1801,u4f
💻 H
字号:
// enable function
#ifndef _SC_CFG_H_
#define _SC_CFG_H_
//#define YX_INT_SAM
//#define CACULATE
//#define CAL_GEAR
#define PROTOCOL_SET_SIZE		6

#define YX_SAMPLE
#define YC_SAMPLE
#define YM_SAMPLE

#define UPDATE_WINDOW_GAP					2
#define YM_SAMPLE_GAP						 10
#define PROTECT_RESET_GAP				 6000

#define MAX_PORT									16
#define SLAVE_STATION_PORT_TOTAL	16

#define MAX_SLAVE								 64

#define BOARD_SOURCE							100

#define BOARD_YC_SOURCE						0
#define PORT_YC_SOURCE						1

#define BOARD_YX_SOURCE						0
#define PORT_YX_SOURCE						1

#define BOARD_YK_SOURCE						0
#define PORT_YK_SOURCE						1

#define BOARD_YM_SOURCE						0
#define PORT_YM_SOURCE						1

#define YX_QD_GAP								50

#define YX_WAIT_STABLE					200

#define MAXCARD		6
// max board number
#define MAXYXBOARD							16
#define MAXYCBOARD							4
#define MAXYMBOARD							4
#define MAXYKBOARD							8

#define MAX_YX_LIMIT									1024
#define MAX_YC_LIMIT									256
#define MAX_YM_LIMIT									128
#define MAX_YK_LIMIT									128

#define BOARD_YX_LIMIT							512
#define BOARD_YC_LIMIT							256
#define BOARD_YM_LIMIT							128
#define BOARD_YK_LIMIT							128

#define MAXPORTYX								512
#define MAXPORTYC								256
#define MAXPORTYM								128
#define MAXPORTYK								128

#define RX_COM_BUF_SIZE					256
#define TX_COM_BUF_SIZE					256
#define SOE_BUF_SIZE						256
#define YXBW_BUF_SIZE						256
#define KEYIN_BUF_SIZE					20
#define BOOT_LOG_SIZE						20
#define MAXFILEBUF						  256

#define NBB_RECE_BUFSIZE				40
#define IEC103_RECE_BUFSIZE			256
#define	MODBUS_RECE_BUFSIZE			512
#define DL645_RECE_BUFSIZE			256
#define LFP_RECE_BUFSIZE				256

#define IEC103_SEND_BUFSIZE			256
#define MODBUS_SEND_BUFSIZE			256
#define DL645_SEND_BUFSIZE			256
#define LFP_SEND_BUFSIZE				256

// message color table
#define YC_COLOR								GREEN
#define YX_COLOR								YELLOW
#define YM_COLOR								WHITE
#define YK_COLOR								CYAN
#define SOE_COLOR								BROWN
#define TIME_COLOR							MAGENTA
#define	SYNC_COLOR							RED
#define POLL_SEND_COLOR					LIGHTRED
#define POLL_RECE_COLOR					YELLOW

#define YX_DEFINE_ITEM_TOTAL    7
#define YC_DEFINE_ITEM_TOTAL    5
#define YM_DEFINE_ITEM_TOTAL    4
#define YK_DEFINE_ITEM_TOTAL    4

#define MA_TO_B_NUM							2

#define TYPE_COMM	255

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -