Trouble getting mb2hal working with Mollom G75-2T-4G-B VFD

More
20 Jun 2023 06:37 #273900 by dmradford
Cheap amazon special, and I'm paying for it with research time and headaches. I can't find anything online for the company or the VFD - found it on Amazon with good reviews and decided to give it a chance. Mollom G75-2T-4G-B.
It supports RS4485 Modbus-RTU communication, but when I try to use mb2hal, I get issues. My previous VFD was a HY and it just worked using the builtin HY configs.

When I try connecting via halrun, I get this:
halcmd: loadusr -W mb2hal config=mb2hal.ini
mb2hal parse_common_section DEBUG: [MB2HAL_INIT] [INIT_DEBUG] [3]
mb2hal parse_common_section DEBUG: [MB2HAL_INIT] [VERSION] [1000]
mb2hal parse_common_section DEBUG: [MB2HAL_INIT] [HAL_MODULE_NAME] [mb2hal]
mb2hal parse_common_section DEBUG: [MB2HAL_INIT] [SLOWDOWN] [0.000]
mb2hal parse_common_section DEBUG: [MB2HAL_INIT] [TOTAL_TRANSACTIONS] [1]
mb2hal parse_transaction_section DEBUG: [TRANSACTION_00] [LINK_TYPE] [serial] [0]
mb2hal parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_PORT] [/dev/ttyUSB0]
mb2hal parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_BAUD] [9600]
mb2hal parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_BITS] [8]
mb2hal parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_PARITY] [none]
mb2hal parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_STOP] [2]
mb2hal parse_serial_subsection DEBUG: [TRANSACTION_00] [SERIAL_DELAY_MS] [150]
mb2hal parse_transaction_section DEBUG: [TRANSACTION_00] [MB_SLAVE_ID] [1]
mb2hal parse_transaction_section DEBUG: [TRANSACTION_00] [FIRST_ELEMENT] [4096]
mb2hal parse_transaction_section DEBUG: [TRANSACTION_00] [NELEMENTS] [8]
mb2hal parse_transaction_section DEBUG: [TRANSACTION_00] [MAX_UPDATE_RATE] [2.000]
mb2hal parse_transaction_section DEBUG: [TRANSACTION_00] [MB_RESPONSE_TIMEOUT_MS] [500]
mb2hal parse_transaction_section DEBUG: [TRANSACTION_00] [MB_BYTE_TIMEOUT_MS] [500]
mb2hal parse_transaction_section DEBUG: [TRANSACTION_00] [DEBUG] [3]
mb2hal parse_transaction_section DEBUG: [TRANSACTION_00] [MB_TX_CODE] [fnct_03_read_holding_registers] [2]
mb2hal parse_transaction_section DEBUG: [TRANSACTION_00] [HAL_TX_NAME] [info]
mb2hal parse_ini_file OK: parse_transaction_section 0 OK
mb2hal main OK: parse_ini_file done OK
mb2hal init_mb_links DEBUG: LINK 0 (RTU) link_type[0] device[/dev/ttyUSB0] baud[9600] data[8] parity[N] stop[2] fd[-1]
mb2hal main OK: init_gbl.mb_link done OK
mb2hal init_mb_tx DEBUG: MB_TX 0 lk_n[0] tx_n[0] cfg_dbg[3] lk_dbg[1] t_inc[0.500] nxt_t[0.000]
mb2hal main OK: init_gbl.mb_tx done OK
mb2hal create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [mb2hal.info.num_errors]
mb2hal create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [mb2hal.info.00]
mb2hal create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [mb2hal.info.01]
mb2hal create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [mb2hal.info.02]
mb2hal create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [mb2hal.info.03]
mb2hal create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [mb2hal.info.04]
mb2hal create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [mb2hal.info.05]
mb2hal create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [mb2hal.info.06]
mb2hal create_each_mb_tx_hal_pins DEBUG: mb_tx_num [0] pin_name [mb2hal.info.07]
mb2hal main OK: HAL components created OK
mb2hal main OK: Link thread loop and logic 0 created OK
mb2hal main OK: mb2hal is running
halcmd: mb2hal fnct_03_read_holding_registers DEBUG: mb_tx[0] mb_links[0] slave[1] fd[4] 1st_addr[4096] nelem[8]
[01][03][10][00][00][08][40][CC]
Waiting for a confirmation...
ERROR Connection timed out: select
mb2hal fnct_03_read_holding_registers ERR: mb_tx[0] mb_links[0] slave[1] = ret[-1] fd[4]
mb2hal link_loop_and_logic ERR: mb_tx_num[0] mb_links[0] thread[0] fd[4] transaction failure, num_errors[1]
Bytes flushed (0)
mb2hal link_loop_and_logic DEBUG: mb_tx_num[0] mb_links[0] thread[0] fd[4] SERIAL_DELAY_MS activated [150]
mb2hal fnct_03_read_holding_registers DEBUG: mb_tx[0] mb_links[0] slave[1] fd[4] 1st_addr[4096] nelem[8]
[01][03][10][00][00][08][40][CC]
Waiting for a confirmation...
ERROR Connection timed out: select
mb2hal fnct_03_read_holding_registers ERR: mb_tx[0] mb_links[0] slave[1] = ret[-1] fd[4]
mb2hal link_loop_and_logic ERR: mb_tx_num[0] mb_links[0] thread[0] fd[4] transaction failure, num_errors[2]
Bytes flushed (0)
mb2hal link_loop_and_logic DEBUG: mb_tx_num[0] mb_links[0] thread[0] fd[4] SERIAL_DELAY_MS activated [150]
mb2hal fnct_03_read_holding_registers DEBUG: mb_tx[0] mb_links[0] slave[1] fd[4] 1st_addr[4096] nelem[8]
[01][03][10][00][00][08][40][CC]
Waiting for a confirmation...
mb2hal quit_signal DEBUG: signal [2] received
mb2hal quit_cleanup DEBUG: started
mb2hal quit_cleanup DEBUG: unloading HAL module [4] ret[0]
mb2hal quit_cleanup DEBUG: done OK
mb2hal main OK: going to exit!
Note: Using POSIX realtime

I have no idea what I'm doing (or doing wrong for that matter). Can anybody point me in a direction that will help get this VFD working with LCNC? I've also attached the mb2hal.ini I'm using.

 
Attachments:

Please Log in or Create an account to join the conversation.

More
20 Jun 2023 13:01 - 20 Jun 2023 13:08 #273928 by Aciera
As far as I can tell from the debug info there is simply no reply coming back from the VFD. So maybe a physical/electrical issue with the RS485 line or a configuration error in the VFD (the settings in mb2hal seem reasonable).
I'm afraid that without a device to monitor the RS485 bus it is basically just going to be trial and error until you either get some kind of reply to work with or get tired of the whole affair.

I can't find anything online for the company or the VFD - found it on Amazon with good reviews and decided to give it a chance.

Just to get this straight, you do have a manual for it right? Because if you don't, how do you know what com port parameters to set and what the default slave address is?
Last edit: 20 Jun 2023 13:08 by Aciera.

Please Log in or Create an account to join the conversation.

More
21 Jun 2023 07:02 #273981 by dmradford
I'll double check my wiring and VFD settings. I think I have them correct, but it never hurts to double check. Yes, I do have a paper manual. There's probably 20 pages of settings I can plug in. I think I have all of the connection settings set to serial for RS485, but I'll look again to make sure I didn't miss anything. I unfortunately can't find a digital version of the manual to link to. I'll try to get a digital version from the manufacturer.

What might I use to monitor the RS485 bus?

Please Log in or Create an account to join the conversation.

More
21 Jun 2023 07:52 - 21 Jun 2023 07:56 #273983 by Aciera
Tools for modbus trouble shooting could be a simple software modbus slave or even just a serial port monitor running on another pc to test if the linuxcnc pc acutally puts out any signal.
Next up would be a scope on the physical lines and ideal would be a 2 channel scope with serial UART decoding that would let you decode the actual data transmitted.

[edit]
I presume you have already tried swapping the two transmission lines.
Last edit: 21 Jun 2023 07:56 by Aciera.

Please Log in or Create an account to join the conversation.

More
21 Jun 2023 14:31 #273988 by dmradford
I have tried swapping the lines, no change. I know* my RS485 USB adapter is working because it's the same one I used with my old HY VFD (which I was using successfully just a week ago - upgraded spindle and needed a new vfd capable of 800hz), it also has LEDs to indicate RX/TX.

Please Log in or Create an account to join the conversation.

More
22 Jun 2023 01:49 #274022 by dmradford
The vendor was able to supply a PDF of the complete manual! I've attached it here. Oh no! It's too big (3.4mb) - here is a google drive link: Manual Translated . It's clearly a auto-translated from Chinese, but it looks like it's all there.

Please Log in or Create an account to join the conversation.

More
22 Jun 2023 05:26 #274029 by Aciera
Only thing I can come up with is the com settings as you this in the mb2hal.ini:
[TRANSACTION_00]
LINK_TYPE=serial
SERIAL_PORT=/dev/ttyUSB0
SERIAL_BAUD=9600

#Data bits. One of 5,6,7,8.
SERIAL_BITS=8

#Data parity. One of: even, odd, none.
SERIAL_PARITY=none

#Stop bits. One of 1, 2.
SERIAL_STOP=2

#Serial port delay between for this transaction only.
#In ms. Defaults to 0.
SERIAL_DELAY_MS=150

MB_SLAVE_ID=1


So maybe you changed Parameter Fd-02 to option '0' 
 


If you have not then the factory setting (Option '1') would be:
[TRANSACTION_00]
LINK_TYPE=serial
SERIAL_PORT=/dev/ttyUSB0
SERIAL_BAUD=9600

#Data bits. One of 5,6,7,8.
SERIAL_BITS=8

#Data parity. One of: even, odd, none.
SERIAL_PARITY=even

#Stop bits. One of 1, 2.
SERIAL_STOP=1

#Serial port delay between for this transaction only.
#In ms. Defaults to 0.
SERIAL_DELAY_MS=150

MB_SLAVE_ID=1

 
Attachments:
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
02 Feb 2024 21:02 #292250 by echristley
@dmradford, did you ever get this working?
I have it running now. I posted the working example to this forum.

Please Log in or Create an account to join the conversation.

Time to create page: 0.500 seconds
Powered by Kunena Forum