亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? msz_rab.lib

?? modbus 運(yùn)用事例
?? LIB
?? 第 1 頁 / 共 3 頁
字號:
	return( serDgetc() );
}


int msXread(void *data, int length, unsigned long tmout)
{
	return( serDread(data, length, tmout) );
}

nodebug
int msSend(char *pcMess, unsigned wLen)
{
	int done;
	msDtx();	
	done = serDwrite(pcMess, wLen);
	msDrx();
	return done;
}

/* START FUNCTION DESCRIPTION *****************************************
msrDinit                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: int msrDinit(unsigned wAddr, unsigned long qBaud)

DESCRIPTION: Initialize serial port D as a Modbus RTU Slave.

PARAMETER1: slave address.
PARAMETER2: baud rate (bits per second).

RETURN VALUE: 1 if successful, 0 if unsupported baud rate.
END DESCRIPTION ******************************************************/
nodebug
int msrDinit(unsigned wAddr, unsigned qBaud)
{
	msrInit(wAddr, 1 + 35000u/qBaud);
	return msDinit(qBaud);
}

/*** BeginHeader */
#if ( _CPU_ID_ >= R3000 )
/*** EndHeader */

/*** BeginHeader msrEinit */
int msrEinit(unsigned, unsigned);
/*** EndHeader */

int msXgetc()
{
	return( serEgetc() );
}


int msXread(void *data, int length, unsigned long tmout)
{
	return( serEread(data, length, tmout) );
}

nodebug
int msSend(char *pcMess, unsigned wLen)
{
	int done;
	msEtx();	
	done = serEwrite(pcMess, wLen);
	msErx();
	return done;
}

/* START FUNCTION DESCRIPTION *****************************************
msrEinit                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: int msrEinit(unsigned wAddr, unsigned long qBaud)

DESCRIPTION: Initialize serial port E as a Modbus RTU Slave.
				 (for Rabbit 3000 or higher CPU's)

PARAMETER1: slave address.
PARAMETER2: baud rate (bits per second).

RETURN VALUE: 1 if successful, 0 if unsupported baud rate.
END DESCRIPTION ******************************************************/
nodebug
int msrEinit(unsigned wAddr, unsigned qBaud)
{
	msrInit(wAddr, 1 + 35000u/qBaud);
	return msEinit(qBaud);
}

/*** BeginHeader msrFinit */
int msrFinit(unsigned, unsigned);
/*** EndHeader */

int msXgetc()
{
	return( serFgetc() );
}


int msXread(void *data, int length, unsigned long tmout)
{
	return( serFread(data, length, tmout) );
}

nodebug
int msSend(char *pcMess, unsigned wLen)
{
	int done;
	msFtx();	
	done = serFwrite(pcMess, wLen);
	msFrx();
	return done;
}

/* START FUNCTION DESCRIPTION *****************************************
msrFinit                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: int   msrFinit (unsigned wAddr, unsigned long qBaud)

DESCRIPTION: Initialize serial port F as a Modbus RTU Slave.
					(for Rabbit 3000 or higher CPU's)          

PARAMETER1: slave address.
PARAMETER2: baud rate (bits per second).

RETURN VALUE: 1 if successful, 0 if unsupported baud rate.
END DESCRIPTION ******************************************************/
nodebug
int msrFinit(unsigned wAddr, unsigned qBaud)
{
	msrInit(wAddr, 1 + 35000u/qBaud);
	return msFinit(qBaud);
}

/*** BeginHeader */
#endif 	// #if (_CPU_ID_ >= R3000) 
/*** EndHeader */


