585,581 active members*
3,857 visitors online*
Register for free
Login
Page 2 of 2 12
Results 21 to 37 of 37
  1. #21
    Join Date
    Mar 2010
    Posts
    813

    Re: Mach3 VFD control via modbus using brain file

    Hey A_Camera, I hope you don't mind me picking your brain some more,(no pun intended...lol) but I'm stuck and hoping for a push in the right direction. After hours of reading Hunayang manual, Modbus, searching the internet, and learning the serial monitor program, tonight I tried to communicate with VFD through Mach3 with no success. I watched your video several times setting up Modbus in Mach and my question is and where I think I'm stuck is the address's to send the commands to. The format is different than the Boschrexroth inverter. I attached a page from the HY manual along with 3 lines of code. Start spindle, Stop spindle, and frequency setting. Would 03 be the address to send commands to and 05 the address for frequency settings? I've successively communicated with the VFD with the serial program, now if I can just figure out how to do it through Mach. I can start experimenting with your brain tutorial.

    Thanks for you help

    Attachment 334706


    [QUOTE=A_Camera;1926186]Attachment 330966QUOTE]

  2. #22
    Join Date
    Dec 2003
    Posts
    24220

    Re: Mach3 VFD control via modbus using brain file

    I have the information that Huanyang/Modbus version uses from my communications with Sebastien for his Mach plug in. They do stray from the standard Modbus.
    As I used a duplicate slave to build into a DC motor drive.
    I used a simple RS232 program RS232HEXcom to communicate and send commands to the VFD to test all the commands.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #23
    Join Date
    Mar 2010
    Posts
    813

    Re: Mach3 VFD control via modbus using brain file

    I'm communicating with the Hunayang VFD with a rs232 program and turning spindle on/off with different speeds/frequencies. What I'm having a problem with is setting it up in Mach3 with the "test Modbus". Once I figure out these setting I'm hoping to use the Brains in Mach3 to control like A_Camera shows in his tutorial video.

  4. #24
    Join Date
    Apr 2013
    Posts
    1899

    Re: Mach3 VFD control via modbus using brain file

    Quote Originally Posted by Dan911 View Post
    Hey A_Camera, I hope you don't mind me picking your brain some more,(no pun intended...lol) but I'm stuck and hoping for a push in the right direction. After hours of reading Hunayang manual, Modbus, searching the internet, and learning the serial monitor program, tonight I tried to communicate with VFD through Mach3 with no success. I watched your video several times setting up Modbus in Mach and my question is and where I think I'm stuck is the address's to send the commands to. The format is different than the Boschrexroth inverter. I attached a page from the HY manual along with 3 lines of code. Start spindle, Stop spindle, and frequency setting. Would 03 be the address to send commands to and 05 the address for frequency settings? I've successively communicated with the VFD with the serial program, now if I can just figure out how to do it through Mach. I can start experimenting with your brain tutorial.

    Thanks for you help

    Attachment 334706

    Quote Originally Posted by A_Camera View Post
    http://www.cnczone.com/forums/uccnc-...ml#post1942234

    I made the above post just the other day regarding the HY and Modbus. Have a look at that, as well as you must make sure that you select Modbus RTU, not ASCII, in PD165, and the settings match the Mach3 communication parameters. Use this example to see if you can set the spindle speed.

    Attachment 334748

    The way to do it in Mach3 Modbus serial control monitor window is that you must set the port number for your RS485 port (4 in my picture), the bps (38400 for me) and click on "Open". "Status" field must say "No error" otherwise you have a problem which you must fix before continuing. Can be the port setup or something else.

    Attachment 334762

    When you have managed to open the port you can test sending message. Use the above example from the HY manual. I don't know if it is working, but the way I see it, it should.

    Attachment 334764

    You must set "Slave Addr" to 1, "Start" to 3, "Num Regs" to 1 and Data to BB8 (replace my 81 with BB8), which is the frequency according to my example and is corresponds to 30.00Hz. Select "Holding Register(s)" radio button and click on "Write". The Status field should say "No error" and the display of your VFD should display the frequency or the RPM corresponding to that frequency, assuming you have set up the VFD to do so in stop mode. I haven't been digging deeper in the HY manual, so I don't know how to start and stop the spindle, but that's where I would start, if the frequency is set and displayed, you can carry on from there, but if not then I don't know. In any case, no point continuing if you can't get it working in this window.

    You can also try this free and independent simple HY control to analyse your problems and see if everything works with this one.

    https://github.com/GilchristT/SpindleTalker2/releases

  5. #25
    Join Date
    Mar 2010
    Posts
    813

    Re: Mach3 VFD control via modbus using brain file

    Quote Originally Posted by A_Camera View Post
    Attachment 334764

    You must set "Slave Addr" to 1, "Start" to 3, "Num Regs" to 1 and Data to BB8 (replace my 81 with BB8), which is the frequency according to my example and is corresponds to 30.00Hz. Select "Holding Register(s)" radio button and click on "Write". The Status field should say "No error" and the display of your VFD should display the frequency or the RPM corresponding to that frequency, assuming you have set up the VFD to do so in stop mode. I haven't been digging deeper in the HY manual, so I don't know how to start and stop the spindle, but that's where I would start, if the frequency is set and displayed, you can carry on from there, but if not then I don't know. In any case, no point continuing if you can't get it working in this window.

    You can also try this free and independent simple HY control to analyse your problems and see if everything works with this one.

    https://github.com/GilchristT/SpindleTalker2/releases
    The settings you posted I've tried except the data. I have the hunayang plugin and used it in Mach 3 to make a log of code it was sending to the VFD with a serial monitor, it made it simple to figure out how to communicate with the VFD. I can easily set freqs and turn spindle on/off sending code through serial monitor program but using the Modbus Serial Control in Mach3 has me stumped. I'm suspecting it has something to do with the CRC, the VFD won't respond if that's not input correctly. I'm fairly confident my settings are correct since port opens with no errors.

    Thanks for your help much appreciated

    Attachment 334778

  6. #26
    Join Date
    Apr 2013
    Posts
    1899

    Re: Mach3 VFD control via modbus using brain file

    Quote Originally Posted by Dan911 View Post
    The settings you posted I've tried except the data. I have the hunayang plugin and used it in Mach 3 to make a log of code it was sending to the VFD with a serial monitor, it made it simple to figure out how to communicate with the VFD. I can easily set freqs and turn spindle on/off sending code through serial monitor program but using the Modbus Serial Control in Mach3 has me stumped. I'm suspecting it has something to do with the CRC, the VFD won't respond if that's not input correctly. I'm fairly confident my settings are correct since port opens with no errors.

    Thanks for your help much appreciated

    Attachment 334778
    OK, I am sorry, I don't know what's going on. I made some CRC16 calculations using this calculator but it seems that the checksum is right, so it can't be the CRC, something else must be wrong. Note that the checksum is in reverse order, so when your checksum says 82 D0 it is actually D082, which is as it supposed to be. I compared with some examples from my manual, just to check the calculator, and the calculator results match that of my manual.

    Perhaps you can send a PM to member vmax549. He says in this post that he is using Modbus with HY. Perhaps he can help you sort it out.

    Sorry for not being able to help.

    Just a little side note... Yesterday I managed to control my VFD via Modbus even with UCCNC. Modbus support is much better there, although I have some minor issues, which I informed CNC Drive about. I modified M3, M4 and M5 macros as well, so that the G-code execution stops after M3 and M4 until the spindle speed is reached, and also after M5 until the spindle is stopped. This removes the need of fixed dwell time for acceleration and deceleration, which I think is good and useful. My UC300ETH has arrived, I have to collect it this afternoon, and after that I will play with the UCCNC a bit more seriously. Currently in demo mode, and in demo mode motion is not supported, only simulated. It needs the UC300ETH, since the license is for that controller, not my UC300USB.

  7. #27
    Join Date
    Mar 2010
    Posts
    813

    Re: Mach3 VFD control via modbus using brain file

    Quote Originally Posted by A_Camera View Post
    OK, I am sorry, I don't know what's going on. I made some CRC16 calculations using this calculator but it seems that the checksum is right, so it can't be the CRC, something else must be wrong. Note that the checksum is in reverse order, so when your checksum says 82 D0 it is actually D082, which is as it supposed to be. I compared with some examples from my manual, just to check the calculator, and the calculator results match that of my manual.

    Perhaps you can send a PM to member vmax549. He says in this post that he is using Modbus with HY. Perhaps he can help you sort it out.

    Sorry for not being able to help.

    Just a little side note... Yesterday I managed to control my VFD via Modbus even with UCCNC. Modbus support is much better there, although I have some minor issues, which I informed CNC Drive about. I modified M3, M4 and M5 macros as well, so that the G-code execution stops after M3 and M4 until the spindle speed is reached, and also after M5 until the spindle is stopped. This removes the need of fixed dwell time for acceleration and deceleration, which I think is good and useful. My UC300ETH has arrived, I have to collect it this afternoon, and after that I will play with the UCCNC a bit more seriously. Currently in demo mode, and in demo mode motion is not supported, only simulated. It needs the UC300ETH, since the license is for that controller, not my UC300USB.


    Yes the CRC is reversed, that's why I suspected it being the CRC. Inputting in that order to the HY vfd wont be read unless you reverse it. Using the Mach3 and UCCNC Modbus interface attempting to just turn spindle on/off wasn't possible for me. With using the same settings in both the output code was the same, and was a format (Modbus) hunyang vtd wouldn't read besides the CRC problem. Looks like I'm stuck with Mach3 until a plugin for Mach4 or UCCNC is developed. That's beyond my capabilities.

    On the side note...How did you overcome getting over the problems you were having in Mach3 in UCCNC without the use of Brains?

    Thanks again for your time and help.

  8. #28
    Join Date
    Apr 2013
    Posts
    1899

    Re: Mach3 VFD control via modbus using brain file

    Quote Originally Posted by Dan911 View Post
    Yes the CRC is reversed, that's why I suspected it being the CRC. Inputting in that order to the HY vfd wont be read unless you reverse it. Using the Mach3 and UCCNC Modbus interface attempting to just turn spindle on/off wasn't possible for me. With using the same settings in both the output code was the same, and was a format (Modbus) hunyang vtd wouldn't read besides the CRC problem. Looks like I'm stuck with Mach3 until a plugin for Mach4 or UCCNC is developed. That's beyond my capabilities.

    On the side note...How did you overcome getting over the problems you were having in Mach3 in UCCNC without the use of Brains?

    Thanks again for your time and help.
    UCCNC is pretty straight forward once the 11 pages of document related to Modbus is read, so with my VFD it was pretty simple to get started. I started with setting up the connection, defining one function and in the variable table, manually writing a value to that field. Once I saw it working I set up the rest of the functions and started the loop. When everything was green in the debug view, I just went to the Run window and tested with M3/M4/M5 to start/stop/reverse. To enter the spindle speed, the RPM must be converted to frequency and I did that in macro, modifying M3 and M4. I modified even M5.

    The way it works now is that M3 reads the spindle speed DRO, multiplies that value by 0.6 and places the result in Modbus variable 1. The macro also places the CW RUN command (129) in Modbus variable 0 and executes the UCCNC DospinCW command. After that it waits for the spindle to spin up (VFD reports that the spindle speed is reached) and first when that is reported it returns and continues with the rest of the G-code.

    The same is done in M4 macro, except that the command to my VFD is 133 and the UCCNC executes the DospinCCW command.

    M5 waits until VFD reports that the spindle is stopped before returning and continuing with the rest of the G-code execution.

    This way I don't need a constant dwell delay and can keep those values at zero, after all, the time it takes for the spindle to spin up to speed is not constant.

    Once the Modbus is configured and tested in UCCNC i click on the Start loop button and that's it. Values are filled in the variable table, which is used for the communication, so every macro must read from and write to this table to communicate with the VFD. This is pretty simple. No, there is no Brains function, so for example monitoring spindle speed, temperature, output voltage, output current and so on can only be done through macro loops. I will not have time to fix that for a while, I must get started and start using UCCNC instead.

    My UC300ETH arrived this week, so I must get on with my upgrade and use of my CNC in parallel. Did a quick test of the controller and it is great, works very well with the UCCNC, it is much faster than the UC300USB, or at least it feels like the motion is smoother. Perhaps that's just in my imagination, I still have to perform some more tests, but it certainly works very well.

  9. #29
    Join Date
    Mar 2010
    Posts
    813

    Re: Mach3 VFD control via modbus using brain file

    Hi AC,

    First I have to start by saying "what a shame" Brains was removed from Mach4. Never played with it up to now and see what a great tool for the inexperienced like myself in writing Macros/Scripts.

    I wanted to see if I was able to get my HY VFD going via the Brains method since you provide a great step by step tutorial, thought it would be a good learning experience but of course I immediately ran into problems. I was starting simple and was experimenting on a on/off and my problem is as soon as Mach3 starts its outputting my start and stop code before ever pressing a button.

    Attachment 336890

    Attachment 336892



    I understand why in your setup this isn't a issue because your address alone wouldn't start or stop, it needs a start or stop command sent to address. Any ideas how to get around this??

    Thanks,
    Dan

  10. #30
    Join Date
    Apr 2013
    Posts
    1899

    Re: Mach3 VFD control via modbus using brain file

    Quote Originally Posted by Dan911 View Post
    Hi AC,

    First I have to start by saying "what a shame" Brains was removed from Mach4. Never played with it up to now and see what a great tool for the inexperienced like myself in writing Macros/Scripts.

    I wanted to see if I was able to get my HY VFD going via the Brains method since you provide a great step by step tutorial, thought it would be a good learning experience but of course I immediately ran into problems. I was starting simple and was experimenting on a on/off and my problem is as soon as Mach3 starts its outputting my start and stop code before ever pressing a button.

    Attachment 336890

    Attachment 336892



    I understand why in your setup this isn't a issue because your address alone wouldn't start or stop, it needs a start or stop command sent to address. Any ideas how to get around this??

    Thanks,
    Dan
    That is the way it is working. It starts immediately and outputs the values all the time, that's why you need the brain file logic, you need to control what is being output, based on the state of CW/CCW/Run state. The problem is that your VFD needs to output different READ addresses and uses those as commands, so it makes things a bit more complicated. I will try to think out something (if I can) but at the moment I am very busy so I have very little time to play with Mach3. I'll get back as soon as I can once I have an idea how to solve this. Of course, perhaps it can be done through a macro pump also, and in that case you don't need the brains. I have never tried to do external communications with a macro pump, so I don't know if that's possible at all, but perhaps it is.

  11. #31
    Join Date
    Mar 2010
    Posts
    813

    Re: Mach3 VFD control via modbus using brain file

    Laid up recovering do to heath reasons and bored to death...lol Just having some fun with this and possibly learning a few things along the way. Didn't mean to be a bother and appreciate your quick responses.

  12. #32
    Join Date
    Apr 2013
    Posts
    1899

    Re: Mach3 VFD control via modbus using brain file

    Quote Originally Posted by Dan911 View Post
    Laid up recovering do to heath reasons and bored to death...lol Just having some fun with this and possibly learning a few things along the way. Didn't mean to be a bother and appreciate your quick responses.
    Sorry about your health, hope nothing serious. Don't worry about bothering me, I like to use my brains... and it would be cool to find a way to this so I continue thinking about it, just don't have time right now to spend too much time on it for a few more days.

  13. #33
    Join Date
    Sep 2016
    Posts
    3

    Re: Mach3 VFD control via modbus using brain file

    Hi, I have a Bosch Rexroth EFC 5610 VFD with all the manuals. I couldn't see anywhere, which terminals you used on the actual VFD itself. Could tell me what terminals you used or direct me to the manual where I can find correct information on how to configure the VFD?


    I have recently replaced all the motion control gear on my router table and so far so good. I have fully calibrated motion and just configured it with an xbox360 controller.


    I really would like to have the ability to monitor and control my spindle settings within Mach3.
    .
    I am using the '2010 screenset' on Mach3 to control my machine and have used 'Screen4' in the past, to modify various screens in mach etc.


    I have a USB to RS485 dongle setup and showing up as 'COM4' on my windows 7 machine. My EFC5610 is already setup and controlling a 3ph 5.5kv max. 17,400RPM Perske spindle.


    I have been reading through your posts on the subject on various forums and I just wanted to ask your advise now as I'm just about to start? After all you did, what is the best way to go about setting this up from start to finish?


    Would it be helpful if you sent me copies of your Mach3 brain file and the Modbus configuration file with a workflow? I was thinking that I'd have many of the same parameters as you, between Mach and the Rexroth VFD.


    Tthanks!
    Darren

  14. #34
    Join Date
    Apr 2013
    Posts
    1899

    Re: Mach3 VFD control via modbus using brain file

    Quote Originally Posted by visedge View Post
    Hi, I have a Bosch Rexroth EFC 5610 VFD with all the manuals. I couldn't see anywhere, which terminals you used on the actual VFD itself. Could tell me what terminals you used or direct me to the manual where I can find correct information on how to configure the VFD?


    I have recently replaced all the motion control gear on my router table and so far so good. I have fully calibrated motion and just configured it with an xbox360 controller.


    I really would like to have the ability to monitor and control my spindle settings within Mach3.
    .
    I am using the '2010 screenset' on Mach3 to control my machine and have used 'Screen4' in the past, to modify various screens in mach etc.


    I have a USB to RS485 dongle setup and showing up as 'COM4' on my windows 7 machine. My EFC5610 is already setup and controlling a 3ph 5.5kv max. 17,400RPM Perske spindle.


    I have been reading through your posts on the subject on various forums and I just wanted to ask your advise now as I'm just about to start? After all you did, what is the best way to go about setting this up from start to finish?


    Would it be helpful if you sent me copies of your Mach3 brain file and the Modbus configuration file with a workflow? I was thinking that I'd have many of the same parameters as you, between Mach and the Rexroth VFD.


    Tthanks!
    Darren
    Hi,

    I missed your post, sorry about that. Anyway, my Mach3 is a mess since I no longer use it, so I'd have to figure out which Mach3 files to send you and which version of them, and this may take some time. However, if you take each step as I described here in this thread and my YouTube video, then you should be able to get it working, assuming the VFD is configured right and the RS485 connection is working. I remember initially I had some communication issues, but that was solved when I connected the shield, not just used two wires for the communication. Otherwise, no problems at all.

    I am still using the same VFD and spindle but went from Mach3 to UCCNC with UC300ETH. I have also stopped using the USB dongle I used and now running an Ethernet - RS485 converter.

  15. #35
    Join Date
    Sep 2016
    Posts
    3
    Thanks to your YouTube video and forum posts I now have the ability to control my VFD and spindle through Mach3. :-)

    The only thing that I have to do now is change the ' RPM DRO' To read and display the 'True RPM' Values.
    I know that I have to use a screen editor to change the 'RPM' somehow from no. 39 to '1002'. Thing is, I'm using 'Screen4' and 'MachScreen' and I cannot find a procedure to do this yet!

    Maybe someone on here can enlighten me?

    Thanks again.. ????

  16. #36
    Join Date
    Sep 2016
    Posts
    3
    I changed the True RPM DRO #39, to USERDRO 1002. However nothing shows on the RPM DRO. The displ6is just 00000.

    I have been reading through your posts again and your YouTube video. I think that I'm missing a macro file! You mentioned in one of your last posts that you had a simple macro file to handle the USERDRO 1002. You said that you would post it but I cannot find it, I guess you moved on to UCCNC and never got round to it.

    Can you confirm that I need the macro file before I can see the 'True RPM?

    Thanks,
    Darren

  17. #37
    Join Date
    Sep 2012
    Posts
    4

    Re: Mach3 VFD control via modbus using brain file

    Hallo can anyone help me to find my vfd holding registers for start stopp freq
    I am looking and nothing my vfd is chinese and this is the manual
    https://1drv.ms/b/s!AlWEvfzVs336oREF9zNq6qcxH5kF

    But nothing for adresses

Page 2 of 2 12

Similar Threads

  1. DELTA-E VFD MODBUS BRAIN - Help Needed
    By techie4971 in forum Mach Software (ArtSoft software)
    Replies: 1
    Last Post: 03-07-2017, 02:48 PM
  2. UCCNC and Mach3 Modbus MPG?
    By Signal9 in forum UCCNC Control Software
    Replies: 5
    Last Post: 09-19-2015, 07:42 PM
  3. Mach3+DZB200M + Modbus RS485 + brain
    By Ceyhun in forum Mach Software (ArtSoft software)
    Replies: 5
    Last Post: 10-30-2014, 12:42 PM
  4. Modbus TCP with Control Techniques SK Commander VFD for spindle control
    By fishin_fl in forum Mach Software (ArtSoft software)
    Replies: 0
    Last Post: 08-26-2013, 04:07 PM
  5. Which VFD for spindle control Mach3 via Modbus
    By silyavski in forum Phase Converters
    Replies: 28
    Last Post: 07-06-2011, 01:43 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •