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

📄 dtl.h

📁 AB_5000_PLC以太网通讯动态连接库
💻 H
📖 第 1 页 / 共 5 页
字号:
	unsigned char	bPushwheel;	// PI Gateway pushwheel (0-4).
	unsigned char	bChannel;	// PI Gateway channel (2-3).
	unsigned long	dwLength;
	char			szName[DTL_DTSA_NAME_MAX];	// PI hostname.
};

#define DTSA_AB_DF1MASTER struct dtsa_ab_df1master
DTSA_AB_DF1MASTER
{
	unsigned long	atype;
	long		driver_id;
	unsigned char	bDstStation;	// Final destination station
	unsigned char	bPollStation;	// Polling station address on DF1
};

#define DTSA_AB_CIP_PATH struct dtsa_ab_cip_path
DTSA_AB_CIP_PATH
{
	unsigned long	atype;
	long		driver_id;
	unsigned short	wControl;
	unsigned long	dwLength;
	unsigned char	baPath[1];
};

#define DTSA_AB_CIP_CONN struct dtsa_ab_cip_conn
DTSA_AB_CIP_CONN
{
	unsigned long	atype;
	long		driver_id;
	unsigned long	dwConnection;
};

#define DTSA_AB_DH_CIP_PATH struct dtsa_dh_ab_cip_path
DTSA_AB_DH_CIP_PATH
{
	unsigned long	atype;		// NOTE: This begins a DTSA_AB_DH_OFFLINK.
	long		driver_id;
	unsigned short  wControl;
	unsigned char   bLocalDST;
	unsigned char   bDLSAP;
	unsigned short	wDLink;
	unsigned short	wDStn;
	unsigned char	bSLSAP;
	unsigned short	wSLink;
	unsigned short	wSStn;
	unsigned char	bLftm;		// NOTE: This ends a DTSA_AB_DH_OFFLINK.
	unsigned long	dwLength;
	unsigned char	baPath[1];
};

/* The following defines are valid flag bits for the wControl member of these DTSA structures:
 *	DTSA_AB_DH_OFFLINK
 *	DTSA_AB_PIGATEWAY
 *	DTSA_AB_PIGATEWAY_IP
 *	DTSA_AB_PIGATEWAY_NAME
 */
#define	DTL_ROUTEFLAG_BRIDGETYPE_MASK		(0x000f)
#define		DTL_ROUTEFLAG_BRIDGETYPE_NONE	(0x0000)
#define		DTL_ROUTEFLAG_BRIDGETYPE_KA	(0x0001)
#define		DTL_ROUTEFLAG_BRIDGETYPE_KA5GW	(0x0002)
#define		DTL_ROUTEFLAG_BRIDGETYPE_IP	(0x0003)
#define		DTL_ROUTEFLAG_BRIDGETYPE_RAW	(0x0004)
#define	DTL_ROUTEFLAG_SOURCEUSE_MASK		(0x0010)
#define		DTL_ROUTEFLAG_SOURCEUSE_YES	(0x0010)
#define		DTL_ROUTEFLAG_SOURCEUSE_NO	(0x0000)
#define	DTL_ROUTEFLAG_BRIDGESTN_MASK		(0x0020)
#define		DTL_ROUTEFLAG_BRIDGESTN_YES	(0x0020)
#define		DTL_ROUTEFLAG_BRIDGESTN_NO	(0x0000)

/* The following defines are valid flag bits for the wControl member of these DTSA structures:
 *	DTSA_AB_CIP_PATH
 */
#define	DTL_ROUTEFLAG_CIP_PRIORITY_MASK		(0x0001)
#define		DTL_ROUTEFLAG_CIP_PRIORITY_LOW	(0x0000)
#define		DTL_ROUTEFLAG_CIP_PRIORITY_HIGH	(0x0001)
#define	DTL_ROUTEFLAG_CIP_DISPATCH_MASK		(0x0006)
#define		DTL_ROUTEFLAG_CIP_UNCONNECTED	(0x0002)
#define		DTL_ROUTEFLAG_CIP_CONNECTED	(0x0004)

/* The following defines are valid flag bits for the flags member of the DTSA structures. */
#define	DTL_VIA_1785_KA	1		/* 1785-KA bit for flags field */

#define DTUD_TYPE  struct dtud_type

DTUD_TYPE {
	unsigned short	app_addr;
	short		elements;
	short		app_data_type;
	short		plc_data_type;
};


/*----  report types  ----*/
#define REPORT_TYP_UDC		0x0001

