内容发布更新时间 : 2024/12/25 15:15:38星期一 下面是文章的全部内容请认真阅读。
UHFREADER18.DLL动态连接库
使用手册V2.0
1. 操作系统: ......................................................................................................................................................1 2. 函数详单: ......................................................................................................................................................1 2.1)通用函数: ...............................................................................................................................................1 2.2)EPCC1-G2 协议函数:............................................................................................................................2 2.3)18000-6B 协议函数:............................................................................................................................4 3. 函数的描述:..................................................................................................................................................5 3.1)通用函数:....................................................................................................................................................5 3.1.1) AutoOpenComPort():自动连接串口.............................................................................................5 3.1.2) OpenComPort():连接到指定串口 ..............................................................................................6 3.1.3) CloseComPort():关闭串口连接......................................................................................................7 3.1.4) CloseSpecComPort():关闭指定串口 ..........................................................................................7 3.1.5)GetReaderInformation():获得读写器的信息 ..............................................................................7 3.1.6) WriteComAdr():写入读写器地址.........................................................................................8 3.1.7) WriteScanTime():设置询查命令最大响应时间 ................................................................8 3.1.8) SetPowerDbm ():设置读写器功率 ........................................................................................9 3.1.9) Writedfre ():设置读写器工作频率 .....................................................................................9 3.1.10) Writebaud ():设置串口波特率 ..........................................................................................10 3.1.11) SetWGParameter():设置韦根参数...................................................................................10 3.1.12) SetWorkMode():设置工作模式 .........................................................................................11 3.1.13) GetWorkModeParameter ():读取工作模式参数..........................................................12 3.1.14) ReadActiveModeData ():读取主动模式数据- ...............................................................12 3.1.15) SetAccuracy():EAS检测精度测试............................................................................................13 3.1.16) SetOffsetTime ():Syris响应偏置时间设置 .............................................................................13 3.1.17) SetFhssMode ():设置读写器跳频模式 .....................................................................................13 3.1.18) GetFhssMode ():获取读写器跳频模式。 ................................................................................14 3.1.19) SetTriggerTime():触发延时设置。 ...........................................................................................14 3.2) EPCC1-G2 协议函数: .............................................................................................................................15 3.2.1) Inventory_G2 ():G2询查命令 ...................................................................................................15 3.2.2) ReadCard_G2 ():G2读取数据命令 .........................................................................................15 3.2.3) WriteCard_G2 ():G2写命令 .....................................................................................................16 3.2.4) EraseCard_G2 ():G2块擦除命令.............................................................................................18 3.2.5) SetCardProtect_G2 ():G2设定存储区读写保护状态命令 ................................................19 3.2.6) DestroyCard_G2 ():G2销毁标签命令 ....................................................................................20 3.2.7) WriteEPC_G2 ():G2写EPC号命令.........................................................................................21 3.2.8) SetReadProtect_G2 ():G2单张读保护设置命令 ................................................................21 3.2.9) SetMultiReadProtect_G2 ():G2多张读保护设置命令 .......................................................22 3.2.10) RemoveReadProtect_G2 ():G2解锁读保护命令 ...............................................................23 3.2.11) CheckReadProtected_G2 ():G2测试标签是否被读保护命令 ........................................23 3.2.12) SetEASAlarm_G2 ():G2 EAS报警设置命令 ......................................................................24
1
3.2.13) CheckEASAlarm_G2 ():G2 EAS报警探测命令................................................................24 3.2.14) LockUserBlock_G2 ():G2 user区块锁命令(永久锁定)..............................................25 3.2.15) WriteBlock_G2 ():G2块写命令..............................................................................................26 3.3) 18000-6B 协议函数: .............................................................................................................................27 3.3.1) Inventory_6B ():6B寻查命令(单张) ........................................................................................27 3.3.2) Inventory2_6B ():6B按条件寻查电子标签命令 ..................................................................27 3.3.3) ReadCard_6B ():6B读数据命令...............................................................................................28 3.3.4) WriteCard_6B ():6B写数据命令...............................................................................................29 3.3.5) CheckLock_6B ():6B锁定检测命令.........................................................................................29 3.3.6) LockByte_6B ():6B锁定命令 ....................................................................................................30 4. 其他返回值定义 ...........................................................................................................................................31 5. 错误代码定义................................................................................................................................................32
2
上位机应用程序通过UHFREADER18.DLL操作EPCC1-G2和18000-6B格式电子标签读写器。
1. 操作系统:
WINDOWS 2000/XP
2. 函数详单:
UHFREADER18.DLL包括了如下的操作函数:
2.1)通用函数:
1)long WINAPI AutoOpenComPort(long *port,unsigned char * ComAdr,unsigned char baud, long *FrmHandle);
2)long WINAPI OpenComPort(long Port, unsigned char *ComAdr, unsigned char Baud,long *FrmHandle);
3)long WINAPI CloseComPort(void);
4)long WINAPI CloseSpecComPort(long FrmHandle);
5)long WINAPI GetReaderInformation(unsigned char *ComAdr, unsigned char *VersionInfo, unsigned char *ReaderType, unsigned char *TrType,unsigned char * dmaxfre , unsigned char *dminfre, unsigned char *powerdBm,unsigned char *ScanTime, long FrmHandle);
6)long WINAPI WriteComAdr(unsigned char *ComAdr, unsigned char *ComAdrData, long FrmHandle);
7)long WINAPI WriteScanTime(unsigned char *ComAdr, unsigned char *ScanTime, long FrmHandle);
8)long WINAPI SetPowerDbm (unsigned char *ComAdr, unsigned char powerDbm, long FrmHandle);
9)long WINAPI Writedfre (unsigned char *ComAdr, unsigned char dmaxfre, unsigned char dminfre,long FrmHandle);
10)long WINAPI Writebaud (unsigned char *ComAdr, unsigned char * baud, long FrmHandle);
11)long WINAPI SetWGParameter(unsigned char *ComAdr, unsigned char Wg_mode,unsigned char Wg_Data_Inteval,unsigned char Wg_Pulse_Width, unsigned char Wg_Pulse_Inteval,long FrmHandle);
1