forked from xuos/xiuos
add panasonic fpxh plc test json file
This commit is contained in:
parent
e5e654988b
commit
8202e08c9c
|
@ -0,0 +1,65 @@
|
||||||
|
{
|
||||||
|
"device_id": 1,
|
||||||
|
"device_name": "PANASONIC_FPXH_TCP",
|
||||||
|
"communication_type": 0,
|
||||||
|
"socket_config": {
|
||||||
|
"plc_ip": "192.168.250.51",
|
||||||
|
"local_ip": "192.168.250.233",
|
||||||
|
"gateway": "192.168.250.1",
|
||||||
|
"netmask": "255.255.254.0",
|
||||||
|
"port": 502
|
||||||
|
},
|
||||||
|
"protocol_type": 2,
|
||||||
|
"read_period": 1000,
|
||||||
|
"read_item_list": [
|
||||||
|
{
|
||||||
|
"value_name": "Y0",
|
||||||
|
"value_type": 1,
|
||||||
|
"function_code": 1,
|
||||||
|
"start_address": 0,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "R0",
|
||||||
|
"value_type": 1,
|
||||||
|
"function_code": 1,
|
||||||
|
"start_address":2048,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "R100",
|
||||||
|
"value_type": 1,
|
||||||
|
"function_code": 1,
|
||||||
|
"start_address": 2208,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "R101",
|
||||||
|
"value_type": 1,
|
||||||
|
"function_code": 1,
|
||||||
|
"start_address": 2209,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "DT0",
|
||||||
|
"value_type": 3,
|
||||||
|
"function_code": 3,
|
||||||
|
"start_address": 0,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "DT1",
|
||||||
|
"value_type": 3,
|
||||||
|
"function_code": 3,
|
||||||
|
"start_address": 1,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "DT200",
|
||||||
|
"value_type": 3,
|
||||||
|
"function_code": 3,
|
||||||
|
"start_address": 200,
|
||||||
|
"quantity": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
{
|
||||||
|
"device_id": 1,
|
||||||
|
"device_name": "PANASONIC_FPXH_RTU",
|
||||||
|
"communication_type": 1,
|
||||||
|
"serial_config": {
|
||||||
|
"station": 1,
|
||||||
|
"baud_rate": 9600,
|
||||||
|
"data_bits": 8,
|
||||||
|
"stop_bits": 1,
|
||||||
|
"check_mode":3
|
||||||
|
},
|
||||||
|
"protocol_type": 3,
|
||||||
|
"read_period": 2000,
|
||||||
|
"read_item_list": [
|
||||||
|
{
|
||||||
|
"value_name": "Y0",
|
||||||
|
"value_type": 1,
|
||||||
|
"function_code": 1,
|
||||||
|
"start_address": 0,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "R0",
|
||||||
|
"value_type": 1,
|
||||||
|
"function_code": 1,
|
||||||
|
"start_address":2048,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "R100",
|
||||||
|
"value_type": 1,
|
||||||
|
"function_code": 1,
|
||||||
|
"start_address": 2208,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "R101",
|
||||||
|
"value_type": 1,
|
||||||
|
"function_code": 1,
|
||||||
|
"start_address": 2209,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "DT0",
|
||||||
|
"value_type": 3,
|
||||||
|
"function_code": 3,
|
||||||
|
"start_address": 0,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "DT1",
|
||||||
|
"value_type": 3,
|
||||||
|
"function_code": 3,
|
||||||
|
"start_address": 1,
|
||||||
|
"quantity": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value_name": "DT200",
|
||||||
|
"value_type": 3,
|
||||||
|
"function_code": 3,
|
||||||
|
"start_address": 200,
|
||||||
|
"quantity": 1
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
|
@ -97,7 +97,7 @@ void Uart485Init(uint32_t baud_rate, uint8_t data_bits, uint8_t stop_bits, uint8
|
||||||
cfg.port_configure = PORT_CFG_INIT;
|
cfg.port_configure = PORT_CFG_INIT;
|
||||||
#endif
|
#endif
|
||||||
cfg.serial_timeout = 10000;
|
cfg.serial_timeout = 10000;
|
||||||
|
cfg.dev_recv_callback=NULL;
|
||||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||||
ioctl_cfg.args = &cfg;
|
ioctl_cfg.args = &cfg;
|
||||||
ret = PrivIoctl(uart_fd, OPE_INT, &ioctl_cfg);
|
ret = PrivIoctl(uart_fd, OPE_INT, &ioctl_cfg);
|
||||||
|
|
Loading…
Reference in New Issue