Connecting LG iG5A to LinuxCNC via RS485

20 May 2020 21:40 - 20 May 2020 21:41 #168412 by FDA16_fan

I decided to try modbus communication between LinuxCNC and LG iG5A variable frequency drive. I have the cheap RS485 USB converter, connected S+ and S- wires to the VFD. I want to use the ClassicLadder method, but I'm stuck on configuration on LinuxCNC side. I have the ladder created like on the screenshot attached, but I don't know how to address VFD's functions correctly. Signals that I need to assign are:

- Run Forward/Backwards (write)
- Set frequency (write)
- Read current motor frequency (read)

The values highlighted in yellow on the second screenshot are wrong, but this is what I tried using someone else's youtube video. I think I'm only missing those values but correct ones for my VFD.

I struggle to find any information about it on the internet, and in the manual, the hex addresses and how to convert them to decimal values recognized by LinuxCNC is very unclear to me.

I think on the last photo,there are the commands I have to address, but I need their decimal address for LinuxCNC rather than hex address. The last photo is from the official manual of my VFD (page 157 of

Does anyone know what is the principle of changing those value to decimal address?

Is there any possibility that some of you have already set modbus on the same or similar LG VFD and could share any information about the correct decimal addresses? If I can't figure it out, I would be working on the standard control mode, straight from BoB (0-10V, forward and backwards signals), but that would be a pity as I already read about some amazing features accessible only via modbus that I would not be able to use.

I would be really, really grateful for any help. Thank you!

PS: Or would you rather recommend other method than using ClassicLadder?
Last edit: 20 May 2020 21:41 by FDA16_fan.

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

21 May 2020 17:49 #168505 by Todd Zuercher
It should not matter if the address is hex or decimal. To the computer and VFD the numbers are the same binary numbers. It is only for the convenience of the users are they displayed in decimal or hex. You can simply convert them yourself using a programming calculator and input the value you need. In this case a decimal 6 and a hex 6 are the same so it really shouldn't matter at all. There is one gotcha you may need to check or test for. The register numbers may start at 1 or 0, so depending how you've configured the Modbus Element Offset setting, you might need to add or subtract 1 to the register address number you put in "1st Modbus Ele." field when configuring the Modbus I/O in CassicLader. For example it could be 5, 6, or 7 for the register you want for stopping and starting your VFD.

Next for this register #6 on your VFD you will probably want to choose for the "Request Type" "Write_COIL(s) fnctn-5/15", 1st Modbus Ele.= 6(but could be 5 or 7), and probably want to set # of Ele. = 8. That will set 8 bit variables to control the value written to register #6. If you set the 1st variable mapped to %B0, B0-B8 would be the ones you use, and setting %B1=1 would be forward run, (You may also need to set %B6,%B7=1 to be able to control it as well.)

Good Luck

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

Time to create page: 0.094 seconds
Powered by Kunena Forum