Modbus drivers for NF 9000 VFD

12 May 2018 16:10 - 12 May 2018 16:32 #110608 by Grotius
@Hi Donno,

Nice work !!

Minimalmodbuss is a nice tool used with python.
I also made a moddbus example in pymodbuss. A step higher then the minimalmodbuss.
Here you see the example of pymodbuss with a more complex i/o device, ananog in/out, digital in/out, etc. :
Feel free to upgrade your example to pymodbus.

For us next step is to write a component. That is real time playing around in linuxcnc. Just like ethercat devices.
A linuxcnc comp. file that is loaded by : loadrt modbuss_your_device
and addf.. modbuss_your_device....

I think it will be better to load it in the servo-thread.....
Then it is really going fast !!!

Take for example the thcud.comp make a copy for safety and do a compile on this exact name.
You will see you need to write some code in c....
But if you are done, you can do real time modbuss in linuxcnc.
The modbuss ladder diagram is for me too complicated to understand.

A few person's are as clever to write the code for component's in C. I think John Thornton can do this, but you can do this also.
If you have the example that works, we can build it out. We have a link made by Rodw :
I never looked at this link before. But i will read it coming time.
Last edit: 12 May 2018 16:32 by Grotius.
13 May 2018 04:32 #110642 by rodw
Replied by rodw on topic Modbus drivers for NF 9000 VFD

Grotius wrote: A few person's are as clever to write the code for component's in C. I think John Thornton can do this, but you can do this also.
If you have the example that works, we can build it out. We have a link made by Rodw :
I never looked at this link before. But i will read it coming time.

Anybody who can program in C or program an Arduino can write a Hal component. Python is a much higher level language so what takes 1000 lines in C may take 100 in Python. If you know how to code, a new language is not hard to pick up. Hostmot2 is Andy's baby. Most Mesa cards have a UART (Universal asynchronous receiver-transmitter) on board that drives the smart serial RS422 interface on the Mesa Board. With the right bit file loaded onto the mesa card using mesaflash. Hostmot2 then creates read and write functions that can be used to send data out or read data from the mesa RS422 interface. These do not appear as pins but show up on startup if you watch the terminal window on startup fronm the command line. RS422 and RS485 are very similar protocols so if a RS485 device supports a 4 wire interface PCW says you can talk to it across the MESA RS422. Most RS485 interfaces are only 2 wire devices so take care with hardware selection (The good news for Grotius is that the Hypertherm plasma machines use a 4 wire interface). From memory, this method is limited to maximum packets of up to 64 characters or so (which is enough for most modbus applications). There is an example HAL component that reads a gyroscope that serves as an example on how to talk to a device using the hostmot2 RX and TX functions.

The problem with using a serial device in real time is the link speed. This VFD is talking across a 19200 baud link, the maximum throughput (from which you must deduct the handshaking overhead is 1920 characters per second. Unless you configure to use a high speed serial link (Mhz maybe) there is very little you can do between calls of the servo thread usually happening 1000 times per second. I think then that while a hostmot2 aware RS485 RX/TX component would be a nice way to talk to a RS485 device like a Hypertherm plasma cutter (becasue there is no need for an external USB or RS232 interface, I think a user space component (eg like this one written in Python) is adequate. I doubt that the Hypertherm RS485 was designed with real time adjustments in mind.

I do think that the Hostmot2 pathway would be great if you were using a Mesa 7i76e or 7i92 ethernet card being controlled by a USFF PC that has limited USB ports and no serial port on board.
30 May 2018 17:42 - 30 May 2018 17:43 #111327 by diep
Replied by diep on topic Modbus drivers for NF 9000 VFD
Hello Donno!
I see this VFD cheap on ebay now and it has constant torque setting. Does it work ok now and does it go to 24k rpm and 400Hz as well with linuxcnc?

Not gonna buy it if it can't work with linuxcnc very well.
I like to sit behind computer and control from there everything.

Bought a small milling motor now, focus upon being lightweight and want to control it with constant torque settings or otherwise vector control from a VFD. For this simplistic cnc milling machine i'm busy in CAD with i selected a GDK 0.8KW milling motor as it is under 3 kilo with some luck.

I do notice this on ebay pictures this VFD has very few digit settings.Seemingly 4. Is that correct? How do you know what RPM the milling motor is running? Can it run motor at 5 digits RPM ranges and also show some sort of indication it arrived there? Of course for this low price we cannot demand everything from the Chinese factories - yet would be great if it can deliver some sort of high torque at low rpm's.

Thanks for your hard work!
Vincent Diepeveen
diep at xs4all dot nl
X <== check this if you're not a robot
Last edit: 30 May 2018 17:43 by diep.
30 May 2018 18:23 - 30 May 2018 18:27 #111328 by Donno

Here is the link to the manual

It works good and there is a descend amount of information on this VFD, one thing i dislike you cannot reset to factory defaults so when VFD does not work or acts weird you manually got to go through all settings and set default to fix it.When i wrote the drivers i played a lot writing random values to the VFD but after i stopped fiddling it just works.

I have not run the VFD more than 6000 rpm as my motor is labeled 2800rpm or something like that . My drivers work fine but there is room for improvement, I am busy building a frame for the lathe and after that when i start using it will improve drivers if I find bugs and so on.

I hasty bought this VFD as a replacement and did not do a lot of research on the driver support and LinuxCNC. That is why i wrote the drivers and I think a lot more people will start to buy these VFD's

Not really familiar with vector control but quick google search ..... there is status function on VFD if look at manual on page 42.

F057 Output frequency(Hz)<-display hz in an Integer so 649.99hz will be displayed as 64999 on mod-bus the display will drop the last decimal if you use large numbers.

F058 Output speed (rpm)and i think F061 displays the amp's so you could theoretically write a vector control if i understand motor vector control correctly

My motor is 0.55KW (3 phase 380V) , i can not go lower than 7hz on vfd or 420 rpm and don't know if it is the motor itself as i can stop the motor with my hand on that low speed.

If your poles are set correctly on VFD the feedback speed on VFD is quite accurate. On my lathe the VFD shows 1000rpm and my rpm meter shows 1050 rpm think this is because my one pulley is a bit smaller if go 2000rpm on my VFD the rpm meter shows 2100rpm and so on. There is definitely an accurate correlation better than expected.

I personally think this VFD is good quality for your money and dirt cheap :)
Last edit: 30 May 2018 18:27 by Donno.
30 May 2018 19:34 #111331 by diep
Replied by diep on topic Modbus drivers for NF 9000 VFD
If you turn on vector control or even better constant torque setting - then it shouldn't be possible for you to stop it even at low Hz, say 7-9 Hz.

If you turn that on, can you stop it by hand?

As i would buy it only for constant torque setting or vector control (whichever gives more torque at lower RPM speeds). and that GDK i bought has a lot of torque for its weight (mechatronics is slightly better there, like 0.5 kilo lighter for the same torque - that's better versions GDK's at a steep price point).
30 May 2018 20:11 - 30 May 2018 20:12 #111332 by Donno
There is a setting in the manual on page 59

F067=3 Noninductive vector mode
Frequency inverter operates under Noninductive vector control arithmetic system,
supply extra torque compensation voltage. Could compensate slip because of load

Will have to check in the next few days maybe after the weekend will let you know :)
Last edit: 30 May 2018 20:12 by Donno.
03 Jun 2018 18:11 #111531 by Donno
Yes it has Vector Control, harder to stop when enabled on the VFD
03 Jun 2018 18:20 - 03 Jun 2018 18:27 #111533 by diep
Replied by diep on topic Modbus drivers for NF 9000 VFD
Thanks for figuring it out! The next guy will be happy with it as this is a cheap VFD!
Bought myself a 2nd hand Schneider Electric Altivar in meantime from Dortmans International.

And in meantime the rough design of the cnc milling router is nearly ready (the box i go build from epoxy concrete).

Like you i do not have any experiences with highspeed milling - will be interesting to see how it works out :)

So the vector control and constant torque settings is mainly for larger tools which do not really fit into the ER-11 :)
Last edit: 03 Jun 2018 18:27 by diep.
Moderators: cncbasher
Time to create page: 0.099 seconds
Powered by Kunena Forum