Compare commits
4 Commits
8a7fbdee90
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| b25a75dd55 | |||
| 47ca839ccf | |||
| 255b161ba6 | |||
| bd1ec24805 |
126
error_halrun.log
Normal file
126
error_halrun.log
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
bartool@debian:~/Public/linuxcnc-modbus$ halrun -I -f vfd_test.hal
|
||||||
|
Waiting for component 'threads' to become ready....Waited 3 seconds for master. giving up.
|
||||||
|
Note: Using POSIX realtime
|
||||||
|
.
|
||||||
|
While waiting for 'threads', component '__servo-thread' loaded.
|
||||||
|
Did you specify the correct name via 'loadusr -Wn'?
|
||||||
|
mb2hal parse_common_section DEBUG: [MB2HAL_INIT] [INIT_DEBUG] [3]
|
||||||
|
mb2hal parse_common_section DEBUG: [MB2HAL_INIT] [VERSION] [1001]
|
||||||
|
vfd parse_common_section DEBUG: [MB2HAL_INIT] [HAL_MODULE_NAME] [vfd]
|
||||||
|
vfd parse_common_section DEBUG: [MB2HAL_INIT] [SLOWDOWN] [0.000]
|
||||||
|
vfd parse_common_section DEBUG: [MB2HAL_INIT] [TOTAL_TRANSACTIONS] [4]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [LINK_TYPE] [serial] [0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_PORT] [/dev/ttyUSB0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_BAUD] [9600]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_BITS] [8]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_PARITY] [none]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_STOP] [1]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_DELAY_MS] [50]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [MB_SLAVE_ID] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [FIRST_ELEMENT] [512]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [NELEMENTS] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [MAX_UPDATE_RATE] [10.000]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [MB_RESPONSE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [MB_BYTE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [DEBUG] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [MB_TX_CODE] [fnct_06_write_single_register] [4]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [HAL_TX_NAME] [control]
|
||||||
|
vfd parse_ini_file OK: parse_transaction_section 0 OK
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [LINK_TYPE] [serial] [0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_PORT] [/dev/ttyUSB0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_BAUD] [9600]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_BITS] [8]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_PARITY] [none]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_STOP] [1]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_DELAY_MS] [50]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [MB_SLAVE_ID] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [FIRST_ELEMENT] [513]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [NELEMENTS] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [MAX_UPDATE_RATE] [10.000]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [MB_RESPONSE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [MB_BYTE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [DEBUG] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [MB_TX_CODE] [fnct_06_write_single_register] [4]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [HAL_TX_NAME] [speed]
|
||||||
|
vfd parse_ini_file OK: parse_transaction_section 1 OK
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [LINK_TYPE] [serial] [0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_PORT] [/dev/ttyUSB0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_BAUD] [9600]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_BITS] [8]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_PARITY] [none]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_STOP] [1]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_DELAY_MS] [50]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [MB_SLAVE_ID] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [FIRST_ELEMENT] [528]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [NELEMENTS] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [MAX_UPDATE_RATE] [10.000]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [MB_RESPONSE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [MB_BYTE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [DEBUG] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [MB_TX_CODE] [fnct_03_read_holding_registers] [2]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [HAL_TX_NAME] [status]
|
||||||
|
vfd parse_ini_file OK: parse_transaction_section 2 OK
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [LINK_TYPE] [serial] [0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_PORT] [/dev/ttyUSB0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_BAUD] [9600]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_BITS] [8]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_PARITY] [none]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_STOP] [1]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_DELAY_MS] [50]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [MB_SLAVE_ID] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [FIRST_ELEMENT] [544]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [PIN_NAMES] [freq_out,freq_set,current,rpm]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [NELEMENTS] [4]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [MAX_UPDATE_RATE] [5.000]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [MB_RESPONSE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [MB_BYTE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [DEBUG] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [MB_TX_CODE] [fnct_03_read_holding_registers] [2]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [HAL_TX_NAME] [metrics]
|
||||||
|
vfd parse_ini_file OK: parse_transaction_section 3 OK
|
||||||
|
vfd main OK: parse_ini_file done OK
|
||||||
|
vfd init_mb_links DEBUG: LINK 0 (RTU) link_type[0] device[/dev/ttyUSB0] baud[9600] data[8] parity[N] stop[1] fd[-1]
|
||||||
|
vfd main OK: init_gbl.mb_link done OK
|
||||||
|
vfd init_mb_tx DEBUG: MB_TX 0 lk_n[0] tx_n[0] cfg_dbg[1] lk_dbg[0] t_inc[0.100] nxt_t[0.000]
|
||||||
|
vfd init_mb_tx DEBUG: MB_TX 1 lk_n[0] tx_n[1] cfg_dbg[1] lk_dbg[0] t_inc[0.100] nxt_t[0.000]
|
||||||
|
vfd init_mb_tx DEBUG: MB_TX 2 lk_n[0] tx_n[2] cfg_dbg[1] lk_dbg[0] t_inc[0.100] nxt_t[0.000]
|
||||||
|
vfd init_mb_tx DEBUG: MB_TX 3 lk_n[0] tx_n[3] cfg_dbg[1] lk_dbg[0] t_inc[0.200] nxt_t[0.000]
|
||||||
|
vfd main OK: init_gbl.mb_tx done OK
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [vfd.control.num_errors]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [vfd.control.00]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [1] pin_name [vfd.speed.num_errors]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [1] pin_name [vfd.speed.00]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [2] pin_name [vfd.status.num_errors]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [2] pin_name [vfd.status.00]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [3] pin_name [vfd.metrics.num_errors]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [3] pin_name [vfd.metrics.freq_out]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [3] pin_name [vfd.metrics.freq_set]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [3] pin_name [vfd.metrics.current]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [3] pin_name [vfd.metrics.rpm]
|
||||||
|
vfd main OK: HAL components created OK
|
||||||
|
vfd main OK: Link thread loop and logic 0 created OK
|
||||||
|
vfd main OK: vfd is running
|
||||||
|
Waiting for component 'mb2hal' to become ready.
|
||||||
|
While waiting for 'mb2hal', component 'vfd' loaded.
|
||||||
|
Did you specify the correct name via 'loadusr -Wn'?vfd fnct_03_read_holding_registers ERR: mb_tx[2] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[2] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
........................vfd fnct_03_read_holding_registers ERR: mb_tx[3] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[3] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
.................vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
........vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[2]
|
||||||
|
.....vfd fnct_03_read_holding_registers ERR: mb_tx[2] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[2] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
.......vfd fnct_06_write_single_register ERR: mb_tx[0] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[0] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
....................vfd fnct_06_write_single_register ERR: mb_tx[0] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[0] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
.....vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
.........vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[2]
|
||||||
|
........vfd fnct_03_read_holding_registers ERR: mb_tx[2] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[2] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
..............vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
138
error_halrun2.log
Normal file
138
error_halrun2.log
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
bartool@debian:~/Public/linuxcnc-modbus$ halrun -I -f vfd_test.hal
|
||||||
|
Note: Using POSIX realtime
|
||||||
|
mb2hal parse_common_section DEBUG: [MB2HAL_INIT] [INIT_DEBUG] [3]
|
||||||
|
mb2hal parse_common_section DEBUG: [MB2HAL_INIT] [VERSION] [1001]
|
||||||
|
vfd parse_common_section DEBUG: [MB2HAL_INIT] [HAL_MODULE_NAME] [vfd]
|
||||||
|
vfd parse_common_section DEBUG: [MB2HAL_INIT] [SLOWDOWN] [0.000]
|
||||||
|
vfd parse_common_section DEBUG: [MB2HAL_INIT] [TOTAL_TRANSACTIONS] [4]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [LINK_TYPE] [serial] [0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_PORT] [/dev/ttyUSB0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_BAUD] [9600]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_BITS] [8]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_PARITY] [none]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_STOP] [1]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_DELAY_MS] [50]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [MB_SLAVE_ID] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [FIRST_ELEMENT] [512]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [NELEMENTS] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [MAX_UPDATE_RATE] [10.000]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [MB_RESPONSE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [MB_BYTE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [DEBUG] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [MB_TX_CODE] [fnct_06_write_single_register] [4]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_00] [HAL_TX_NAME] [control]
|
||||||
|
vfd parse_ini_file OK: parse_transaction_section 0 OK
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [LINK_TYPE] [serial] [0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_PORT] [/dev/ttyUSB0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_BAUD] [9600]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_BITS] [8]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_PARITY] [none]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_STOP] [1]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_01] [SERIAL_DELAY_MS] [50]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [MB_SLAVE_ID] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [FIRST_ELEMENT] [513]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [NELEMENTS] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [MAX_UPDATE_RATE] [10.000]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [MB_RESPONSE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [MB_BYTE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [DEBUG] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [MB_TX_CODE] [fnct_06_write_single_register] [4]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_01] [HAL_TX_NAME] [speed]
|
||||||
|
vfd parse_ini_file OK: parse_transaction_section 1 OK
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [LINK_TYPE] [serial] [0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_PORT] [/dev/ttyUSB0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_BAUD] [9600]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_BITS] [8]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_PARITY] [none]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_STOP] [1]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_02] [SERIAL_DELAY_MS] [50]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [MB_SLAVE_ID] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [FIRST_ELEMENT] [528]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [NELEMENTS] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [MAX_UPDATE_RATE] [10.000]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [MB_RESPONSE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [MB_BYTE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [DEBUG] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [MB_TX_CODE] [fnct_03_read_holding_registers] [2]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_02] [HAL_TX_NAME] [status]
|
||||||
|
vfd parse_ini_file OK: parse_transaction_section 2 OK
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [LINK_TYPE] [serial] [0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_PORT] [/dev/ttyUSB0]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_BAUD] [9600]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_BITS] [8]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_PARITY] [none]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_STOP] [1]
|
||||||
|
vfd parse_serial_subsection DEBUG: [TRANSACTION_03] [SERIAL_DELAY_MS] [50]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [MB_SLAVE_ID] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [FIRST_ELEMENT] [544]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [PIN_NAMES] [freq_out,freq_set,current,rpm]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [NELEMENTS] [4]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [MAX_UPDATE_RATE] [5.000]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [MB_RESPONSE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [MB_BYTE_TIMEOUT_MS] [500]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [DEBUG] [1]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [MB_TX_CODE] [fnct_03_read_holding_registers] [2]
|
||||||
|
vfd parse_transaction_section DEBUG: [TRANSACTION_03] [HAL_TX_NAME] [metrics]
|
||||||
|
vfd parse_ini_file OK: parse_transaction_section 3 OK
|
||||||
|
vfd main OK: parse_ini_file done OK
|
||||||
|
vfd init_mb_links DEBUG: LINK 0 (RTU) link_type[0] device[/dev/ttyUSB0] baud[9600] data[8] parity[N] stop[1] fd[-1]
|
||||||
|
vfd main OK: init_gbl.mb_link done OK
|
||||||
|
vfd init_mb_tx DEBUG: MB_TX 0 lk_n[0] tx_n[0] cfg_dbg[1] lk_dbg[0] t_inc[0.100] nxt_t[0.000]
|
||||||
|
vfd init_mb_tx DEBUG: MB_TX 1 lk_n[0] tx_n[1] cfg_dbg[1] lk_dbg[0] t_inc[0.100] nxt_t[0.000]
|
||||||
|
vfd init_mb_tx DEBUG: MB_TX 2 lk_n[0] tx_n[2] cfg_dbg[1] lk_dbg[0] t_inc[0.100] nxt_t[0.000]
|
||||||
|
vfd init_mb_tx DEBUG: MB_TX 3 lk_n[0] tx_n[3] cfg_dbg[1] lk_dbg[0] t_inc[0.200] nxt_t[0.000]
|
||||||
|
vfd main OK: init_gbl.mb_tx done OK
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [vfd.control.num_errors]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [vfd.control.00]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [1] pin_name [vfd.speed.num_errors]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [1] pin_name [vfd.speed.00]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [2] pin_name [vfd.status.num_errors]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [2] pin_name [vfd.status.00]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [3] pin_name [vfd.metrics.num_errors]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [3] pin_name [vfd.metrics.freq_out]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [3] pin_name [vfd.metrics.freq_set]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [3] pin_name [vfd.metrics.current]
|
||||||
|
vfd create_each_mb_tx_hal_pins DEBUG: mb_tx_num [3] pin_name [vfd.metrics.rpm]
|
||||||
|
vfd main OK: HAL components created OK
|
||||||
|
vfd main OK: Link thread loop and logic 0 created OK
|
||||||
|
vfd main OK: vfd is running
|
||||||
|
halcmd: vfd fnct_03_read_holding_registers ERR: mb_tx[3] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[3] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_03_read_holding_registers ERR: mb_tx[3] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[3] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[0] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[0] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_03_read_holding_registers ERR: mb_tx[3] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[3] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_03_read_holding_registers ERR: mb_tx[2] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[2] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_03_read_holding_registers ERR: mb_tx[3] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[3] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[2]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[1] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[1] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[0] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[0] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_03_read_holding_registers ERR: mb_tx[3] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[3] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[0] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[0] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_03_read_holding_registers ERR: mb_tx[2] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[2] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[0] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[0] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_03_read_holding_registers ERR: mb_tx[2] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[2] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_03_read_holding_registers ERR: mb_tx[2] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[2] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
|
vfd fnct_06_write_single_register ERR: mb_tx[0] mb_links[0] slave[1] = ret[-1] fd[4]
|
||||||
|
vfd link_loop_and_logic ERR: mb_tx_num[0] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
|
||||||
@@ -38,7 +38,7 @@ Add the following lines to your main `.hal` file (e.g. `custom.hal` or `postgui.
|
|||||||
# =====================================================================
|
# =====================================================================
|
||||||
|
|
||||||
# Load the mb2hal component
|
# Load the mb2hal component
|
||||||
loadusr -W mb2hal config=vfd_d100.ini
|
loadusr -Wn vfd mb2hal config=vfd_d100.ini
|
||||||
|
|
||||||
# Load helper components
|
# Load helper components
|
||||||
loadrt scale names=spindle_speed_scale,spindle_feedback_scale
|
loadrt scale names=spindle_speed_scale,spindle_feedback_scale
|
||||||
|
|||||||
47
tutorial.md
Normal file
47
tutorial.md
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
Stworzyłem dedykowany plik testowy vfd_test.hal.
|
||||||
|
|
||||||
|
Możesz go uruchomić bezpośrednio w terminalu (będąc w głównym katalogu projektu) za pomocą polecenia:
|
||||||
|
|
||||||
|
halrun -I -f vfd_test.hal
|
||||||
|
|
||||||
|
Flaga -I uruchamia interaktywną powłokę HAL, a -f vfd_test.hal ładuje nasz plik testowy.
|
||||||
|
|
||||||
|
Gdy powłoka się uruchomi, zobaczysz znak zachęty halcmd: . Możesz wtedy przeprowadzić następujące testy przy użyciu komend sets (ustawienie
|
||||||
|
sygnału) oraz show (pokazanie stanu):
|
||||||
|
|
||||||
|
### Scenariusz testowy w powłoce halcmd:
|
||||||
|
|
||||||
|
1. Zadanie obrotów (np. 12000 RPM):
|
||||||
|
Ustaw obroty na 12000 RPM (co powinno dać wartość częstotliwości w Modbus równą 2000 czyli 200.0 Hz):
|
||||||
|
sets test-speed-rpm 12000
|
||||||
|
Sprawdź, czy wartość została poprawnie przeliczona i przekazana do mb2hal:
|
||||||
|
show pin vfd.speed.00.float
|
||||||
|
|
||||||
|
2. Uruchomienie wrzeciona w prawo (Forward):
|
||||||
|
Włącz wrzeciono:
|
||||||
|
sets test-spindle-on TRUE
|
||||||
|
sets test-spindle-rev FALSE
|
||||||
|
Sprawdź pin sterujący mb2hal (powinien mieć teraz wartość 2.0 ):
|
||||||
|
show pin vfd.control.00.float
|
||||||
|
|
||||||
|
3. Zmiana kierunku w lewo (Reverse):
|
||||||
|
Przełącz kierunek na obroty lewe:
|
||||||
|
sets test-spindle-rev TRUE
|
||||||
|
Sprawdź pin sterujący (powinien zmienić wartość na 4.0 ):
|
||||||
|
show pin vfd.control.00.float
|
||||||
|
|
||||||
|
4. Zatrzymanie wrzeciona (Stop):
|
||||||
|
Wyłącz wrzeciono:
|
||||||
|
sets test-spindle-on FALSE
|
||||||
|
Sprawdź pin sterujący (powinien mieć wartość 8.0 dla zatrzymania):
|
||||||
|
show pin vfd.control.00.float
|
||||||
|
|
||||||
|
5. Odczyt parametrów pracy (Feedback):
|
||||||
|
Jeśli falownik jest podłączony fizycznie i silnik się kręci, możesz podejrzeć piny odczytu:
|
||||||
|
show pin vfd.metrics.*
|
||||||
|
Możesz też sprawdzić, czy działa przelicznik RPM → RPS:
|
||||||
|
show sig test-rps-feedback
|
||||||
|
|
||||||
|
6. Wyjście z testu:
|
||||||
|
Aby zakończyć działanie i zwolnić sterowniki czasu rzeczywistego, wpisz:
|
||||||
|
exit
|
||||||
28
vfd_d100.ini
28
vfd_d100.ini
@@ -7,7 +7,7 @@
|
|||||||
[MB2HAL_INIT]
|
[MB2HAL_INIT]
|
||||||
|
|
||||||
# Debug level: 0 = silent, 1 = errors, 2 = OK messages, 3 = debugging, 4 = max debug
|
# Debug level: 0 = silent, 1 = errors, 2 = OK messages, 3 = debugging, 4 = max debug
|
||||||
INIT_DEBUG=3
|
INIT_DEBUG=1
|
||||||
|
|
||||||
# Set to 1.1 to enable float/int pin options and specific features
|
# Set to 1.1 to enable float/int pin options and specific features
|
||||||
VERSION=1.1
|
VERSION=1.1
|
||||||
@@ -15,8 +15,8 @@ VERSION=1.1
|
|||||||
# HAL module (component) name. Pins will be prefixed with this name.
|
# HAL module (component) name. Pins will be prefixed with this name.
|
||||||
HAL_MODULE_NAME=vfd
|
HAL_MODULE_NAME=vfd
|
||||||
|
|
||||||
# Delay between transactions in seconds (use 0.0 for normal speed)
|
# Delay between transactions in seconds (helps slower VFDs process requests)
|
||||||
SLOWDOWN=0.0
|
SLOWDOWN=0.1
|
||||||
|
|
||||||
# Number of transactions defined below
|
# Number of transactions defined below
|
||||||
TOTAL_TRANSACTIONS=4
|
TOTAL_TRANSACTIONS=4
|
||||||
@@ -40,9 +40,9 @@ MB_TX_CODE=fnct_06_write_single_register
|
|||||||
FIRST_ELEMENT=512
|
FIRST_ELEMENT=512
|
||||||
NELEMENTS=1
|
NELEMENTS=1
|
||||||
HAL_TX_NAME=control
|
HAL_TX_NAME=control
|
||||||
MAX_UPDATE_RATE=10.0
|
MAX_UPDATE_RATE=2.0
|
||||||
MB_RESPONSE_TIMEOUT_MS=500
|
MB_RESPONSE_TIMEOUT_MS=1000
|
||||||
MB_BYTE_TIMEOUT_MS=500
|
MB_BYTE_TIMEOUT_MS=1000
|
||||||
DEBUG=1
|
DEBUG=1
|
||||||
|
|
||||||
|
|
||||||
@@ -50,12 +50,14 @@ DEBUG=1
|
|||||||
# TRANSACTION 01: Write Given Frequency (0201H / 513 dec)
|
# TRANSACTION 01: Write Given Frequency (0201H / 513 dec)
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
[TRANSACTION_01]
|
[TRANSACTION_01]
|
||||||
# Link settings (PORT, BAUD, etc.) are inherited from TRANSACTION_00
|
MB_SLAVE_ID=1
|
||||||
MB_TX_CODE=fnct_06_write_single_register
|
MB_TX_CODE=fnct_06_write_single_register
|
||||||
FIRST_ELEMENT=513
|
FIRST_ELEMENT=513
|
||||||
NELEMENTS=1
|
NELEMENTS=1
|
||||||
HAL_TX_NAME=speed
|
HAL_TX_NAME=speed
|
||||||
MAX_UPDATE_RATE=10.0
|
MAX_UPDATE_RATE=2.0
|
||||||
|
MB_RESPONSE_TIMEOUT_MS=1000
|
||||||
|
MB_BYTE_TIMEOUT_MS=1000
|
||||||
DEBUG=1
|
DEBUG=1
|
||||||
|
|
||||||
|
|
||||||
@@ -63,11 +65,14 @@ DEBUG=1
|
|||||||
# TRANSACTION 02: Read Main Control Status (0210H / 528 dec)
|
# TRANSACTION 02: Read Main Control Status (0210H / 528 dec)
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
[TRANSACTION_02]
|
[TRANSACTION_02]
|
||||||
|
MB_SLAVE_ID=1
|
||||||
MB_TX_CODE=fnct_03_read_holding_registers
|
MB_TX_CODE=fnct_03_read_holding_registers
|
||||||
FIRST_ELEMENT=528
|
FIRST_ELEMENT=528
|
||||||
NELEMENTS=1
|
NELEMENTS=1
|
||||||
HAL_TX_NAME=status
|
HAL_TX_NAME=status
|
||||||
MAX_UPDATE_RATE=10.0
|
MAX_UPDATE_RATE=2.0
|
||||||
|
MB_RESPONSE_TIMEOUT_MS=1000
|
||||||
|
MB_BYTE_TIMEOUT_MS=1000
|
||||||
DEBUG=1
|
DEBUG=1
|
||||||
|
|
||||||
|
|
||||||
@@ -75,6 +80,7 @@ DEBUG=1
|
|||||||
# TRANSACTION 03: Read Operating Parameters (0220H - 0223H / 544 - 547 dec)
|
# TRANSACTION 03: Read Operating Parameters (0220H - 0223H / 544 - 547 dec)
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
[TRANSACTION_03]
|
[TRANSACTION_03]
|
||||||
|
MB_SLAVE_ID=1
|
||||||
MB_TX_CODE=fnct_03_read_holding_registers
|
MB_TX_CODE=fnct_03_read_holding_registers
|
||||||
FIRST_ELEMENT=544
|
FIRST_ELEMENT=544
|
||||||
# Receptors:
|
# Receptors:
|
||||||
@@ -84,5 +90,7 @@ FIRST_ELEMENT=544
|
|||||||
# 547 (0223H) = Output Speed (RPM)
|
# 547 (0223H) = Output Speed (RPM)
|
||||||
PIN_NAMES=freq_out,freq_set,current,rpm
|
PIN_NAMES=freq_out,freq_set,current,rpm
|
||||||
HAL_TX_NAME=metrics
|
HAL_TX_NAME=metrics
|
||||||
MAX_UPDATE_RATE=5.0
|
MAX_UPDATE_RATE=2.0
|
||||||
|
MB_RESPONSE_TIMEOUT_MS=1000
|
||||||
|
MB_BYTE_TIMEOUT_MS=1000
|
||||||
DEBUG=1
|
DEBUG=1
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
loadrt threads name1=servo-thread period1=1000000
|
loadrt threads name1=servo-thread period1=1000000
|
||||||
|
|
||||||
# 2. Ladujemy mb2hal z nasza konfiguracja
|
# 2. Ladujemy mb2hal z nasza konfiguracja
|
||||||
loadusr -W mb2hal config=vfd_d100.ini
|
loadusr -Wn vfd mb2hal config=vfd_d100.ini
|
||||||
|
|
||||||
# 3. Ladujemy komponenty pomocnicze
|
# 3. Ladujemy komponenty pomocnicze
|
||||||
loadrt scale names=spindle_speed_scale,spindle_feedback_scale
|
loadrt scale names=spindle_speed_scale,spindle_feedback_scale
|
||||||
|
|||||||
Reference in New Issue
Block a user