Page 1 of 2 12 LastLast
Results 1 to 12 of 22

Thread: MODBUS control of VFD

  1. #1
    Registered ninefinger's Avatar
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    357
    Downloads
    0
    Uploads
    0

    MODBUS control of VFD

    I'm trying to get control of my GE -Fuji Electric VFD model AF300-E11. It will talk (and listen to) MODBUS so I figured I'd give it a shot at using the MODBUS in EMC2 to control it (versus a 0-10V analog output card and fwd/rev relay)

    1st - has anybody done this for this series of VFD?

    2nd - rather than starting from scratch I'm going to "try" and work from prior examples such as:

    gs2_vfd

    OR

    does somebody have a classic ladder clp file they can share for any MODBUS control that I can look at as an example - I've looked but not found one?

    3rd - this will be strictly an EMC2 effort as I have checked out communications so I know that works...(unlike some cheap VFD's I've been reading about on other threads)

    Unfortunately my programming skills are rather weak - though I do know a bit about MODBUS as I've had to fight through it for work purposes.

    I'll use this thread to publish any positive results I get for the benefit of others with this series of drive (got mine from here Variable Frequency Drive, AC Motor Drives, Pool Pump Motors, Marathon Electric 3 Phase Motor, Teco Westinghouse Distributor

    BTW my initial objective is to have the following controls:
    Spindle stop, on-fwd or on-rev, spindle speed,
    and to read the following:
    Spindle speed
    (pretty basic list...)

    Mike


  2. #2
    Registered
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    487
    Downloads
    0
    Uploads
    0
    I assume you are using serial modbus?
    here is the basic idea:
    EMC Documentation Wiki: ClassicLadder Ver 7.124
    What version of EMC are you using?
    Its been a while since I used modbus with CL but some are using it.
    Running EMC / CL in a terminal will give much more info while debugging modbus
    Chris M


  3. #3
    Registered ninefinger's Avatar
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    357
    Downloads
    0
    Uploads
    0
    Thanks Chris,

    Yes to be clear I'm using the Serial Modbus (RTU).
    EMC2 is up to date (v 2.4.5 on Ubuntu 10.04)

    ****EDIT - udpate manager was running - its now 2.4.6 if that makes any difference) - ***

    I've had a look at the wiki - unfortunately I'm such a newbie at this it isn't much help - I really need a "worked" example to play with and break to get the hang of it (classic ladder that is) ie somebody has made the connections in classic ladder to their VFD via Modbus.. From there I can usually find my way to rework it for my application (ie my vfd's function codes, registers etc)

    The other option is to hack somebody else's work such as the gs2_vfd.c that is referenced in the manual. Looks like that is the way I may end up going (though I still would like to learn the classic ladder interface)

    Cheers,

    Mike
    Last edited by ninefinger; 11-29-2010 at 09:32 PM. Reason: added info


  4. #4
    Registered
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    487
    Downloads
    0
    Uploads
    0
    modbus configs are so specialized for each vfd.
    I will look to see if I can find my modbus example for a yaskawa vfd.
    do you have pdf docs for your vfd?
    CL does take a bit to get used to.


  • #5
    Registered ninefinger's Avatar
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    357
    Downloads
    0
    Uploads
    0
    I do have the pdf for the drive, but not on this machine ( it did take a whole bunch of searching to find it so I hope its still on my other machine). I'll post it here when I go upstairs.

    If you do have an example I would really appreciate it - I'm a bit slow on the programming stuff but I usually get from point a to point b eventually...

    Thanks,

    Mike


  • #6
    Registered ninefinger's Avatar
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    357
    Downloads
    0
    Uploads
    0

    pdf of the manual is in a zip over here...

    I don't have the manual on my machine but thank goodness I posted it to the zone for safe keeping! (albeit in a place that wasn't where I thought it would be...)

    ZAY7045FG/1 with Power Down Feed

    Mike


  • #7
    Registered
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    487
    Downloads
    0
    Uploads
    0
    It's not clear to me from docs if 8n1 (8 bit data,no parity,1 stop bit ) serial signals are supported.
    currently CL only supports this.
    Have you connected to this inverter with modbus before?
    Can you check the settings of :
    H31 slave number
    H34 baud rate
    H35 data bits
    H36 parity
    H37 stop bits.

    Boy are the docs written poorly for modbus!


  • #8
    Registered ninefinger's Avatar
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    357
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by chester88 View Post
    It's not clear to me from docs if 8n1 (8 bit data,no parity,1 stop bit ) serial signals are supported.
    currently CL only supports this.
    Have you connected to this inverter with modbus before?
    Can you check the settings of :
    H31 slave number
    H34 baud rate
    H35 data bits
    H36 parity
    H37 stop bits.

    Boy are the docs written poorly for modbus!
    Hi Chris,

    Boy, I wasn't expecting you to wade through that manual - been there done that! I did connect up briefly with my laptop and a terminal program. I sent the example of an invalid message and got the proper error response message so I left it at that. (page 12-9 of the users guide..) I do have a GE program for configuring the drive via the RS485 so I can use that to prove the communications - but its on my laptop at work (the laptop is a windows machine)

    I just tried a terminal program (moserial) on the linux machine - and I get the same as before:

    send: 01 03 03 31 00 14 14 4E (request 20 bytes of data)
    receive: 01 83 02 C0 F1 (error response)

    Here are the configuration data as it stands now -

    H31 = 1 = slave 1
    H34 = 1 = 9600 baud
    H35 = 0 = 8 data bits
    H36 = 0 = no parity
    H37 = 0 = 2 stop bits

    8n1 is supported I believe - I will test it now by reconfiguring the drive.

    If you have your yaskawa VFD example please post it so I can have a look - it might be the piece that lets my brain put together all the pieces

    Thanks for your help with this!

    Mike


  • #9
    Registered ninefinger's Avatar
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    357
    Downloads
    0
    Uploads
    0

    8 N 1 not supported..

    Chris

    Turns out you can't set 8n1 - the drive automatically sets the stop bits depending on the parity - no parity is 2 stop bits, even or odd parity is 1 stop bit.

    Does this mean the whole idea of using Classic Ladder is dead in the water?

    If so I'll try the other method - hacking up the gs2_vfd.c file I copied from somewhere...

    Mike


  • #10
    Registered
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    487
    Downloads
    0
    Uploads
    0
    I check the source code and it is possible to set different values for data, stop bit, and parity. It just hasn't been tested or documented.
    i haven't found my USB drive with the modbus ladder tests on it yet.
    I may just build a little one to suit testing for you to try.
    next thing you need to find out is Linux's serial port address. Are you using a serial port or a usb serial converter?
    Where in Canada are you?

    Chris M


  • #11
    Registered ninefinger's Avatar
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    357
    Downloads
    0
    Uploads
    0
    The serial port is /dev/ttyS0

    It works throught the moserial program I downloaded moserial - GNOME Live!

    I just haven't tried to actually control it yet as that requires figuring out the CRC to go with the command sent - I'll bring my laptop home tonight as it has my little tool for doing the Modbus stuff (crc calculator) as well as a GE program for configuring the drive via the RS485.

    BTW I'm in Ottawa


  • #12
    Registered ninefinger's Avatar
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    357
    Downloads
    0
    Uploads
    0
    I was controlling the VFD through the GE configurator software on my laptop last night.

    At the same time I was snooping on the serial port and recording a log file for future refference of the commmands that were being sent.

    Unfortunately the GE software does a lot of monitoring of the drive and is reading continuously so picking out the write commands is a bit tedious. If I get a chance I'll post up some of the commands it sent cause they don't make a lot of sense to me (though I was doing this at midnight so maybe that was the problem).

    From memory an example command started as:

    01 30 31 06 53 .......

    I get the 01 - address 01 but then 30? I can't find anything like this in the manual for a function code?
    31 - lost me here too
    06 53 - From the manual S06 is operation command so 53h = S in Ascii
    Note - i may be reveresing the 06 53 as this is from memory... I'll correct it when I can confirm what I recorded - too many pc's!!!)

    Went back and I can't view the log I recorded as its and unknown format to windows and I need some sort of program to read the log file

    I might get to this tomorrow and do it all live with multiple pc's to try and get as much as I can written down..

    Mike
    Last edited by ninefinger; 12-04-2010 at 09:34 AM. Reason: added info


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Modbus to run GS-2 drive?
      By mecheng10 in forum Mach Mill
      Replies: 14
      Last Post: 06-17-2012, 02:01 PM
    2. USB Modbus I/O Using PIC
      By rdhopkins in forum PIC Programing / Design
      Replies: 7
      Last Post: 05-02-2012, 08:23 PM
    3. Mach3 with Hitachi VFD using Modbus
      By swinn in forum Mach Software (ArtSoft software)
      Replies: 2
      Last Post: 11-28-2008, 01:44 PM
    4. EMC2/Modbus......HELP!
      By pauldkeeton in forum LinuxCNC (formerly EMC2)
      Replies: 5
      Last Post: 02-18-2007, 05:47 PM
    5. modbus device
      By Drew in forum Machines running Mach Software
      Replies: 14
      Last Post: 02-11-2007, 02:59 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.