So you are using a USB-to-serial interface to connect the LCNC computer to the 
VFD?     My understanding is that modbus is usually RS-485.  Not RS232.    SO I 
assume a USB-to-RS-485 dongle is used.

My first thought is that I would hate to haver to debug this without being able 
to see what is going over the wire.   A logic analyzer would be my “go to” 
tool.    YOu can buy cheap ones, well under $100 or even under $40 if the data 
is low-spedd (under about 10MHz)

Then you can see what was actually sent and received rather than what you think 
should have been sent.  Usually the problem is those two things don’t match.

Why not delete the line in the .ini file that applies to TCP if you are using 
serial.

Now with the ability to see the data, you can ask very specific questions like 
“I thought I sent X, but Y came out. What’s up?"

Why ask me?   I was the dumb guy who simply glued a servo to the speed control 
knob and actually turned the physical knob.    (But I would never do that for a 
paying customer; the serial data link is the way to go.)


> On Oct 2, 2026, at 9:17 AM, maurice e heskett <[email protected]> wrote:
> 
> On 10/2/26 11:33, Viesturs Lācis wrote:
>> Hello!
>> 
>> I have a VFD that I can nicely start and stop with an output from 7i84
>> board, but customer does not like the fact that I replicated original
>> solution of setting spindle speed with potentiometer. They want to do
>> that from g-code so that it is consistent and not a subject for
>> operator to mess up. Unfortunately all analog outputs on 7i33 board
>> are already used for servodrives so I would prefer avoiding adding
>> more boards.
>> It is Invertek Optidrive E3 VFD and I have usb-to-rs485 converter.
>> lsusb shows it as CH340 chip. With some other commands I was able to
>> determine that it is using ttyUSB0 port.
>> 
>> Here is the section of Optidrive E3 manual that describes the modbus
>> message contents:
>> https://ibb.co/PzFsq8fP
>> 
>> And according to manual I can still have start/stop signal the way I
>> have now even when the drive is in Modbus mode so what I would need is
>> to send the frequency value (optionally - read actual frequency to
>> determine "spindle-at-speed" and "spindle-is-stopped"):
>> https://ibb.co/PGXK2gW5
>> 
>> I tried searching web of how to start and went for mb2hal route.
>> In HAL file I have:
>> loadusr -W mb2hal config=mb2hal.ini
>> 
>> Here is contents of mb2hal.ini file:
>> https://pastebin.com/h9qHcPR1
>> 
>> I tried looking at pins of mb2hal component in HalShow but the only
>> thing that was changing was a pin that shows number of errors.
>> mb2hal.ini file has 2 entries about debug messages but I did not even
>> understand where to find them so at the moment I have exactly no idea
>> what is wrong and how to proceed so I would appreciate if someone
>> could hold my hand and then gently poke in correct direction. It seems
>> like a basic thing of what people are doing with VFDs over modbus but
>> I have never done that.
>> 
>> Viesturs
> The only suggestion & probably way out in left field that I'll make is to use 
> a analog numerical output pin to control a mesa spinx1.  I'm using one to 
> drive my sheldon's vfd.  The only other vfd is on my 6040 gantry & it makes 
> use of the spindle output of a 7i76d, which is direct up to 24k revs.  Modbus 
> I'll have to plead no knowledge of.  There s/b today, ready made solutions, 
> probably USB fed. PCW probably has something.
>> 
>> 
>> _______________________________________________
>> Emc-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>> .
> 
> 
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users



_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to