/*----  U/D/C progress report structure  ----*/
typedef struct {
	unsigned long	rtype;		/* type and version of report struct */
	unsigned long	phase;		/* phase of U/D/C operation          */
	unsigned long	section;	/* section type of current file      */
	unsigned long	file;		/* # of current file in its section  */
	unsigned long	file_bytes;	/* # of bytes in current file        */
	unsigned long	bytes_done;	/* # of bytes processed in file      */
	unsigned long	total_bytes;	/* # of bytes for entire operation   */
	unsigned long	total_done;	/* # of bytes processed in operation */
	unsigned long	total_files;	/* # of files for entire operation   */
	unsigned long	files_done;	/* # of files processed in operation */
} REPORT_UDC;

/*----  U/D/C phases  ----*/
#define DTL_UDC_CHK_MATCH	1	/* check if source/dest types match  */
#define DTL_UDC_CHK_COMPAT	2	/* check image compatibility         */
#define DTL_UDC_GET_FILES	3	/* transfer/compare files            */

/*----  U/D/C section types  ----*/
#define DTL_UDC_FILE_DIR	1	/* directory file                    */
#define DTL_UDC_FILE_DATA	2	/* data tables                       */
#define DTL_UDC_FILE_PROGRAM	3	/* program files (ladder/SFC)        */
#define DTL_UDC_FILE_FORCE	4	/* force tables                      */
#define DTL_UDC_FILE_PLC2	5       /* PLC-2 compatibility files         */
#define DTL_UDC_FILE_CONFIG	6	/* unspecified configuration files   */
#define DTL_UDC_FILE_IO_CFG	7	/* I/O configuration files           */
#define DTL_UDC_FILE_COMM_CFG	8	/* communication configuration files */
#define DTL_UDC_FILE_INTERNAL   9	/* internal files                    */
#define DTL_UDC_FILE_COPROC	10	/* coprocessor section               */

/*
 * Control flag bits for DTL_COMPARE...
 */
#define DTL_CMP_PROCTYPE	0x001	/* Memory images must be of the same */
					/* processor type (eg.PLC-5/15)      */

#define DTL_CMP_PROCSER_BIT	0x002
#define DTL_CMP_PROCSER		0x003	/* Memory images must be of the same */
					/*  series. This mask includes       */
					/* DTL_CMP_PROCTYPE.                 */

#define DTL_CMP_PROCREV_BIT	0x004
#define DTL_CMP_PROCREV		0x007	/* Memory images must be of the same */
					/* revision. This mask includes      */
					/* DTL_CMP_PROCTYPE, DTL_CMP_PROCSER */

#define DTL_CMP_PROCMEM		0x008	/* Memory images must have the same */
					/* memory size. */

#define DTL_CMP_NUMDT		0x010	/* Memory images must have the same */
					/* number of data table files.      */

#define DTL_CMP_NUMPROG		0x020	/* Memory images must have the same */
					/* number of program files.         */

#define DTL_CMP_DATATABLES	0x040	/* Compare the data tables. */
#define DTL_CMP_FORCES		0x080	/* Compare the forces. */
#define DTL_CMP_PROGDIR		0x100	/* Compare program directories. */
#define DTL_CMP_LADDER		0x200	/* Compare the ladder logic. */
#define	DTL_CMP_NAME		0x400	/* Compare the program name  */
#define	DTL_CMP_SFC		0x800	/* Compare the SFCs          */


/*
 * Control flag bits for DTL_DOWNLOAD...
 */
#define DTL_DWN_MATCH		0x001	/* Download only if PLC Type, */
					/* Revision and Series match exactly */

#define DTL_DWN_IGNCFGWARN	0x002	/* Ignore warnings from physical */
					/* configuration of processor */

#define DTL_DWN_REMOTE		0x004	/* Enable download in remote program */
					/* mode */

#define DTL_DWN_BEGIN_BIT	0x008	/* Single bit definition for */
					/* internal use only */

#define DTL_DWN_BEGIN		DTL_DWN_REMOTE | DTL_DWN_BEGIN_BIT
					/* Enable mode change from remote run */
					/* or remote test to remote program */
					/* before download if DTL_DWN_REMOTE */
					/* is also set */

#define DTL_DWN_END_BIT		0x010	/* Single bit definition for */
					/* internal use only */

#define DTL_DWN_END		DTL_DWN_BEGIN | DTL_DWN_END_BIT	
					/* Restore the original mode after */
					/* download if it was changed before */

#define DTL_DWN_CLR_FLT		0x020	/* Clear major faults before download */
					/*  if PLC is faulted. */

#define DTL_DWN_FORCE_SFC	0x040	/* Enable SFC forces in PLC */
					/* if they are in archive file. */

