Need Help! K2cnc spindle stopped for KG-4925 - Page 2


Page 2 of 13 FirstFirst 1234512 ... LastLast
Results 13 to 24 of 156

Thread: K2cnc spindle stopped for KG-4925

  1. #13
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1345
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,
    The four ribbon cables coming off the center of the breakout board go to the servo amplifiers these are the control signals for the servo drive. Looks like K2CNC designed a small breakout board that plugs directly into the drivers that converts the signals in the ribbon cable to the special connectors used on the servo drivers.

    The 24VDC supply appears to be mounted near the top of the cabinet. The black unit on the right with the RED LED, appears to be a bank on relays mounted on a DIN rail. The gray block below that is a terminal block on the DIN rail, and the main disconnect switch that goes out the cabinet is the orange/red block below the terminal block.

    Then of course your system has four servo drivers one for each axis motor.

    Russ

    Russ



  2. #14
    Registered
    Join Date
    Jul 2015
    Posts
    69
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    m_c,

    Thank you for your reply. I'm starting to get a better picture as to how to understand the Cprogram tab. So, flash "User Memory" is just used by K2? If I understand it correctly, most Dynomotion users only need to "compile/download" in Cprograms but K2 users need to also open the "Config/flash" tab and apply the "User Memory" flash button.

    I will play with it a bit after lunch but I wanted to send an updated post with the new results from testing.

    So, Russ, if the BIT 34 controls the VFD on/off I thought I could re-due the testing from the pins on the breakout board instead of the VFD. I also took some better details that I hope are readable. If not I will need to bring in a camera instead of using my phone.

    So here it is: J9 is the location on the K2 breakout board for the VFD control, it has 4 pins. I unplugged the wires from J9 and tested directly from the pins.
    Results: FWD/DCM pins read "OL" ohms when Bit 34 is not checked. FWD/DCM pins read "0.1" ohms when Bit 34 is checked.
    ACM/AUI pins read "0.067" no matter what I put in the the send line of K2MotionCNC. Does not change with different M3 S numbers.

    Robert



  3. #15
    Registered
    Join Date
    Jul 2015
    Posts
    69
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Russ, Looks like I had to use advance tab to send files.

    Attached Files Attached Files


  4. #16
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1345
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Rob,
    The pictures you zipped are much better.

    The J9 connector is the one of interest. You can test this with that cable removed and check the voltage between ACM and AUI, as that is the speed input to the VFD. When you specify a speed in KmotionCNC even with the VFD turned off you should see a voltage on the breakout board between these two pins. The PWM signal is sent into the U13 device (ODA2244P) which is a dual operation amplifier. The BLUE pot is part of the adjustment to ensure you can get a zero voltage out when the PWM signal is low enough. The part right next to this is labeled RB105-DE, which is a 24VDC relay that enables the VFD by shorting out the two pins FWD and DCM.

    For general interest here are the other parts on the board.

    LTV846, There are quad optoisolator chips, there are four of these chips on the board, they isolate the KFLOP board from dangerous voltages.
    26LS32, These are quad differential line receivers, typically used to interface with the servo encoder signals
    26LS31, These are quad differential line drivers
    LD33, is the 3.3 volt regulator chip on the board to provide power to the process and other chips on the breakout board.
    75176, This is a differential bus transceiver
    U6, I can't read the part number from the photo
    U18 is the processor for the breakout board but I could not read the number, but this is an AMTEL processor
    The black square device near the J9 connector is probably a DC/DC module but I could not see a number probably on the side of the chip

    The first think you want to do is determine if you can get a voltage out of that J9 connection on the pins highlighted when you try to do M3 S9000, M3 S6000, M3 S1000, etc.

    The higher the S number you should get a higher voltage between those two pins, it should range from 0 to 10VDC.

    Russ



  5. #17
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1345
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Rob,

    Video of what you want to test


    Sample Circuit of how PWM is converted to a voltage between 0 and 10V, this is not the exact circuit on your board, but give you an idea of what is happening.
    The idea is to see if you have any output, and if not do you have a PWM signal coming into the circuit, etc.

    K2cnc spindle stopped for KG-4925-99219-png

    Russ



  6. #18
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1345
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    Forgot to answer these questions.


    So, Russ, if the BIT 34 controls the VFD on/off I thought I could re-due the testing from the pins on the breakout board instead of the VFD. I also took some better details that I hope are readable. If not I will need to bring in a camera instead of using my phone.

    So here it is: J9 is the location on the K2 breakout board for the VFD control, it has 4 pins. I unplugged the wires from J9 and tested directly from the pins.
    Results: FWD/DCM pins read "OL" ohms when Bit 34 is not checked. FWD/DCM pins read "0.1" ohms when Bit 34 is checked.
    ACM/AUI pins read "0.067" no matter what I put in the the send line of K2MotionCNC. Does not change with different M3 S numbers.

    YES, if you measured close to zero ohms when the bit was activated that RELAY is working perfect. When it is not activated this should look like an open and the OL reading on your meter means it can't measure anything which is correct.

    The second test is our issue, You now need to determine if the PWM signal is leaving KFLOP and going into the K2CNC breakout card. Then if you have that signal we need to check the circuit that converts it to a voltage.

    Russ



  7. #19
    Registered
    Join Date
    Jul 2015
    Posts
    69
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Russ,

    I did check for voltage between the pins but it was very small and did not change when I changed the S number. Thanks for the additional information about the board and set up, I'm finding it very helpful.

    I still haven't had time to digest what Tom and m_c have said about the KFLOP program and flash/config. I will try to do that tomorrow.

    What I'm understanding is if I loaded and flashed all the programs correctly then there may be something wrong with the hardware side, KFLOP, relays, etc. But if I've loaded the programs, of if they are missing, incorrectly, then the C program to activate the spindle may just not be running when called.

    I had some students in today so I could not focus completely on the task.

    Robert



  8. #20
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1345
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Rob,

    The file listed below is the key to getting the voltage to come out of the KFLOP. In fact if you have compiled this and download it to KFLOP it should still work regardless if it was flashed. The difference is the programs run automatically if flashed upon power up.

    K2_SpindlePWM.c File


    #include "KMotionDef.h"

    #define MAX_RPM 18000.0f
    #define PWM_NUMBER 5 //0-7
    #define pdSpindleRPM 35

    //#define INVERT

    main()
    {
    int pwm;
    float speed = *(float *)&persist.UserData[pdSpindleRPM]; // value stored is actually a float

    pwm = speed/MAX_RPM * 255.0f;

    if (pwm > 255) pwm=255; // limit to max pwm value
    #ifndef INVERT
    pwm = 255 - pwm; // set the PWM
    #endif

    //pwm = 128;//165-175

    printf("Spindle Set to %f pwm %d\n",speed, pwm); // print the desired speed
    SetBitDirection(26+PWM_NUMBER,1); // Set bit PWM pin as an output
    FPGA(IO_PWMS+2*PWM_NUMBER+1) = 1; // enable the PWM
    FPGA(IO_PWMS+2*PWM_NUMBER) = pwm; // set the PWM
    }

    This file seems to imply that PWM sign comes out of 26 + 5 = 31. If you look at bit 31 that should be changing. Tom can probably explain exactly where you can look for this signal. They use two commands to the FPGA to enable the PWM output.

    Tom can you detail how this works in more detail?

    Russ



  9. #21
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    312
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Quote Originally Posted by Rob505 View Post
    m_c,

    Thank you for your reply. I'm starting to get a better picture as to how to understand the Cprogram tab. So, flash "User Memory" is just used by K2? If I understand it correctly, most Dynomotion users only need to "compile/download" in Cprograms but K2 users need to also open the "Config/flash" tab and apply the "User Memory" flash button.

    Flash User Memory can be used by anyone, but it's generally not recommended for 'normal' use.
    Another way to think of it, is rather than whatever software you're using compiling/downloading each C/user program as the software requires it i.e. like when using KMotionCNC and you hit the Init button, the relevant init.c file is compiled/downloaded and run in the KFlop, the C/user program is physically stored within the KFlop and can either be set to run immediately when the KFlop is powered up, or just stored ready to be run as soon as the controlling software requests it.

    Storing the programs within the KFlop does reduce data transfer between the PC and KFlop, but for normal use, it's not noticeable by the operator. The functionality was aimed more at users who wanted to embed the KFlop within machines that ran standalone (i.e. without being attached to a computer), such as a machine that does repetitive tasks where the actual programming/required motion never changes.



  10. #22
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    312
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Quote Originally Posted by CNCMAN172 View Post
    printf("Spindle Set to %f pwm %d\n",speed, pwm); // print the desired speed
    SetBitDirection(26+PWM_NUMBER,1); // Set bit PWM pin as an output
    FPGA(IO_PWMS+2*PWM_NUMBER+1) = 1; // enable the PWM
    FPGA(IO_PWMS+2*PWM_NUMBER) = pwm; // set the PWM
    }

    This file seems to imply that PWM sign comes out of 26 + 5 = 31. If you look at bit 31 that should be changing. Tom can probably explain exactly where you can look for this signal. They use two commands to the FPGA to enable the PWM output.

    Tom can you detail how this works in more detail?

    Russ
    KMotionDef.h has the basic explanation, although Robert probably wants to ignore this to avoid any further confusion, as it's not really something that normal users need to worry about.
    Code:
    // Digital I/O bit PWM control (4 I/O bits 16-19 may be pulsed)
    
    #define N_IO_PWMS 4				// Number of pwms that may be assigned to GPIO bits		
    #define IO_PWMS 0x20  			// FPGA offset to IO PWM registers (2 bytes each - value, enable(bit0))
    #define IO_PWMS_PRESCALE 0x2f  	// FPGA offset to IO PWM Pre-Scale clock divider 0-255, 0 = 16.6MHz, 1=8.33MHz, ...
    #define IO_PWM_MAX_VALUE 255    // 0 = 0%, 255 = 100 % duty cycle
    Code:
    SetBitDirection(26+PWM_NUMBER,1);  		// Set bit PWM pin as an output
    Does what it says. Sets bit 31 aka Aux1 pin 11 aka PWM 5 as an output.

    Code:
    FPGA(IO_PWMS+2*PWM_NUMBER+1) = 1;    // enable the PWM
    FPGA(IO_PWMS+2*PWM_NUMBER) = pwm; 	// set the PWM
    As per the KMotionDef comment, IO_PWMS contains the offset to the PWM registers, which have 2 bytes per PWM. So the first line enables the PWM5, and the second line sets the PWM5 value.
    I'm guessing there are default settings for the Pre-scaler and max values, given they're not included within the K2 code.

    A crude way to test the output, which may or may not work depending on the multimeter, is to measure the DC voltage from the PWM. As the PWM increases, the voltage shown on the multimeter should increase. The accuracy of this depends on how much the multimeter smooths the input when on VDC, but I'd imagine the default PWM frequency should be high enough to give a reasonable reading on most multimeters.



  11. #23
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1345
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Thanks M_C,

    Robert as he shared you can measure the voltage between ground and AUX1 - Pin 11. This should have a PWM signal coming out that pin and the pulse width should vary when you issue various M3 S3000, M3 S6000, M3 S10000, type commands. This will make a small voltage change, but a much better way to see this would be to put an oscilloscope on that pin, then you could watch the pulse width actually change. Because of how the board is pressed into the KFLOP with those three connectors you might need to trace where the signal from AUX1 - PIN-11 comes up to the K2CNC breakout board. I know it will head over to the parts identified earlier near the spindle connector but a quick check with an ohm meter can confirm a good spot to test from while running those experiments.

    Russ



  12. #24
    Registered
    Join Date
    Jul 2015
    Posts
    69
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Quote Originally Posted by m_c View Post
    Flash User Memory can be used by anyone, but it's generally not recommended for 'normal' use.
    Another way to think of it, is rather than whatever software you're using compiling/downloading each C/user program as the software requires it i.e. like when using KMotionCNC and you hit the Init button, the relevant init.c file is compiled/downloaded and run in the KFlop, the C/user program is physically stored within the KFlop and can either be set to run immediately when the KFlop is powered up, or just stored ready to be run as soon as the controlling software requests it.
    m-c,

    OK, so just so that I clear on this, what program files are being flashed into Flashed User Memory when you hit the button? Would it be everything compiled and downloaded from the Thread lines and into KFLOP? or just the Thread line(s) that are checked Launch on StartUp? or something else? I am still getting caught up on the rolls played by the "Init" button in KMotionCNC, C program Threads, and Flashed User Memory. It sounds like I could choose not to use the Flash User Memory option and use the "Init" button instead at start up. But then I would need to have that tab set up properly. The "Init" button does not seem to do anything.

    Some thing that I just seemed to notice.......Dynomotion's manual states:
    The integrated C compiler allows with a single pushbutton to save, compile, link, download, and execute all within a fraction of a second.
    This is the button with all the arrows pointing everywhere.
    This does not seem to work as I expect it to. I seem to have to use this button for each Thread individually.

    The good news is, when I compile all the Threads in this manner the "Home" function returns. I am beginning to feel that all my problems are related to figuring out exactly how to set up the Kmotion.exe, the KmotionCNC tool step up tab and which Threads should be downloaded and how to download them.

    Here are some questions that may help me better understand this system.
    1. Is what is flashed into User Memory and are the C programs Threads downloaded into the KFLOP the same thing?
    2.If I Flash New Version and re-flash the 4.32, will everything in the KFLOP's user memory be erased? Thus allowing me to load new Threads to the KFLOP.
    3.Is this the best way to erase Threads from the KFLOP? or should I use the Recovery button instead?
    4,When loading Threads does it matter which Thread number you use? I assume, yes.

    One last note, we have always seem to have some quirks in our system and I thought I would mention them just in case these things are related. When the machine moves an axis outside its limits, that axis stops working but the others continue. To engage the axis I have to cycle the KFLOP. Stopping the machine and restarting using the two green button doesn't work. Also, the Homing function stops working if the stop button (physical, computer screen or hot key) is used. I have just discovered that if I go back into Cprograms and re-compile the Homing thread, it works again. Also, we have a tool touch pad that we have never been able to operate but that is the least of my problems.

    One more step closer! and thank you all for your patience!
    Robert



Page 2 of 13 FirstFirst 1234512 ... LastLast

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

K2cnc spindle stopped for KG-4925

K2cnc spindle stopped for KG-4925