所需驱动: 1.mysql-connector-net-6.9.8.msi 2.ZKFinger SDK 5.0.0.27(新指纹仪) 所需数据库: 1.mysql 2.数据适配器data-adapter 系统配置: 统一编码:conf/UniformCode.xml,主要配置风机参数等相关组态监控点 数据连接:GdxnyWindTurbineContorls.exe.config,需配置mysql数据库连接字符串,及其数据适配器restful接口地址 系统运行所需依赖dll: 1.uv.dll 2.gynet.dll 3.gymisc.dll 4.gycp.dll 将以上4个文件放在应用的根目录下 以上dll是系统创建风机控制句柄所需调用的的C++库 控制服务: 所需配置环境变量 C:\Program Files (x86)\GYEE\gybase\bin C:\Program Files (x86)\GYEE\gybase\protocol C:\Program Files (x86)\GYEE\wormhole\addin C:\Program Files (x86)\GYEE\wormhole\bin C:\Program Files (x86)\GYEE\wormhole\plugin 所需安装: gybase-1.1.3-3.x86.msi wormhole-5.2.0-5.x86.msi vcredist_2010_x86.exe 服务搭建: bridge_service: 1.创建服务所在文件夹 2.创建文件夹config,log 3.config文件夹中创建文件bridge.json 4.log文件夹中创建文件log.log 创建服务命令: sc create GYEE_SBQ_CTRL_BRIDGED_5 binPath= "C:\Program Files (x86)\GYEE\wormhole\bin\bridged.exe -d \"GYEE_SBQ_CTRL_BRIDGED_5\" -c D:\Gyee_project\ControlService\SBQ_Control_5\config\bridged.json" start= auto modbus_service: 1.创建服务所在文件夹 2.创建文件夹addin,config,keytable,log 3.addin中创建libaddinmodbus.json 4.config中创建blackholed.json 5.keytable中创建keytable.sqlite3,该表为modbus地址映射表 6.log文件夹中创建log.log 创建服务命令: sc create GYEE_SBQ_CTRL_1 binPath= "C:\Program Files (x86)\GYEE\wormhole\bin\blackholed.exe -d \"GYEE_SBQ_CTRL_1\" -c D:\Gyee_project\ControlService\SBQ_COntrol_Service_1\config\blackholed.json" start= auto 创建sqlite3映射表命令: "C:\Program Files (x86)\GYEE\wormhole\tool\SQLite3\sqlite3.exe" D:\Gyee_project\ControlService\SBQ_COntrol_Service_1\keytable\keytable3.sqlite3 "drop table key_table;" "C:\Program Files (x86)\GYEE\wormhole\tool\SQLite3\sqlite3.exe" D:\Gyee_project\ControlService\SBQ_COntrol_Service_1\keytable\keytable3.sqlite3 "create table key_table(gycp_addr integer, modbus_uid integer, modbus_addr integer, modbus_fun integer, modbus_type integer, modbus_swap integer, switch_valid integer, switch_addr integer, switch_fun integer, switch_type integer, switch_swap integer, switch_value real);" "C:\Program Files (x86)\GYEE\wormhole\tool\SQLite3\sqlite3.exe" --csv D:\Gyee_project\ControlService\SBQ_COntrol_Service_1\keytable\keytable3.sqlite3 ".import D:\\Gyee_project\\ControlService\\SBQ_COntrol_Service_1\\keytable\\gyee_sbq_ctrl_3.csv key_table" ------------------------------配置文件示例------------------------------- bridge_service: ---bridged.json: { "engine": { "pwd": "D:\\Gyee_project\\ControlService\\SBQ_Control_1",//服务所在路径 "stop_check": 100 }, "log": { "dir": "log", "file": "log.log", "level": 1 }, "mode": { "protocol": "tcp", "type": "loadbalancer" }, "ci": { "t0": 30, "is_server": 1, "ip": "0.0.0.0",//本机ip "port": 9901,//服务端口 "local_ip": "0.0.0.0", "local_port": 0 }, "fi": [ { "t0": 30, "is_server": 0, "ip": "127.0.0.1",//modbus服务ip "port": 9911,//modbus服务端口 "local_ip": "0.0.0.0", "local_port": 0 } ] } modbus_service: ---libaddinmodbus.json: { "ip": "10.1.50.250",//modbus地址 "port": 502,//modbus端口 "is_server": 0, "local_ip": "10.1.50.222",//本机服务ip modbus地址和本机地址在同一网段 "local_port": 0, "hton_register": 1, "hton_total": 0, "t0": 30, "t1": 30, "retries": 10, "hash_count": 256, "coils_quantity_max": 2000, "registers_quantity_max": 125, "timer_send": 1, "repeat": 1 } 若服务器有多个同一网段不同ip时,需要配置 localIp ---blackholed.json: { "engine": { "pwd": "D:\\Gyee_project\\ControlService\\SBQ_Control_Service_1", "stop_check": 100 }, "log": { "dir": "log", "file": "log.log", "level": 0 }, "keytable": { "dir": "keytable", "file": "keytable.sqlite3" }, "gycp": { "ip": "0.0.0.0", //本机ip "port": 9911, //对外提供服务端口 "is_server": 1, "t0": 30, "t1": 20, "t2": 10 }, "addin": { "dir": "addin", "addin": "addinmodbus.dll", "config": "libaddinmodbus.json" } } -------------------------------------------------------------------------