#define DTL_DWN_FORCE_OUT	0x080	/* Enable output forces in PLC */
					/* if they are in archive file. */

#define DTL_DWN_FORCE_EDITS	0x100	/* Enable test edits in PLC */
					/* if they are in archive file. */

/*
 * Control flag bits for DTL_UPLOAD...
 */
#define DTL_UP_RUN	0x01	/* Enables upload in modes where */
				/* data table values may be changing */

#define DTL_UP_FAULT	0x02	/* Enables upload when PLC is faulted */

/*
 * Master Control flag bits for DTL_UPLOAD, DTL_DOWNLOAD, DTL_COMPARE
 */
#define DTL_UP_MASTER_FLAG	( DTL_UP_RUN | DTL_UP_FAULT )
#define DTL_DWN_MASTER_FLAG	( DTL_DWN_MATCH | DTL_DWN_IGNCFGWARN | \
				  DTL_DWN_REMOTE | DTL_DWN_BEGIN | \
				  DTL_DWN_END | DTL_DWN_CLR_FLT | \
				  DTL_DWN_FORCE_SFC | DTL_DWN_FORCE_OUT | \
				  DTL_DWN_FORCE_EDITS )
#define DTL_CMP_MASTER_FLAG	( DTL_CMP_PROCTYPE | DTL_CMP_PROCSER | \
				  DTL_CMP_PROCREV | DTL_CMP_PROCMEM | \
				  DTL_CMP_NUMDT | DTL_CMP_NUMPROG | \
				  DTL_CMP_DATATABLES | DTL_CMP_FORCES | \
				  DTL_CMP_PROGDIR | DTL_CMP_LADDER | \
				  DTL_CMP_NAME | DTL_CMP_SFC )

/*
 * Control flag bits for DTL_GET_FAULTS/DTL_CLEAR_FAULT...
 */
#define DTL_MINOR_FAULTS	0x0001 /* get or clear minor faults */
#define DTL_MAJOR_FAULTS    	0x0002 /* get or clear major faults */
#define DTL_OLD_MAJOR_FAULTS    0x0004 /* get or clear old major faults */

/* PLC modes (moved here from dtl_diag.h) */
/* PLC , PLC-2, PLC-3, PLC-5, PLC-5/250, SLC-500 */
#define  DTL_MODE_PRG    0	/* Program load */
#define  DTL_MODE_TST    1	/* Test */
#define  DTL_MODE_RUN    2	/* Run */
#define  DTL_MODE_RSVD1  3	/* Reserved for future use */
#define  DTL_MODE_RPRG   4	/* Remote program load */
#define  DTL_MODE_RTST   5	/* Remote test */
#define  DTL_MODE_RRUN   6	/* Remote run */
#define  DTL_MODE_RSVD2  7	/* Reserved for future use */
#define  DTL_MODE_TCSN   7	/* SLC500 Test Continuous Scan Mode */
#define  DTL_MODE_TSSN   8	/* SLC500 Test Single Scan Mode */
#define  DTL_MODE_TSRG   9	/* SLC5/03 & above Test Single Step Mode */
#define  DTL_MODE_SLCPRG 17	/* SLC5/03 Remote Program */
#define  DTL_MODE_SLCRUN 30	/* SLC5/03 Remote Run */

/**********
 * Version
 **********/

/* A character buffer of this many elements is guaranteed to be
 * able to hold the string returned by the DTL_VERSION function.
 */
#define	DTL_VERSION_SIZE	(128)

/*---- Structure filled in by DTL_VERSION_EX() function ----*/
typedef struct version
{
	DWORD	dwType;		// The type of this structure. You must pass in the DTL_VERSION_TYPEx constant below.
#		define DTL_VERSION_TYPE1	(1)
	DWORD	dwSize;		// The size of the rest of this structure. You must pass in the DTL_VERSION_TYPE1 constant.
	DWORD	dwVersion[4];			// Version, stored such that 1.60.17.0 would appear in +0...+3, respectively.
	char	szName[DTL_VERSION_SIZE];	// DLL name (i.e. DTL32.DLL).
	char	szBuilt[DTL_VERSION_SIZE];	// Build date string.
	char	szVersion[DTL_VERSION_SIZE];	// Version string.
	char	szDescription[DTL_VERSION_SIZE];// DLL Description string.
	char	szCopyright[DTL_VERSION_SIZE];	// DLL Copyright string.
	char	szOldVersion[DTL_VERSION_SIZE];	// Same string returned from DTL_VERSION().
} sVERSION;

⌨️ 快捷键说明

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