/* START FUNCTION DESCRIPTION *****************************************
msAinit                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: 	int msAinit(unsigned qBaud)

DESCRIPTION: User function for
				 Initializing serial port A as a Modbus ASCII Slave.
				 
				 This function must reside in your application code.
				 Typical code for this function would be the following;
				 
int msAinit(unsigned qBaud)        
{
	// Open the serial port.  THIS MUST BE DONE PRIOR TO SETTING THE
	// DATA BITS AND PARITY SETTINGS.
	
	serAopen(qBaud); 
	  
	// setup parity.  Either PARAM_OPARITY, PARAM_EPARITY, PARAM_NOPARITY, 
	// or PARAM_2STOP  
	
	serAparity(PARAM_EPARITY);
	 
	// setup data bits. Either PARAM_7BIT, or PARAM_8BIT 
	 
	serAdatabits(PARAM_8BIT);
	
  	// Set the Serial port mode. Used for Zworld SBC's only.  
  	
	serMode(0);  
	
	return(1);
}
				 

PARAMETER1: slave address.
PARAMETER2: baud rate (bits per second).

RETURN VALUE: 1 if successful, 0 if unsupported baud rate.
END DESCRIPTION ******************************************************/


/* START FUNCTION DESCRIPTION *****************************************
msArx                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: 			void	msArx  (void)

DESCRIPTION: 	User defineable function for disabling the rs485
					transmitter.  This function is needed in your application
					code.  If you are doing RS232, you need only to have
					an empty function like
					
					void msArx(void)
					{
					}
					
					For rs485 control, you can do the following;

EXAMPLE:	  void msArx(void)
			  {
			    // Ensure that all the data has bent sent.
			    
			    while (serAwrUsed() || \
			    		  BitRdPortI(SASR,2) || \
			    		  BitRdPortI(SASR,3)); 
				
				// Turn off the RS485 transmitter by doing the following;
				
				//	PORT:				The parrallel port (PADR,PBDR,PCDR etc)          
				// PORTShadow: 	The Shadow register of the port
				//	OFF_VALUE:		1 or 0
				//	PORT_BIT:		parrallel port bit (0-7)
				
					BitWrPortI(PORT,&PORTShadow, OFF_VALUE, PORT_BIT);
					
				//  If your product is a Zworld SBC, you can do the following
				
					ser485Rx();
					
				//  Flush out the serial port read buffer, so you are ready for
				//  the next packet.
					
					serArdFlush();	 
			  }			

RETURN VALUE: none
END DESCRIPTION ******************************************************/

/* START FUNCTION DESCRIPTION *****************************************
msAtx                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: 			void	msAtx  (void)

DESCRIPTION: 	User defineable function for enabling the rs485
					transmitter.  This function is needed in your application
					code.  If you are doing RS232, you need only to have
					an empty function like
					
					void msAtx(void)
					{
					}
					
					For rs485 control, you can do the following;

EXAMPLE:	  void msAtx(void)
			  {
			    // Ensure that all the data has bent sent.
			    
			    / Turn on the RS485 transmitter by doing the following;      
				
				//	PORT:				The parrallel port (PADR,PBDR,PCDR etc)          
				// PORTShadow: 	The Shadow register of the port
				//	ON_VALUE:		1 or 0
				//	PORT_BIT:		parrallel port bit (0-7)
				
					BitWrPortI(PORT,&PORTShadow, ON_VALUE, PORT_BIT);
			    
			    				
				//  If your product is a Zworld SBC, you can do the following
				
					ser485Tx();
					
				
			  }			

RETURN VALUE: none
END DESCRIPTION ******************************************************/

