Configure Mesa 7i96s and pktuart with Omron MX2 (wj200)
- Stephan@work
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
31 Jan 2026 11:26 #342246
by Stephan@work
Configure Mesa 7i96s and pktuart with Omron MX2 (wj200) was created by Stephan@work
Hey Guys,
this is Stephan from Germany. A 39 years old HW/SW Engineer without any clue about LinuxCNC.
I retrofitted my old Gravorgraph VX92 with a Mesa 7i96s and a Vdf Omron MX2 ( similar to Hitachi WJ200).
LinuxCNC was working with some USB/RJ485 Dongle, and i was able to run my Vdf without any issues.
Thank you for all these comments in this message board. Without your help with other peopleś issues, I would still have to operate my milling machine by hand.
I tried to connect my Vdf without these ModBus USB-Dongle and connected it to the Vdf.
After wasting days to get it running, i decided to write my first question in a forum.
I took my oscilloscope to measure the output of the mesa 7i96s (modbus_mesa.png, not connected with the Vdf this time).
The signal looks pretty fine, but compare to the USB/RJ485 Dongle signal (modbus_USB.png),
I saw only a few packages every 20 seconds.
The Signal of my USB/RJ485 was running every ~10ms (not connected with the Vdf either).
HAL:
#
SPINDLE <---> MODBUS <---> MESACard
loadrt wj200-vfd ports=hm2_7i96s.0.pktuart.0
addf wj200-vfd.00 servo-thread
setp wj200-vfd.00.address 1
setp wj200-vfd.00.baudrate 9600
setp wj200-vfd.00.parity 0
setp wj200-vfd.00.update-hz 0.1
[...]
mod file:
/*
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_BIT, 5, 0x0001, 1, "run"},
{HAL_BIT, 5, 0x0002, 1, "reverse"},
{HAL_BIT, 1, 0x0014, 1, "is-at-speed"},
{HAL_BIT, 1, 0x000F, 1, "is-running"},
{HAL_BIT, 1, 0x0018, 1, "watchdog-out"},
{HAL_FLOAT, 3, 0x1003, 1, "motor-current"},
{HAL_FLOAT, 3, 0x1019, 1, "heatsink-temp"},
{HAL_FLOAT, 6, 0x0001, 1, "commanded-frequency"},
};
Does anyone knows these issue ?
Thank you so much !
Best Regards,
Stephan
this is Stephan from Germany. A 39 years old HW/SW Engineer without any clue about LinuxCNC.
I retrofitted my old Gravorgraph VX92 with a Mesa 7i96s and a Vdf Omron MX2 ( similar to Hitachi WJ200).
LinuxCNC was working with some USB/RJ485 Dongle, and i was able to run my Vdf without any issues.
Thank you for all these comments in this message board. Without your help with other peopleś issues, I would still have to operate my milling machine by hand.
I tried to connect my Vdf without these ModBus USB-Dongle and connected it to the Vdf.
After wasting days to get it running, i decided to write my first question in a forum.
I took my oscilloscope to measure the output of the mesa 7i96s (modbus_mesa.png, not connected with the Vdf this time).
The signal looks pretty fine, but compare to the USB/RJ485 Dongle signal (modbus_USB.png),
I saw only a few packages every 20 seconds.
The Signal of my USB/RJ485 was running every ~10ms (not connected with the Vdf either).
HAL:
#
SPINDLE <---> MODBUS <---> MESACard
loadrt wj200-vfd ports=hm2_7i96s.0.pktuart.0
addf wj200-vfd.00 servo-thread
setp wj200-vfd.00.address 1
setp wj200-vfd.00.baudrate 9600
setp wj200-vfd.00.parity 0
setp wj200-vfd.00.update-hz 0.1
[...]
mod file:
/*
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_BIT, 5, 0x0001, 1, "run"},
{HAL_BIT, 5, 0x0002, 1, "reverse"},
{HAL_BIT, 1, 0x0014, 1, "is-at-speed"},
{HAL_BIT, 1, 0x000F, 1, "is-running"},
{HAL_BIT, 1, 0x0018, 1, "watchdog-out"},
{HAL_FLOAT, 3, 0x1003, 1, "motor-current"},
{HAL_FLOAT, 3, 0x1019, 1, "heatsink-temp"},
{HAL_FLOAT, 6, 0x0001, 1, "commanded-frequency"},
};
Does anyone knows these issue ?
Thank you so much !
Best Regards,
Stephan
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17656
- Thank you received: 5164
31 Jan 2026 15:48 #342251
by PCW
Replied by PCW on topic Configure Mesa 7i96s and pktuart with Omron MX2 (wj200)
setp wj200-vfd.00.update-hz 0.1
Means you would get 1 packet every 10 seconds
(so a 2 in 20 seconds)
Means you would get 1 packet every 10 seconds
(so a 2 in 20 seconds)
Please Log in or Create an account to join the conversation.
- Stephan@work
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
01 Feb 2026 09:14 #342273
by Stephan@work
Replied by Stephan@work on topic Configure Mesa 7i96s and pktuart with Omron MX2 (wj200)
I removed
setp wj200-vfd.00.update-hz 0.1
from .hal
Linuxcnc starts without any error, but still no Temperature from VDF (my indicator that it should work).
But if click the Spindle CW Button , my Vdf switched immediately into some E 12.1 Error Code (image):
If I click the ccw button, Linux CNC will close suddenly and create some error log about weird Modbus data. (modbus_error.png).
Itś hard to debug, my Workshop is 75m long walk, it is currently -5°C inside, so i bought a 75m ethernet cable to extend my Wifi for RemoteDesktop.
But i have to reset my Vdf by Hand every E12.1 Error ( good excercise
)
setp wj200-vfd.00.update-hz 0.1
from .hal
Linuxcnc starts without any error, but still no Temperature from VDF (my indicator that it should work).
But if click the Spindle CW Button , my Vdf switched immediately into some E 12.1 Error Code (image):
If I click the ccw button, Linux CNC will close suddenly and create some error log about weird Modbus data. (modbus_error.png).
Itś hard to debug, my Workshop is 75m long walk, it is currently -5°C inside, so i bought a 75m ethernet cable to extend my Wifi for RemoteDesktop.
But i have to reset my Vdf by Hand every E12.1 Error ( good excercise
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17656
- Thank you received: 5164
01 Feb 2026 17:30 #342287
by PCW
Replied by PCW on topic Configure Mesa 7i96s and pktuart with Omron MX2 (wj200)
Actually I would move to the new and better supported hm2-modbus
as there are some long-standing bugs in mesa-modbus
(the call response mismatch is a known one)
as there are some long-standing bugs in mesa-modbus
(the call response mismatch is a known one)
Please Log in or Create an account to join the conversation.
- Stephan@work
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
04 Feb 2026 15:47 - 06 Feb 2026 11:15 #342396
by Stephan@work
Replied by Stephan@work on topic Configure Mesa 7i96s and pktuart with Omron MX2 (wj200)
Hey PCW,
thank you. I updated LCNC from 2.9.4 to 2.9.8 to use mesambccc.
I saw some comment of your gs10 vdf and tried to edit this.
I created a mbccs file only with "run" and "heatsink-temperature" to test
My first question:
in my Omron_MX2.mbccs file. there is some device name.I tried to use a different name like "OmronMX2" but it seems, only gs10 or wj200 should work.[/code][/code]
[/code][/code][/code][/code]
[/code][/code][/code]
[/code][/code][/code][/code][/code][/code]
thank you. I updated LCNC from 2.9.4 to 2.9.8 to use mesambccc.
I saw some comment of your gs10 vdf and tried to edit this.
I created a mbccs file only with "run" and "heatsink-temperature" to test
[code]<mesamodbus baudrate="9600" parity="N" interval="1000" stopbits="2">
<devices>
<device name="wj200" address="0x01"/>
</devices>
<initlist>
<command device="wj200" address="0x0001" function="W_REGISTER">
<description> Zero Operation</description>
<data value="0"/>
</command>
<command device="wj200" address="0x0001" function="W_REGISTER">
<description>Zero Frequency</description>
<data value="0"/>
</command>
</initlist>
<commands>
<command device="wj200" address="0x0001" function="W_REGISTERS" name="run" haltype="HAL_BIT" modbustype="U_AB" count="1"/>
<command device="wj200" address="0x1019" function="R_REGISTERS" name="heatsink-temp" haltype="HAL_FLOAT" modbustype="U_AB" count="1"/>
</commands>
</mesamodbus>My first question:
in my Omron_MX2.mbccs file. there is some device name.
[code]<device name="wj200" address="0x01"/>Omron_MX2.mbccs: error: Device name 'OmronMX2' not found in devices list initlist/command[1]
[u]Is there any kind of driver list to choose from ?[/u]
EDIT: [u]only lower case[/u],
Manual:ATTRIBUTE VALUESAttribute values are generally case insensitive, except for the [i]name attributes, which should always be lower case.[/i]
[code][code][code]I looked into your .hal and added:[code][code][code][code]loadrt hm2_modbus ports=hm2_7i96s.0.pktuart.0 mbccbs="Omron_MX2.mbccb"
addf hm2_7i96s.0.read servo-thread
addf hm2_modbus.0.process servo-thread
addf hm2_7i96s.0.write servo-thread[code][code][code]But Received the following Error: LCNC_Error.png
I can´t find any other addf hm2_7i962.0.read in my .hal file. So I don´t understand these Error message.
Any Idea ?[code][code][code]
Last edit: 06 Feb 2026 11:15 by Stephan@work.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17656
- Thank you received: 5164
04 Feb 2026 17:23 #342402
by PCW
Replied by PCW on topic Configure Mesa 7i96s and pktuart with Omron MX2 (wj200)
The device name can be anything but must be consistent within the source file
Not sure about the addf issue, I will take a look at a working gs10- hal file later today
Not sure about the addf issue, I will take a look at a working gs10- hal file later today
Please Log in or Create an account to join the conversation.
- tommylight
-
- Offline
- Moderator
-
Less
More
- Posts: 21243
- Thank you received: 7252
04 Feb 2026 17:48 #342407
by tommylight
Replied by tommylight on topic Configure Mesa 7i96s and pktuart with Omron MX2 (wj200)
You have this line
addf hm2_7i96s.0.read servo-thread
twice inside the hal file, so that will obviously not work, and i assume the same thing will happen with
addf hm2_7i96s.0.write servo-thread
after you delete the fist offending line.
You have to add this line
addf hm2_modbus.0.process servo-thread
between the already existing READ and WRITE lines, and add
loadrt hm2_modbus ports=hm2_7i96s.0.pktuart.0 mbccbs="Omron_MX2.mbccb"
before those read and write lines.
addf hm2_7i96s.0.read servo-thread
twice inside the hal file, so that will obviously not work, and i assume the same thing will happen with
addf hm2_7i96s.0.write servo-thread
after you delete the fist offending line.
You have to add this line
addf hm2_modbus.0.process servo-thread
between the already existing READ and WRITE lines, and add
loadrt hm2_modbus ports=hm2_7i96s.0.pktuart.0 mbccbs="Omron_MX2.mbccb"
before those read and write lines.
Please Log in or Create an account to join the conversation.
- Stephan@work
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
05 Feb 2026 06:17 #342447
by Stephan@work
Replied by Stephan@work on topic Configure Mesa 7i96s and pktuart with Omron MX2 (wj200)
ohh yes,
I was searching for hm2_7i96s.0.*
But I used addf [HMOT](CARD0).read of my .ini variables in the beginning of my .hal file.
I will check it before work
I was searching for hm2_7i96s.0.*
But I used addf [HMOT](CARD0).read of my .ini variables in the beginning of my .hal file.
I will check it before work
Please Log in or Create an account to join the conversation.
- Stephan@work
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
06 Feb 2026 10:59 #342540
by Stephan@work
Replied by Stephan@work on topic Configure Mesa 7i96s and pktuart with Omron MX2 (wj200)
Hey Guys,
a few hours later, i compile a new mbccs file and implemented these pin names in my .hal file.
I can toggle the pin in LinuxCNC but still no reaction on my Vdf.
There is a little RUN LED on top of the VDF to indicate, if I successfully send the "run" command.
(It worked with the USB-Dongle pretty well)
Can you see any kind of mistakes anywhere ?
I am close to the finishline but getting more and more frustrated
Thank you for any hint
a few hours later, i compile a new mbccs file and implemented these pin names in my .hal file.
<mesamodbus baudrate="9600" parity="N" stopbits="1" duplex="half">
<devices>
<device name="omronmx2" address="0x01"/>
</devices>
<initlist>
<command device="omronmx2" address="0x0001" function="W_COIL">
<description>Zero Operation</description>
<data value="0"/>
</command>
</initlist>
<commands>
<command device="omronmx2" address="0x0001" function="W_COIL" name = "run"/>
<command device="omronmx2" function="R_REGISTERS" address="0x1019" name="heatsink-temp" haltype="HAL_FLOAT" modbustype="U_AB" count="1"/>
</commands>
</mesamodbus>I can toggle the pin in LinuxCNC but still no reaction on my Vdf.
There is a little RUN LED on top of the VDF to indicate, if I successfully send the "run" command.
(It worked with the USB-Dongle pretty well)
loadusr -W wj200_vfd --device /dev/ttyUSB0 --baud 9600 --parity N --data 8 --stop 1Can you see any kind of mistakes anywhere ?
I am close to the finishline but getting more and more frustrated
Thank you for any hint
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17656
- Thank you received: 5164
06 Feb 2026 16:10 #342554
by PCW
Replied by PCW on topic Configure Mesa 7i96s and pktuart with Omron MX2 (wj200)
What is the omronmx2 fault status?
Please Log in or Create an account to join the conversation.
Time to create page: 0.132 seconds