Inverter speed control over KCP.

  • Hi all,
    I'm taking the next step to speed control via KCP. I have the hardware, such as Wago device net 750-346, power module 750-602, all wired up and this was used previously on KRC1 (before it blown up) worked perfectly, now I want to connect this hardware to KRC2 which need to send analog 0~10/v from KCP to the Wago hardware then to Inverter for speed control.
    The cable goes from here:


    to the Wago Device net:


    Would anyone guide me how to set this up in KRC2?


    thanks,

  • Place your Ad here!
  • if you want to use analog signal to control the robot speed, you need Wago analog input card.


    your images (although blurry) show that switches 1,3 and 8 are on Wago bus coupler.
    this means the coupler is configured as device node 5 communicating at 500kbps.


    therefore in C:\KRC\ROBOTER\INIT\DEVNET.INI you need


    Code
    [krc]
    debug=0
    baudrate=500
    
    
    [1]
    macid=5


    and in C:\KRC\ROBOTER\INIT\IOSYS.INI you need to enable MFC DeviceNet driver by removing semicolon in front of DEVNET=2,dnInit,dn2drv.o



    then scroll down and under
    [DEVNET]


    enter something like this (assuming it is a 4ch. analog input card):

    Code
    [DEVNET]
    ANIN1=5,0,16,2,cal32767
    ANIN2=5,2,16,2,cal32767
    ANIN3=5,4,16,2,cal32767
    ANIN4=5,6,16,2,cal32767



    then in SPS.SUB inside LOOP/ENDLOOP map scaled analog input to $OV_PRO, something like
    $OV_PRO=100*ANIN1


    of course, first thing is to get Wago wired up correctly and powered up.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

    Edited once, last by panic mode ().


  • Thanks for the info.
    Here are some more detailed photos of Wago module:

    Never done this before, need to ask a newbie question:
    For "C:\KRC\ROBOTER\INIT\DEVNET.INI ", do I exit KSS 1st then go to C:\KRC\Roboter in windows or can it be done inside KSS?

  • Just keep in mind, when you make a change to one of the I/O system .INI files, it has no effect until you either cold-boot the robot, or perform an I/O re-initialization (under the Config menu), which basically reboots the I/O subsystem without taking the time to reboot the whole robot.


    Also, for DeviceNet, there's a couple of things to keep in mind:
    the DevNet.INI file contains the mapping for all the Slave modules connected to the robot, including their addresses (MAC IDs) and the number of input/output bytes produced/consumed by each Slave address.


    The file IOSYS.INI manages all of the KRC2 FieldBus systems, and how they map to the robot's fixed internal I/O table of $IN and $OUT signals and also the $ANOUT and $ANIN analogs. If you use the $ANxx signals instead of using integer math, IOSYS.INI is also where the scaling and configuration of these analog signals is carried out. Most versions of IOSYS.INI include extensive comments that are probably even better for explaining how to use the file than the manual is.


    An analog I/O device will consist of one or more bytes that represent a binary "word" which scales to the analog side of the device. So, for example, if you have a 12-bit analog output card whose analog output scales from 0 to +10V, with no negative voltage, setting those 12 bits to an integer value of 4095 will result in a 10V output, 2046 will result in a 5V output, and 4 would result in an output of about 1mV

  • actually I made mistake, I replied without reading the question (sorry, it was late...)
    what I described was using analog input to control robot speed.
    what you ask is how to use robot to control speed of a VFD.
    this means you would want Wago analog output so instead of ANIN, it will be ANOUT
    and you have to send value to ANOUT1 for example.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • I have a video clip of the Spindle running at 800hz, 24000rpm, is a HSD ES 919 controlled via KRC1 sending analog 0~10VDC to the Inverter speed controller, the speed is divided in to 10 parts where 1v = 2400, 2V=4800...so on and 10 v=24000rpm. This method is to control the spindle speed manually, it got me thinking, what if I wanted to the spindle to run at speed according to the speed set in the gcode?



    In this case S3000 (spindle speed = 3000rpm)

  • I had the exact control setup on my vfd with krc2. What did was write the "spindle on" subroutine with input args, one for speed, one for direction(some tools spin the other way, you know :winking_face: ).


    So in KRL, spindleOn(3000, 1)


    I don't have this sub handy, but it just set the ANOUT voltage and the right combination of DIGOUT to run(I think there are several common methods, one being a wire to make it run and another to set direction via high or low)


    At the time I didn't know how to use an ENUM, so I would change that 1 to #CW or something if I did it again.

  • Given those numbers, you could simply use $ANOUT[x] = DesiredRPM*(10/24000). You just need to extract the DesiredRPM value from the GCode, and pass it to a subroutine on the fly, as Wes mentions. Probably using a Trigger command for synchronization. You might have to watch out a bit for how fast the spindle can respond to new speed commands, but aside from that it should be fairly straightforward.


  • You might have to watch out a bit for how fast the spindle can respond to new speed commands, but aside from that it should be fairly straightforward.


    When you said "new speed" do you mean when, eg. from 1200rpm then switch to 2500rpm, there would be a slight delay?

  • a small jump with a small tool will be pretty quick; slowing down is another story unless you have a breaking resistor installed(you should do this, but I admit I never did). I will say though, I do a lot of cnc programming(on VMCs and routers), and its not like the speeds change constantly in milling....usually only after changing the tool, and a short wait command will take care of the vfd lag. I am not saying you couldn't have a reason to change speeds while using the same tool, but its not all that common, unless you are doing very high production metal machining(for example sfm for slotting would be different than side milling with the same tool).

  • When you said "new speed" do you mean when, eg. from 1200rpm then switch to 2500rpm, there would be a slight delay?


    Some spindles may have issues with attempting to change speed too quickly -- I've seen a few where the analog voltage had to be ramped rapidly, rather than simply "stepped" between values. Trying to (for example) double the speed in a single command (changing from 3.5V to 7V, for example) would cause the spindle to jump/jerk suddenly for a brief time, and in some cases even spun backwards briefly.
    Also, the cutter tools in the spindle will have inertia of their own, which you may have to take into account.


  • a small jump with a small tool will be pretty quick; slowing down is another story unless you have a breaking resistor installed(you should do this, but I admit I never did). I will say though, I do a lot of cnc programming(on VMCs and routers), and its not like the speeds change constantly in milling....usually only after changing the tool, and a short wait command will take care of the vfd lag. I am not saying you couldn't have a reason to change speeds while using the same tool, but its not all that common, unless you are doing very high production metal machining(for example sfm for slotting would be different than side milling with the same tool).


    Yes I have braking resistor.
    You are right about the speed change after tool change. I will be using probably 3 tools, 50mm face plate for facing, 20mm bit and 10mm bit, since Tool change is mentioned it will be the last request for my robot milling project after the vfd speed control.

  • Some spindles may have issues with attempting to change speed too quickly -- I've seen a few where the analog voltage had to be ramped rapidly, rather than simply "stepped" between values. Trying to (for example) double the speed in a single command (changing from 3.5V to 7V, for example) would cause the spindle to jump/jerk suddenly for a brief time, and in some cases even spun backwards briefly.
    Also, the cutter tools in the spindle will have inertia of their own, which you may have to take into account.


    The Hsd Es919 mentioned earlier I'm quite happy with it, it operated smoothly when changing speed even from 1v straight to 10v, depends on the sec set in vfd, it accelerates within 5~10 sec from 2400 to 24000 rpm and of course ramping is necessary the sound of the spindle is like supersonic... I'll show you the video as soon as I find it.

  • That's a good spindle. I had one once where "stepping" the voltage from 1V to 5V could actually damage the drive unit, even with no load on the spindle tool. So I had to create an SPS task that would increase the ANOUT voltage by 0.1V every 100ms until the target voltage was reached.

  • OK guys, since I'm still waiting for my post for my X6 RM, I'll continue this topic and hopefully I can complete it sometime soon.
    I'm going to do a step by step on connecting the spindle to KRC2:


    HSD Es919 spindle


    VFD controller cabinet


    KRC2 X801


    Above are the hardware connections, now the software side:
    I need to go to C:\KRC\ROBOTER\INIT\DEVNET.INI


    open "DEVNET.INI":


    Panic Modedescribed:
    "C:\KRC\ROBOTER\INIT\IOSYS.INI you need to enable MFC DeviceNet driver by removing semicolon in front of DEVNET=2,dnInit,dn2drv.o"



    I removed the semicolon then scroll down to Devnet and enter :


    ANOUT1=5,0,16,2,cal32767
    ANOUT2=5,2,16,2,cal32767
    ANOUT3=5,4,16,2,cal32767
    ANOUT4=5,6,16,2,cal32767


    under DEVNET


    Panic Mode described:


    "then in SPS.SUB inside LOOP/ENDLOOP map scaled analog input to $OV_PRO, something like
    $OV_PRO=100*ANIN1
    "


    where is SPS.SUB inside LOOP/ENDLOOP? is it still under C:\KRC\ROBOTER\INIT\IOSYS.INI?


    thanks,

  • I probably need some overview on setting up a spindle control in KRC2, I know the vfd controller works b/c I had seen it working with KRC1 before, the setup wasn't done by me.
    I remember there was a gripper icon activated on the left hand side of the KCP screen then a number of,. let say 1, 2, 5 or 10v is entered to run the spindle, this was in KRC1 but this controller is no longer alive.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners