VFD Modbus Mesa 7i96S pktUART
- DerChristian
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 2
06 Mar 2024 07:04 #295298
by DerChristian
VFD Modbus Mesa 7i96S pktUART was created by DerChristian
Hey everybody,
as the title suggests I am trying to setup Modus between my Mesa 7i96s and my VFD (Stepperonline H100/EV50 Series 2.2kW).
I have already flashed the Mesa with the pktUART and made a cable with 330Ohm pullup and pulldown resistors.
The part I'm struggling with is the mesa modbus config file especially the addresses.
The vfd manual states the possilble function codes as 0x03, 0x00 and 0x10 and mentiones that the ram addresses are parameter number -1 +32768.
Plus there are some common address tables. But I don't get how to transfer these numbers to N x 8bit for the config file.
Maybe someone of you could point me in the right direction?
Since the manual is to big to be directly attached, here is the link
www.omc-stepperonline.com/index.php?rout...Full_User_Manual.pdf
The modbus communication is detailed beginning at page 117
Thanks and cheers, christian
as the title suggests I am trying to setup Modus between my Mesa 7i96s and my VFD (Stepperonline H100/EV50 Series 2.2kW).
I have already flashed the Mesa with the pktUART and made a cable with 330Ohm pullup and pulldown resistors.
The part I'm struggling with is the mesa modbus config file especially the addresses.
The vfd manual states the possilble function codes as 0x03, 0x00 and 0x10 and mentiones that the ram addresses are parameter number -1 +32768.
Plus there are some common address tables. But I don't get how to transfer these numbers to N x 8bit for the config file.
Maybe someone of you could point me in the right direction?
Since the manual is to big to be directly attached, here is the link
www.omc-stepperonline.com/index.php?rout...Full_User_Manual.pdf
The modbus communication is detailed beginning at page 117
Thanks and cheers, christian
Please Log in or Create an account to join the conversation.
- DerChristian
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 2
06 Mar 2024 15:23 #295330
by DerChristian
Replied by DerChristian on topic VFD Modbus Mesa 7i96S pktUART
Okay so I made some steps. The modbus driver looks like this now:
The driver loads and a I can see them in the hal configuration. Should I be able to control them in the hal configuration via the set command? Since the controlbit does different things depending on its value I think I have to use the enum function. I'll keep on documenting my progress here. If somebody has input to jumpstart my journey it would be greatly appreciated.
static const hm2_modbus_chan_descriptor_t channels[] = {
/* {TYPE, FUNC, ADDR, COUNT, pin_name} */
// Create 8 HAL bit pins coil-00 .. -07 supplying the values of coils at 0x0000
{HAL_S32, 6, 0xC122, 1, "controlbit"},
{HAL_S32, 6, 0xC441, 1, "speed"},
{HAL_S32, 3, 0x43F6, 1, "status"},
};
The driver loads and a I can see them in the hal configuration. Should I be able to control them in the hal configuration via the set command? Since the controlbit does different things depending on its value I think I have to use the enum function. I'll keep on documenting my progress here. If somebody has input to jumpstart my journey it would be greatly appreciated.
Please Log in or Create an account to join the conversation.
06 Mar 2024 19:16 #295340
by PCW
Replied by PCW on topic VFD Modbus Mesa 7i96S pktUART
Other somewhat obvious things are that you need to have
the modbus baudrate and channel set in your hal file
the modbus baudrate and channel set in your hal file
Please Log in or Create an account to join the conversation.
- DerChristian
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 2
06 Mar 2024 22:51 - 06 Mar 2024 22:52 #295362
by DerChristian
Replied by DerChristian on topic VFD Modbus Mesa 7i96S pktUART
Thanks for the reply. I've got the baudrate set to 19200 both in the vfd and the hal.
What do you mean with channel? If you mean the address, I dind't set it because the vfd uses per default address 1.
My problem at the moment is, that I can't get rid of the errorcode 11. The 330Ohm resitors are connected as mentioned in one of your previous posts. I already switched the polarity more than ones. Set the update-hz to 1Hz. But still no luck getting rid of the error.
What do you mean with channel? If you mean the address, I dind't set it because the vfd uses per default address 1.
My problem at the moment is, that I can't get rid of the errorcode 11. The 330Ohm resitors are connected as mentioned in one of your previous posts. I already switched the polarity more than ones. Set the update-hz to 1Hz. But still no luck getting rid of the error.
Last edit: 06 Mar 2024 22:52 by DerChristian. Reason: typos
Please Log in or Create an account to join the conversation.
06 Mar 2024 22:58 - 06 Mar 2024 23:04 #295363
by PCW
Replied by PCW on topic VFD Modbus Mesa 7i96S pktUART
You must set the address in hal to match your devices address.
A mis-matched address guarantees a no response error (error 11)
A mis-matched address guarantees a no response error (error 11)
Last edit: 06 Mar 2024 23:04 by PCW.
Please Log in or Create an account to join the conversation.
- DerChristian
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 2
06 Mar 2024 23:56 #295365
by DerChristian
Replied by DerChristian on topic VFD Modbus Mesa 7i96S pktUART
Just went back into the workshop to check. I assumed that "modname.address (default 0x01)" means it uses per default 1 if not set different. But no that didn't work either. Just for reference, here is my actual configuration:
HAL:
VFD_modbus.mod:
HAL:
loadrt VFD_modbus ports=hm2_7i96s.0.pktuart.0
addf VFD_modbus.00 servo-thread
setp VFD_modbus.00.address 1
setp VFD_modbus.00.baudrate 19200
setp VFD_modbus.00.update-hz 1
VFD_modbus.mod:
/*
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} */
// Create 8 HAL bit pins coil-00 .. -07 supplying the values of coils at 0x0000
{HAL_U32, 6, 0x0122, 1, "controlbit"},
{HAL_U32, 6, 0x0121, 1, "speed"},
{HAL_U32, 3, 0x03F6, 1, "status"},
};
Please Log in or Create an account to join the conversation.
07 Mar 2024 00:44 - 07 Mar 2024 00:45 #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
/*
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: 07 Mar 2024 00:45 by PCW.
Please Log in or Create an account to join the conversation.
- DerChristian
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 2
07 Mar 2024 07:04 #295378
by DerChristian
Replied by DerChristian on topic VFD Modbus Mesa 7i96S pktUART
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
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.
07 Mar 2024 09:11 #295380
by blazini36
Replied by blazini36 on topic VFD Modbus Mesa 7i96S pktUART
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?
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.
- DerChristian
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 2
07 Mar 2024 22:53 #295432
by DerChristian
Replied by DerChristian on topic VFD Modbus Mesa 7i96S pktUART
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.
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.
Time to create page: 0.082 seconds