uplc.h

来自「以atmel AT89C51为核心的超小型PLC源代码」· C头文件 代码 · 共 44 行

H
44
字号
/*
*********************************************************************************************************
*                                     uPLC

*				   Using the Keil uVision2 compiler
*
* File : uPLC.h
*********************************************************************************************************
*/
#ifndef		_uPLC_H_
#define		_uPLC_H_

#define uPLC_IR_SIZE	          	10    /* Size of inter relays */
#define uPLC_HR_SIZE				5    /* Size of Hoding relays   */
#define uPLC_SR_SIZE				10    /* Size of Special relays   */
#define uPLC_DM_SIZE				10    /* Size of memory   */
#define uPLC_TIM_SIZE				10	//maxinum number of Timer 
#define uPLC_CNT_SIZE	 			5	//Maxinum number of counter
///////////////////////////////////////////////////////////////////////////

/*********************************************************************************************************
*                                          uPLC ERROR CODES
*********************************************************************************************************/

#define InsSize						35
#define uPLC_ERR_NO                 0
#define uPLC_ERR_TIMEOUT            10
#define uPLC_ERR_COMM	            11   //Communication ERR
/////////////////////////////////////////////////////////////////////////
/*********************************************************************************************************
*                                       uPLC FUNCTION PROTOTYPES
*********************************************************************************************************/
void 		ExecuteLadder(char *p);
void		ReflashTIM(void);
void		uPLCInit(void);
int	*		GetIR(void);
int	*		GetSR(void);
int	*		GetHR(void);
int	*		GetDM(void);

void		CheckLadder(char *p);

#endif	//_uPLC_H_

⌨️ 快捷键说明

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