VFD Modbus Mesa 7i96S pktUART

More
2 years 7 months ago - 2 years 7 months ago #295368 by PCW
Replied by PCW on topic VFD Modbus Mesa 7i96S pktUART
This is working for me with a GS10 VFD:



/*
The format of the channel descriptors is:

{TYPE, FUNC, ADDR, COUNT, pin_name}

TYPE is one of HAL_BIT, HAL_FLOAT, HAL_S32, HAL_U32
FUNC = 1, 2, 3, 4, 5, 6, 15, 16 - Modbus commands
COUNT = number of coils/registers to read
*/

#define MAX_MSG_LEN 16   // may be increased if necessary to max 251

static const hm2_modbus_chan_descriptor_t channels = {
/*  {TYPE,    FUNC, ADDR,   COUNT, pin_name} */
    {HAL_U32, 3,  0x0611, 1,     "error_code"},
    {HAL_U32, 3,  0x2101, 1,     "status"},
    {HAL_FLOAT, 3,  0x2104, 1,     "output-current"},
    {HAL_FLOAT, 3,  0x2105, 1,     "bus-voltage"},  
    {HAL_FLOAT, 3,  0x210C, 1,     "motor-speed"},
    {HAL_FLOAT, 6,  0x2001, 1,     "frequency-command"},
    {HAL_U32, 6,  0x2000, 1,     "operation"},
};


/* Optionally #define DEBUG to aid with troubleshooting.
   Use 3 to see a lot of information about the modbus
   internal workings. 1 is default (errors only)           

Error 11 (com timeout) might be wiring. parity, or VFD setup
Last edit: 2 years 7 months ago by PCW.

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

More
2 years 7 months ago #295378 by DerChristian
That doesn't that different then mine. I even checked the modbus manual of your inverter to see if there are any major differences in the modbus section. I'll add a excerpt of my manual with the communication parameters.
What I tested after your message:
- Setting stop bit to 0
- Setting baudrate to 9600
- Setting communication delay time to 0
- Switching polarity of the cables after changing each value
- measuring the cable
 

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

More
2 years 7 months ago #295380 by blazini36
Kind of odd the man page for the driver doesn't mention a stop bit at all, is there a stop bit?

You can obviously setup the serial ports on the other end however you want but AFAIK modbus likes 2 stop bits when parity is none. Since the manual doesn't mention the port config for data or stop bits is it always assumed to be 8<parity>1?

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

More
2 years 7 months ago #295432 by DerChristian
Do you mean the mesa modbus driver on the linux cnc side? 
On the vfd side I can change the stopbit from 0-2. But till now I got no communication established. 
I had an waveshare USB to RS485 Dongle laying around and tried to get a communication between the vdf and the dongle established, but got no luck. 

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

More
2 years 7 months ago #295440 by blazini36
I mean the Modbus driver side. You're just guessing what to set the VFD to unless you either already know what the Mesa/driver side is doing or you set it yourself. PCW says he has it working with a GS10 VFD so he can tell you definitively what the VFD should be set at, otherwise it wouldn't work for him either.

Looking around I've only come across things that suggest it should be set at 8<parity>1 which is pretty typical. You should try using something like qmodbus with your USB dongle to make sure you can get something out of that VFD before messing with pktUART

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

More
2 years 7 months ago #295443 by DerChristian
Yeah I'm trying exactly that. Took the vfd out of the wiring cabinet and with me into the office. Tested different programs, thanks for mentioning qmodbus. I even took the control board apart to see if there is maybe an error in the manual and the modbus is using other pins of the RJ45 connector than the mentioned pins 1 and 2. But after some fiddling and testing different pins I'am sure pin 1 and 2 are the right pins. Because thats the only combination where I even get ay RX signal. But no matter what I'm doing the only response I get is 00. I also contacted the tech support of the vfd.
P.S. do you know if qmodbus is sending CRC16 after each command?

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

Time to create page: 0.251 seconds
Powered by Kunena Forum