On 10/2/26 13:49, Chris Albertson wrote:
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.
Nope, on the 6040 I'm using the d-a built into the 7i76d, direct to the
Analog input on the vfd. There are also pins for enable & direction
that I couldn't make work like I wanted, so those were reassigned to
normal digital pins. Testing worked ok, but I can't recall ever using
spindle reverse in a g-code program.
I had to use what would have been stepgen pins on the 7i90HD driving the
sheldon but its been a decade+ since I last had the hal file in an
editor, so the details are fuzzy. I have around 50 of the 72 i/o pins
used, with enough left over for an enco style tool changer, but gave up
hoovering ebay for one years ago.
The hand cranks on the Sheldon left, replaced by 2 $22 encoder 100 ppt
a/b dials, switched function so they are also speed controls by a
pushbutton beside the dials. Speed is actually how many counts of the
motor each pulse from the dials is, so that control never leaves
digital. At speed 1, it can dial a fraction of a thou. At the highest
speed it outruns the motors max but doesn't lose a count.
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.
I grew up with a scope probe or a soldering iron in my left hand so I know what
the signals should look like
Why not delete the line in the .ini file that applies to TCP if you are using
serial.
My serial is the 3 wire SPI between the rpi4 and the 7I90HD, where the
com speed is 42&small change megabaud tx, 25 megabaud rx. In 32 bit
packets. Bulletproof... The TCP facility's are only network, nothing
from LinuxCNC goes thru the RJ45. On any of my machines.
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.)
I've been looking at waveforms since my 16th. 1950. Now I use Siglents
best 350 mhz/channel, 4 color channel scope. $3500 shipped.
We dance to different tempo's but both of us get the job done.
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 origin0al
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
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users