KFLOP SETUP, CHANNELS AND PINS - Page 3


Page 3 of 3 FirstFirst 123
Results 25 to 32 of 32

Thread: KFLOP SETUP, CHANNELS AND PINS

  1. #25
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    So the spindle just needs a switch to close, same thing with the air solenoid relay. I just need to know how to wire the pins to the fkop, find the code and implement it into the board.

    Thanks



  2. #26
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2287
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Hi T,

    You need to also know what voltage and current the switch needs to be able to switch. Most VFD's require to switch 10 or 24V at about 10ma. A solenoid usually requires more current.

    KFLOP only has 3.3V IO. If you only have KFLOP it wouldn't work without some interface. Our Konnect adds that type of IO. Or you might add a Solid state relay (that can be controlled with 3V). Or a FET Transistor that can be controlled with 3V. Or a 3rd party relay board such as:

    Relay Board: TTL Logic Level Inputs, 2 SPDT 15A Relays - Winford Engineering

    Regards

    TK
    http://dynomotion.com


  3. #27
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Right, So I already have the relays. I just need to know now to implement the code with the pins.



  4. #28
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2287
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Hi T,

    What are the specifications on the relays? Is it interfaced? To what pins?

    Regards

    TK
    http://dynomotion.com


  5. #29
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    I've chosen some arbitrary pins on J4, the general i/o pins to turn on the spindle, air and maybe a tool offsetter. I'm using s solid state relay able to swich at 3 volts.

    How do I pick which pins to use? How do I choose the program, and direct the program to which pins I've chosen?



  6. #30
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1219
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    toolbag33,
    look where you installed Kmotion and then look in the directory C programs. There are many examples of how you make a small C program to output or read a bit from a given port.


    Here is a little snipit of code on how I am reading i/o pins for the switches on my MPG. Look at the examples and you will learn a great deal.

    Russ



    // ADD THE MPG CHANNEL RIGHT HERE




    DefineCoordSystem(0,1,2,-1);

    EnableAxisDest(0,ch0->Position);

    Pos = chan[MPG_INPUT_AXIS].Position;

    for (;
    {
    NewPos = chan[MPG_INPUT_AXIS].Position;
    Change1 = NewPos - Pos;
    Pos = NewPos;

    if (ReadBit(16)) // if pressed ignore the encoder.
    Change1 = 0;
    else if (ReadBit(21)) // is X1 selected? FACTOR1
    Factor = 2;
    else if (ReadBit(22)) // is X10 selected? FACTOR20
    Factor = 20;
    else if (ReadBit(23)) // is X100 selected? FACTOR200
    Factor = 200;
    else
    Factor = 0.0;

    if (ReadBit(17)) // is x selected?
    Axis=0;
    else if (ReadBit(18)) // is y selected?
    Axis=1;
    else if (ReadBit(19)) // is z selected?
    Axis=2;
    else if (Readbit(20)) // is a selected?
    Axis=3;

    // check if the Axis just changed or we have been
    // converging to the target for a long time
    if (Axis != LastAxis ||
    (InMotion && Time_sec() > LastChangeTime+FINAL_TIME))
    {
    if (InMotion)
    Move(LastAxis,Target); //finalize any motion

    LastAxis = Axis;
    InMotion = FALSE;
    }



  7. #31
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2287
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Hi T,

    The first step is to wire up your 3V Relays to KFLOP JP4. 8 of the IO on JP4 have 150ohm pull down resistors. The last 2 do not. You may want to use those as they can source more current (16ma).

    After that you can test your hardware by using the KMotion.exe Digital IO Screen to see if it works.

    Regards

    TK
    http://dynomotion.com


  8. #32
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    249
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    As Tom has said, once things are wired up, you can test they're working by flipping the relevant bits in KMotion.

    Once you're happy things are working, for basic on/off functionality you just need to assign the relevant port/pin to the function within Mach. To work out the port/pin for use in Mach, check out section 6 on this page - Mach3 Plugin + KMotion

    If you want to implement a tool setter/touch probe, you do need to use some C code.
    Rather than use the basic NotifyMach3.c, look at the NotifyProbeMach3.c, which contains some extra code to handle probing.
    The only thing you need to alter in that file (other than the Axis constants listed at the top*), is the bit number for the probe -
    #define PROBE_BIT 0
    Change the 0 to whatever bit you have the probe connected to, and you may also need to change the PROBE_ACTIVE_STATE depending on what way the bit changes when the probe is activated.


    *The basic file assumes X is channel 0, Y is 1, and Z is 2. If that's what you're using in your init.c file I.e, DefineCoordMotion(0,1,2,-1), then you don't need to change them.



Page 3 of 3 FirstFirst 123

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

KFLOP SETUP, CHANNELS AND PINS
KFLOP SETUP, CHANNELS AND PINS