10-22-2010 01:54 PM
We're using Labview trying to communicate with a G7 drive via a third-party USB-RS485 device. The communication is OK using Yaskawa DriveWizard software (we can read/change the parameters), and we just want to do further functions by using Labview Modbus library. I assume the communication is fine since their software works.
But when I use modbus library, I get the "Framing error" all the time. I checked the port settings (Baud rate, #of bits, Parity, Stop bits, mode, slave address etc) and they are consistent on both sides.
Anybody here ever met such a problem? Any suggestion will be appreciated!
10-25-2010 07:39 AM
I use the LV Modbus lib all the time to talk to Yaskawa F7 and P7 drives. Never had a problem. Can you post a simple example of your code?
10-25-2010 09:35 AM - edited 10-25-2010 09:35 AM
A framing error is a serial interface problem.
If you are sure that all settings are OK there is probably something wrong with your RS-485 interface.
Can you check the connections and terminators ?
10-25-2010 01:04 PM
Wayne,
Attached is the simple vi used for testing the communication. The stop bits was set to 1.0 inside the Init vi.
Is there any special settings I missed?
Thanks.
@Wayne.C wrote:
I use the LV Modbus lib all the time to talk to Yaskawa F7 and P7 drives. Never had a problem. Can you post a simple example of your code?
10-25-2010 01:06 PM
@K C wrote:
A framing error is a serial interface problem.
If you are sure that all settings are OK there is probably something wrong with your RS-485 interface.
Can you check the connections and terminators ?
KC,
The RS-485 interface should be fine. Wwe used the DriveWizard software... I assume the connection should be fine then.
10-25-2010 01:40 PM
Well, I was not referring to the software. As far as I can see your framing error has nothing to do with ModBus. ModBus is a protocol. The ModBus data is tranfered over a serial link in your case with a RS-485 interface. This serial interface reports the framing error.
Framing error means that the bit sequence of startbit-databits-(parity)-stopbit(s) is not correct. Mostly caused by wrong parameters and/or bad interface.
10-25-2010 02:39 PM - edited 10-25-2010 02:40 PM
Inhaler_jun,
Modbus spec states that when no parity is used, 'stop bits' should be set to 2. This is actually an error in the LV modbus lib. This is what is causing the framing error. I never noticed this before because I don't use that particular function of the Modbus lib.
10-25-2010 03:51 PM
@Wayne.C wrote:
Inhaler_jun,
Modbus spec states that when no parity is used, 'stop bits' should be set to 2. This is actually an error in the LV modbus lib. This is what is causing the framing error. I never noticed this before because I don't use that particular function of the Modbus lib.
Wayne, the G7 manual states that "stop bits" is 1.
I will try it if I get chance to work on the machine.
01-04-2011 10:26 AM
Wayne,
@Wayne.C wrote:
Inhaler_jun,
Modbus spec states that when no parity is used, 'stop bits' should be set to 2. This is actually an error in the LV modbus lib. This is what is causing the framing error. I never noticed this before because I don't use that particular function of the Modbus lib.
Finally I got another Yaskawa unit (another model though V1000, previously on G7) to test. I still have some issues. -- Is it possible you can share the code that initialize the communication? Appreciated for helping out.
01-05-2011 08:35 AM - edited 01-05-2011 08:36 AM
Inhaler_jun,
I'm communicating using the following settings:
Mode = RTU
Baud = 9600 or 19200
Parity = Odd
If you continue to have problems, I suggest you use an o-scope to look at actual data packets being transmitted to and from the drive.