586,966 active members*
1,966 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > KFLOP to Spindle VFD Controller (cnc4pc C6 board) struggles
Results 1 to 20 of 26

Threaded View

  1. #20
    Join Date
    May 2006
    Posts
    4047

    Re: KFLOP to Spindle VFD Controller (cnc4pc C6 board) struggles

    Hi David,

    Yes if you add 2 sensors placed 90 degrees apart on a disk that triggers the sensors for 1/2 of a rev then the AB signals could be connected to a hardware encoder input and it should behave exactly like an encoder with 4 counts/rev.

    With just a single pulse you would need to count the transitions in software. Below and attached is an example program. The "pulse" must always be at least 180us long at your highest RPM (probably not an issue). You will need to determine the COUNTS_PER_REV2 value such that the measured speed matches the commanded Jog Speed.

    Regards




    Code:
    #include "KMotionDef.h"
    
    main()
    {
        for(;;)
        {
            WaitNextTimeSlice();
            ServiceSpindleCount();
        }
    }
    
    
    
    #define SPINDLE_PULSE_BIT 46
    #define SPINDLE_AXIS 5
    #define COUNTS_PER_REV2 1000
    
    void ServiceSpindleCount(void)
    {
        static int LastState=0;
        int NewState;
        
        NewState=ReadBit(SPINDLE_PULSE_BIT);
        
        if (NewState != LastState)
        {
            chan[SPINDLE_AXIS].Position+=COUNTS_PER_REV2;
    	LastState=NewState;
        }
    }
    Attached Files Attached Files
    TK
    http://dynomotion.com

Similar Threads

  1. Controller board with Spindle control
    By Lasr Da Vinci in forum CNC Machine Related Electronics
    Replies: 10
    Last Post: 10-14-2012, 11:42 PM
  2. CNC4PC C1 Board
    By BTS in forum CNC Machine Related Electronics
    Replies: 3
    Last Post: 06-07-2011, 09:22 PM
  3. CNC4PC C6 Spindle board problems and others
    By maxboostbusa in forum Benchtop Machines
    Replies: 4
    Last Post: 06-01-2011, 11:48 PM
  4. Help w/ C10, Rev7 Cnc4pc Board
    By awilcox in forum Controller Cards
    Replies: 0
    Last Post: 06-26-2010, 03:33 PM
  5. Replies: 2
    Last Post: 01-24-2008, 11:33 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
  •