/* START FUNCTION DESCRIPTION *****************************************
msBinit                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: 	int msBinit(unsigned qBaud)

DESCRIPTION: User function for
				 Initializing serial port B as a Modbus ASCII Slave.
				 
				 This function must reside in your application code.
				 Typical code for this function would be the following;
				 
int msBinit(unsigned qBaud)        
{
	// Open the serial port.  THIS MUST BE DONE PRIOR TO SETTING THE
	// DATA BITS AND PARITY SETTINGS.
	
	serBopen(qBaud); 
	  
	// setup parity.  Either PARAM_OPARITY, PARAM_EPARITY, PARAM_NOPARITY, 
	// or PARAM_2STOP  
	
	serBparity(PARAM_EPARITY);
	 
	// setup data bits. Either PARAM_7BIT, or PARAM_8BIT 
	 
	serBdatabits(PARAM_8BIT);
	
  	// Set the Serial port mode. Used for Zworld SBC's only.  
  	
	serMode(0);  
	
	return(1);
}
				 

PARAMETER1: slave address.
PARAMETER2: baud rate (bits per second).

RETURN VALUE: 1 if successful, 0 if unsupported baud rate.
END DESCRIPTION ******************************************************/

/* START FUNCTION DESCRIPTION *****************************************
msBrx                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: 			void	msBrx  (void)

DESCRIPTION: 	User defineable function for disabling the rs485
					transmitter.  This function is needed in your application
					code.  If you are doing RS232, you need only to have
					an empty function like
					
					void msBrx(void)
					{
					}
					
					For rs485 control, you can do the following;

EXAMPLE:	  void msBrx(void)
			  {
			    // Ensure that all the data has bent sent.
			    
			    while (serBwrUsed() || \
			    		  BitRdPortI(SBSR,2) || \
			    		  BitRdPortI(SBSR,3)); 
				
				// Turn off the RS485 transmitter by doing the following;
				
				//	PORT:				The parrallel port (PADR,PBDR,PCDR etc)          
				// PORTShadow: 	The Shadow register of the port
				//	OFF_VALUE:		1 or 0
				//	PORT_BIT:		parrallel port bit (0-7)
				
					BitWrPortI(PORT,&PORTShadow, OFF_VALUE, PORT_BIT);
					
				//  If your product is a Zworld SBC, you can do the following
				
					ser485Rx();
					
				//  Flush out the serial port read buffer, so you are ready for
				//  the next packet.
					
					serBrdFlush();	 
			  }			

RETURN VALUE: none
END DESCRIPTION ******************************************************/


/* START FUNCTION DESCRIPTION *****************************************
msBtx                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: 			void	msBtx  (void)

DESCRIPTION: 	User defineable function for enabling the rs485
					transmitter.  This function is needed in your application
					code.  If you are doing RS232, you need only to have
					an empty function like
					
					void msBtx(void)
					{
					}
					
					For rs485 control, you can do the following;

EXAMPLE:	  void msAtx(void)
			  {
			    // Ensure that all the data has bent sent.
			    
			    / Turn on the RS485 transmitter by doing the following;      
				
				//	PORT:				The parrallel port (PADR,PBDR,PCDR etc)          
				// PORTShadow: 	The Shadow register of the port
				//	ON_VALUE:		1 or 0
				//	PORT_BIT:		parrallel port bit (0-7)
				
					BitWrPortI(PORT,&PORTShadow, ON_VALUE, PORT_BIT);
			    
			    				
				//  If your product is a Zworld SBC, you can do the following
				
					ser485Tx();
					
				
			  }			

RETURN VALUE: none
END DESCRIPTION ******************************************************/

/* START FUNCTION DESCRIPTION *****************************************
msCinit                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: 	int msCinit(unsigned qBaud)

DESCRIPTION: User function for
				 Initializing serial port C as a Modbus ASCII Slave.
				 
				 This function must reside in your application code.
				 Typical code for this function would be the following;
				 
int msCinit(unsigned qBaud)        
{
	// Open the serial port.  THIS MUST BE DONE PRIOR TO SETTING THE
	// DATA BITS AND PARITY SETTINGS.
	
	serCopen(qBaud); 
	  
	// setup parity.  Either PARAM_OPARITY, PARAM_EPARITY, PARAM_NOPARITY, 
	// or PARAM_2STOP  
	
	serCparity(PARAM_EPARITY);
	 
	// setup data bits. Either PARAM_7BIT, or PARAM_8BIT 
	 
	serCdatabits(PARAM_8BIT);
	
  	// Set the Serial port mode. Used for Zworld SBC's only.  
  	
	serMode(0);  
	
	return(1);
}
				 

PARAMETER1: slave address.
PARAMETER2: baud rate (bits per second).

RETURN VALUE: 1 if successful, 0 if unsupported baud rate.
END DESCRIPTION ******************************************************/

/* START FUNCTION DESCRIPTION *****************************************
msCrx                         <MSZ_RAB.LIB>

NOTE: MSZ_RAB.LIB functions are generally not reentrant.

SYNTAX: 			void	msCrx  (void)

DESCRIPTION: 	User defineable function for disabling the rs485
					transmitter.  This function is needed in your application
					code.  If you are doing RS232, you need only to have
					an empty function like
					
					void msCrx(void)
					{
					}
					
					For rs485 control, you can do the following;

EXAMPLE:	  void msCrx(void)
			  {
			    // Ensure that all the data has bent sent.
			    

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲不卡av一区二区三区| 国产专区欧美精品| 久久综合成人精品亚洲另类欧美| heyzo一本久久综合| 人禽交欧美网站| 亚洲免费av高清| 久久精品无码一区二区三区 | 91一区一区三区| 奇米影视在线99精品| 中文字幕制服丝袜一区二区三区 | 美女国产一区二区| 日韩毛片视频在线看| 久久亚洲精品小早川怜子| 欧美精品第一页| 色香蕉久久蜜桃| 成人激情免费网站| 国产一区二区三区四| 日韩福利电影在线观看| 亚洲一区二区欧美| 中文字幕一区二区不卡| 久久婷婷久久一区二区三区| 欧美日韩电影在线播放| 97久久精品人人澡人人爽| 国产精品18久久久久久久久| 国内精品久久久久影院薰衣草| 日本欧美肥老太交大片| 亚洲国产乱码最新视频| 亚洲精品国产成人久久av盗摄| 国产欧美一区视频| 国产午夜精品久久久久久久 | 欧美一区二区三区免费大片 | 国产精品99久久久久久宅男| 日本色综合中文字幕| 日韩不卡一区二区| 日韩av二区在线播放| 午夜精品福利一区二区三区av | 菠萝蜜视频在线观看一区| 国产精品一区免费在线观看| 国产精品影视在线观看| 国产成人精品免费看| 国产黄色成人av| 国产成人福利片| 丁香啪啪综合成人亚洲小说| 国产宾馆实践打屁股91| 成人app下载| 色欧美片视频在线观看| 欧洲中文字幕精品| 6080午夜不卡| 久久网这里都是精品| 亚洲国产成人私人影院tom| 国产精品免费久久| 亚洲精品国产品国语在线app| 一区二区三区欧美久久| 亚洲午夜视频在线| 日韩av高清在线观看| 激情综合一区二区三区| 成人黄动漫网站免费app| 成人国产精品免费| 欧美亚洲免费在线一区| 欧美一区二区二区| 国产色一区二区| 亚洲精品免费播放| 美女爽到高潮91| 粗大黑人巨茎大战欧美成人| 色国产综合视频| 欧美一级淫片007| 久久精品一区四区| 一区二区成人在线| 久久精品国产网站| 成人av免费观看| 欧美人牲a欧美精品| 久久综合九色综合欧美98| 国产精品美女视频| 日韩电影免费在线观看网站| 国产高清精品网站| 欧洲亚洲精品在线| 久久这里只有精品首页| 亚洲免费大片在线观看| 久久99精品国产麻豆婷婷| zzijzzij亚洲日本少妇熟睡| 欧美日本在线播放| 国产清纯美女被跳蛋高潮一区二区久久w | 日本道色综合久久| 日韩欧美国产精品| 亚洲特黄一级片| 激情图区综合网| 欧美日韩中文精品| 久久久精品人体av艺术| 亚洲电影在线播放| 国产成人午夜电影网| 欧美日韩国产欧美日美国产精品| 国产亚洲制服色| 五月天婷婷综合| www.亚洲在线| 欧美精品一区二区在线播放| 亚洲一区二区成人在线观看| 国产精品亚洲视频| 在线播放日韩导航| 亚洲精品你懂的| 成人一区二区三区视频| 日韩欧美电影在线| 亚洲成人福利片| 色综合天天做天天爱| 国产亚洲一区二区三区四区| 免费亚洲电影在线| 欧美专区日韩专区| 国产精品嫩草影院com| 欧美aⅴ一区二区三区视频| 91久久久免费一区二区| 亚洲国产精品成人综合| 激情久久五月天| 日韩欧美一二三四区| 午夜精品久久久久久久99樱桃| 一本色道久久综合狠狠躁的推荐| 国产欧美日韩一区二区三区在线观看| 久久精品噜噜噜成人av农村| 欧美精品日韩一本| 亚洲最新视频在线观看| 91视视频在线直接观看在线看网页在线看| 久久综合狠狠综合久久激情| 美女一区二区视频| 日韩一区二区在线观看视频播放| 亚洲国产日韩在线一区模特| 色av成人天堂桃色av| 自拍偷拍亚洲欧美日韩| 99精品久久只有精品| 国产精品免费看片| 成人av在线一区二区| 国产精品美女久久久久aⅴ国产馆| 国产高清精品网站| 中文乱码免费一区二区| www.爱久久.com| 中文字幕一区av| 色狠狠桃花综合| 亚洲一区在线视频| 欧美性xxxxxx少妇| 香蕉av福利精品导航| 欧美日韩国产综合草草| 亚洲一区二区三区视频在线播放 | 亚洲日本一区二区| 色综合咪咪久久| 亚洲卡通动漫在线| 91福利在线导航| 首页亚洲欧美制服丝腿| 日韩视频一区二区三区| 久久99蜜桃精品| 国产精品网站导航| 97久久人人超碰| 亚洲成人自拍偷拍| 精品乱码亚洲一区二区不卡| 国产福利一区二区三区在线视频| 国产精品美女久久久久aⅴ国产馆| aaa亚洲精品| 图片区小说区国产精品视频| 日韩欧美国产精品| 粉嫩13p一区二区三区| 一区二区三区高清| 91精品久久久久久久99蜜桃| 国内精品自线一区二区三区视频| 国产女人18毛片水真多成人如厕| 一本久道中文字幕精品亚洲嫩| 亚洲成va人在线观看| 久久亚洲二区三区| 91麻豆国产香蕉久久精品| 日本不卡一二三| 国产精品嫩草影院av蜜臀| 欧美日韩在线播放三区四区| 久久精品国产精品亚洲综合| 国产精品毛片久久久久久久| 欧美性做爰猛烈叫床潮| 九九国产精品视频| 亚洲欧美电影一区二区| 日韩一级完整毛片| jlzzjlzz欧美大全| 蜜臂av日日欢夜夜爽一区| 精品动漫一区二区三区在线观看| 成人黄色免费短视频| 一区二区三区在线观看欧美| ww久久中文字幕| 在线观看亚洲精品| 国产精品夜夜嗨| 五月婷婷激情综合| 欧美国产1区2区| 91麻豆精品国产91久久久久久久久| 国产成人午夜高潮毛片| 天天影视网天天综合色在线播放| 欧美精彩视频一区二区三区| 欧美日本一区二区| gogo大胆日本视频一区| 久久99久国产精品黄毛片色诱| 亚洲免费伊人电影| 久久久蜜臀国产一区二区| 欧美影院午夜播放| youjizz久久| 国产一区二区三区免费| 午夜不卡av免费| 亚洲麻豆国产自偷在线| 久久久99久久精品欧美| 91.com视频| 欧美日韩一区三区|