Need Help! K2cnc spindle stopped for KG-4925


Page 1 of 8 1234 ... LastLast
Results 1 to 20 of 158

Thread: K2cnc spindle stopped for KG-4925

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

    Default K2cnc spindle stopped for KG-4925

    Hello CNCzone,

    I started a thread on another forum and Russ "cncman172" mentioned that a lot of very knowledgeable people are using this one as well. So, I decided to move my questions to this one. So as not to be too confusing, I copied and pasted the start of the thread from the other forum and changed the font color to green. Please see below. Russ mentioned that some pics of my machine set up may be helpful as well as copies of my files. So, I will see if I can attach the zip files.

    If you read below, you will understand that I am not familiar with cnc's and this is my first attempt to run one. I am trying to make this cnc available to our students. Mostly Industrial Design students will be using it and they are currently using Fusion 360. But before we can even start to learn how to produce the files and save as g-code, I need to make this machine functional. So, far I've learned that K2CNC decided to use Dynomotion's KFLOP in a different way than most people. The best that I can understand is that they flash their startup programs on to the KFLOP instead of using the "Initi" button. This causes problems for "nebies" like me. After, and if, I can ever get this cnc up and running again, I wonder if this problem could be rectified by moving the K2CNC flashed programs to the "Initi" button. But first things first, any help with understanding what went wrong and getting the spindle and homing back into service would be appriciated.

    Thanks,
    Robert



    Hello,


    I’ve just been put in charge of figuring out how to run our cnc for our students. I’ve never run a cnc before but before I can even start to play around with it, it seems to have some issues that I’m hoping someone can help me with. It could just be me! And not the machine. I’m a newbie to all this so sorry and thank you in advance. K2CNC seems to have stopped their business and I have not had any luck contacting them. This piece of equipment did not come with any sort of manual except for what Dynomotion posts online for their KFLOP microcontroller.

    I was running Firmware version 4.31s one week and the next the spindle would not turn back on. The second week the “home” button started to send the xyz axis in the opposite direction of the limit switches. The control pad, however, still moved the xyz in the correct direction. I read that the simulation program could stop the spindle from operating properly. I was using it a lot as I tried to figure things out and not crash the machine! The new Firmware 4.32 was meant to fix this issue. So, I set out to load the new Firmware. I read the DynoMotion manual for how to “flash” new firmware and I found a thread describing what to do in this forum. I thought I understood but I think I must have missed something. If someone knows about K2CNC’s and how DynoMotion works with it, I would be grateful for your input. I’m thinking this is a software/firmware issue and not a hardware issue but I would not be a good judge for this.
    Issues:
    1. The spindle stopped working.
    2. The “Home” button started homing backwards and now, after new firmware, doesn’t work at all.
    What I’ve tried:
    A. Tested for continuity in the emergency stop button and big and small green start buttons. Good!
    B. Run test program “chips” (found in software). Seems to run where it should but I could not get spindle to turn on.
    C. Installed new Firmware 4.32 and this is how I did it.
    1. Saved all files to thumbdrive just in case!
    2. Downloaded Firmware 4.32 from DynoMotion to host computer.
    3. Flashed new Firmware to KFLOP board.
    4. I checked the “Initialize Program” (K2mc_driver.c) and it was listed but had no .c program in the file. 0 bytes
    5. I pasted and copied the old “initialized Program” from the thumbdrive and pasted into the KFLOP Driver folder. “Copy and Replace” This is the only file I've copy/replaced.

    6. Compiled/Downloaded K2mc_driver.c file to Thread 7 in Kmotion.exe (no errors)
    7. Flash/config. “User Memory” w/start Thread #7 box checked @ start up.
    8. Disconnected host computer.
    9. Cycled KFlOP board by turning power to box off/on
    10. Reconnected host computer.
    11. Reset target short cuts to new firmware files.
    12. Restarted computer.
    Results: “Home” user button still not working. Still no spindle rotation. XYZ and A axis’ all work and sample “Chips” program runs. NO spindle. Headache!

    For some reason threads #6 and #7 are the same now and before there were only six threads loaded.
    Here are the .c program threads listed in the C program screen of KMotion.exe
    #1 bitJog_slimit.c (location KFOP>Driver>)
    #2 InitStepDir3Axis.c (location KMotion 432>C Programs>)
    #3 StopCallBack.c (location KFOP>Driver>)
    #4 SetStepPulseLength.c (location KMotion 432>C Programs>)
    #5 homing_zyx.c (location KFOP>Driver>)
    #6 k2mc*_driver.c (location KFOP>Driver>)
    #7 k2mc_driver.c (location KFOP>Driver>)

    This is exactly what it looked like before I loaded the new firmware except that Thread #7 was blank instead of a copy of #6 and location was KMotion 431s where they are now KMotion 432 the new firmware.

    Specs: I am learning to us KMotionCNC (we do not have Mach3)
    Model: K2CNC KG4925
    3-axis plus rotary 4th axis
    4x Delta AC servo motors with Delta AC encoders 3p

    Delta VFD-B spindle driver 3ph w/ HSD 3ph spindle.
    Dynomotion KFLOP Rev 1.2 motion control board
    K2CNC breakout board, Rev. 1.0 6axis capable
    Windows 7
    Firmware: 432 (recently updated from 4.31s as of Monday)

    Software: K2CNC version 2.0.4

    Questions:
    When do I use the “Initiate” button in KMotionCNC? And do I have to?
    Do I need to use the “Save, Compile,Download,Run” button in the KMotion.exe C program screen?
    Should I delete one of the K2mc_driver.c files from the Threads and if “yes” which one?
    Did I need to clear all of the "Thread" files before downloading the K2mc_driver.c file?
    Is Mach3 easier to use? why?


    Thanks again for any thoughts or help.
    Robert


    Robert,

    When you flashed the KFLOP with new firmware you stepped on the C program that was flashed into the KFLOP, that should run on startup. If you check one of my previous posts on one of these machines you can find the actual C programs loaded for the K2CNC as it used an ELTE spindle and Imaginer posted all the original C programs. Check each thread and make sure you have all the programs loaded. TK from Kmotion team actual provided instructions on how to flash the startup program again. When you load new versions of Kmotion firmware for K2CNC machines you need to backup everything before you start. The Kmotion team does not recommend you flash programs into the KFLOP however, K2CNC indeed did use this method. Read that post and I am pretty sure you can get back to where you started.

    Russ Larson


    Robert,


    Sorry, Yes I posted this on cnczone, and I am cncman172. LOL


    The first step is to look in the directory where you have Kmotion installed and list out all the C programs you have in that directory.

    Reading your description you K2CNC machine controller using KFLOP will be slightly different and we will probably need photos of the board close up to determine how to proceed. The system Imaginer had used the Proprietary K2CNC servo driver and it sounded like you are using Delta VFD, Delta Servo motors and perhaps you are using the K2CNC breakout board with their servo drivers.


    You will find the original files found on Imaginer's machine on CNCzone you looked the right place but you need to be a member to see the files that you can download. That is probably why you did not see the ZIP file that contained all of his programs. In fact he zipped the entire directory so I could examine everything to help determine why his spindle did not work.

    For homing to work you must have a Homing C program, which appears to be in Thread #5 but that must have been compiled and downloaded into the KFLOP. You need to get each thread to look exactly like it did before you did the upgrade. You also need to make sure the InitStepDir3Axis.c is downloaded and flashed into the KFLOP if I recall correctly.

    The Spindle you are using is pretty standard, normally you have to press in the init button on the controller box for about one second which enables the drives, then you would normally home the machine. Most people also have to press the init program button to initialize things, in the case of K2CNC they were doing that automatically by flashing the program for startup. You might want to press the init button and see if you can get the spindle to start. Since you are able to move the machine around clearly some initialization has taken place. See what you can find for files and put some pictures up, Lots of traffic on CNCzone, so you might want to join since it is free and lots of experts on that forum. TK is also an outstand support person from Dynomotion who knows absolutely everything about the KFLOP and all their other products. He is a great guy to work with and is extremely sharp.


    Russ



    Similar Threads:
    Attached Files Attached Files


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

    Default Re: K2cnc spindle stopped for KG-4925

    Hi Robert,

    From K2CNC's comment in:

    \KFLOP rob505\KFLOP\Driver\k2mc_driver.c

    It seems they are expecting this arrangement of User Programs being Flashed in KFLOP.

    //----------------------------------------------------------------
    // KFLOP Initialize program
    // K2CNC - Copyright 2013
    // Version: 2.0.4
    //
    // - K2mc_driver.c -> Thread 6
    // - homing.c -> Thread 5
    // - toolchange.c -> Thread 4
    // - bitJog_sLimit.c -> Thread 1

    Have you tried that?

    You should realize that the programs loaded and shown in the KMotion.exe Threads are not necessarily the Programs actually downloaded or Flashed into KFLOP.

    Regards

    Regards
    TK http://dynomotion.com


  3. #3
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    OK, here are a few basics so you can better understand how to troubleshoot your machine.

    The three phase spindle is driven by the Delta VFD. The VFD can be programmed to operate in many ways, but in your case it has been programmed to operate remotely in the following fashion.

    The spindle speed is controlled by a DC voltage applied between pins AUI, and AUM inside the VFD. This voltage is 10VDC at full speed, 5VDC at half speed, and 0VDC at no speed.
    The second aspect is you have to tell the spindle to spin forward and this is accomplished by shorting the FWD pin to the DCM pin inside the VFD.

    Both of these tasks are controlled by the K2CNC breakout board which is connected to the KFLOP.

    You can test to ensure that the controller is cable of issuing these commands with a few simple tests.

    1) start up Kmotion.exe, not KmotionCNC. Now look at the digital outputs page, and if you toggle BIT 34 you should hear a click of a relay. You can also take an ohm meter and measure between FWD and DCM and it should measure near zero ohms when the BIT 34 is active. This should work regardless if you have the right programs flashed. We are just confirming the controller is able to close the relay. Again, this is what tells the VFD to start spinning the spindle foward, it does not tell it what speed to spin at, that is done with the other inputs. When you are measuring this please be VERY CAREFUL as there is high voltage inside the VFD.

    2) If the previous operation worked, now you can check to see if the controller is capable of generating a DC voltage to select the speed. This controller is actually using a Pulse Width Modulated signal to generate the voltage, meaning the faster the pulse rate the higher the voltage, there are other methods, but you really don't need to understand all the technical details. Now go ahead and start up KmotionCNC, once it is up and you are capable of moving the axis around that lets you know the unit is initialized. The program that is controlling the speed element is K2_SpindlePWM.c, which is linked to the "S" command.

    Here is how you will test this aspect.
    On the command line inside of KmotionCNC issue the command M3 S8000
    This command tells the spindle to turn on moving clockwise and spin at 8000 RPM.
    If nothing happens you need to check the DC voltage that is across pins AUI and AUM, again that should be voltage between 0VDC and 10VDC. The higher the S value the higher the voltage.

    I checked the compile dates for K2_SpindlePWM.o, which shows it was compiled on 7/15. If that was downloaded into KFLOP this should work.

    Again, we are attempting to prove the machine can work when configured correctly. As Tom Kerekes indicated the machine expected four threads to be flashed.

    One step at a time...

    Russ



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

    Default Re: K2cnc spindle stopped for KG-4925

    Hi Tom,

    How would I try that arrangement? I don't know how to clear the thread lines to try something else.

    My Cprogram screen looks like this:
    #1 bitJog_slimit.c (location KFLOP>Driver>)
    #2 InitStepDir3Axis.c (location KMotion 432>C Programs>)
    #3 StopCallBack.c (location KFLOP>Driver>)
    #4 SetStepPulseLength.c (location KMotion 432>C Programs>)
    #5 homing_zyx.c (location KFLOP>Driver>)
    #6 k2mc*_driver.c (location KFLOP>Driver>)
    #7 k2mc_driver.c (location KFLOP>Driver>)

    When you hit the "compile" and then "download" buttons will this compile all the threads? or do you also have to hit the "save, compile, download, run" multi-arrow button on the end? What is that button used for?

    Is this also what is considered "user memory" that is flashed to the KFLOP when you push this button in the Config screen? or is "user memory" only information entered under each channel? and not related to the Cprogram screen.

    So, you mention that "Threads are not necessarily the Programs actually downloaded or Flashed into KFLOP." Then is there a way to see what is actually downloaded? In my screen thread 6 and 7 are the same program, from the same location. I noticed that if I deleted either thread 6 or 7 (by highlighting and hitting "delete") the program name stays in the KFLOP folder but the program goes to 0bytes. How do you remove a thread from the Cprogram screen without removing it from its location?

    What happens if you hit the "new" page button in the Cprogram screen? It says it wants to "overwright" file.

    Thanks,
    Robert



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

    Default Re: K2cnc spindle stopped for KG-4925

    Hi Russ,

    Thanks for finding the new thread.

    I asked Tom some additional questions and when I learn more I will re-flash the KFLOP. But I thought I would try your suggestions as it's configured now.

    So this is how it reads as of now. I assumed you do the test with the VFD plugged in and not from the pins on the K2 breakout board. So all testing was done with the VFD energized and from inside the VFD box.

    On the I/O board the output box was checked (don't know what that means) but when I checked the "State" box I can hear a click on the KFLOP!
    Readings:
    btw FWD and DCM with box checked = -6.5 ohms With box unchecked = -OL ohms

    Entered M3 S8000 in bottom send box (I assume this is the command line) hit send and heard "click"
    Readings: 0.22 VDC
    Changed S setting to 18000 and same reading.

    I also, did the testing twice, once with just powering all on and once with powering all on and then hitting the "INIT" button. Same results.

    I will retry these test after I better understand what Tom is telling me.

    This the the most progress I've made in one morning then I've had in three weeks!

    Robert



  6. #6
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    This is good information. It tells us that the program and relay for turning on the spindle is working correctly. This now points us to the Pulse Width Modulation generation which is what creates the voltage, which does not appear to be working. I am in a meeting at work for the next few hours but will provide you more info as soon as I get a chance to look at your code closer. The way this normally works is a channel is configured in the KFLOP similar to the way each axis is configured. The Speed channel is what creates the PWM signal.

    Russ



  7. #7
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Let me correct something I mentioned. PWM is pulse width modulation meaning the pulse width gets adjusted to narrower or wider. The VFD requires a voltage range to adjust the speed. The PWM signal is probably converted to a voltage on the k2cnc breakout card and sent to the VFD.

    Russ



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

    Default Re: K2cnc spindle stopped for KG-4925

    Ok that makes sense.
    Thanks



  9. #9
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert, the various screens in KMotion can be a bit confusing, as to what they show, and how they work.

    The C Program screen, is best thought of as an editor. When you open the C Program screen, each thread will show whatever file you previously opened in the C Program screen, which may or may not be what is in the KFlop. By default, the KFlop has no user programs installed or running. User Programs are normally sent to the KFlop for execution by software on the computer, and will be erased whenever the KFlop is rebooted.
    By clicking the download/run button on the C Program screen, the currently loaded/viewed file on the C Program screen, will be downloaded and executed in the relevant thread on the KFlop. It's not until you download the user program, that anything changes on the KFlop. Once you have downloaded a file to the KFlop, you could then open another file on the same thread screen, but the original file will still be stored/running on the KFlop until you click download again.

    Dynomotion's recommendation is for user programs to be run in this way by threads being downloaded/executed via software (i.e. KMotionCNC/Mach3), however K2CNC used the feature of writing the user programs into the non-volatile memory of the KFlop.
    I'm not sure of the exact process, but it involves using the Flash User Memory button on the Config&Flash screen. I'm not sure if you have to use the C Program screen to download the required programs to the relevant threads first, or if you simply have to have the required programs loaded to the relevant threads on the C Program screen.
    If you wish to erase anything stored within the KFlop, simply use the Flash New Version button, which will flash the firmware and clear any stored user data/programs.



  10. #10
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Quote Originally Posted by CNCMAN172 View Post
    You can also take an ohm meter and measure between FWD and DCM and it should measure near zero ohms when the BIT 34 is active.
    Russ, I know this is a bit late and is no way any criticism of the excellent advice you've been providing, but it's not recommended to use an ohmmeter on something where voltage may be present. On some multimeters you risk blowing them up, and also if there is any voltage present in the circuit being tested it can give strange and inaccurate readings (hence Robert's -6 reading).
    The safer and more reliable method is to measure the voltage across the terminals. On a VFD, with the terminals open/disconnected, you should get a reasonable voltage (I'd guess somewhere between 10-24VDC on a VFD, but I've never needed to measure one, and I'd suspect it'll vary between make/model. Russ's advice to beware of voltages is very wise, as some drives although the voltage drop between the control terminals is relatively low, they could be near mains voltage in relation to earth), then when the terminals are shorted/closed (i.e. the control relay/switch closes) the voltage should drop to 0V across the relevant terminals.



  11. #11
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    M_C,

    Fair comment, I should have mentioned all the measurements I suggested can be done with the VFD powered down. You just need to first determine if the K2CNC controller is closing a relay for direction, and that it puts out a analog voltage which the VFD uses for speed input. You can never be too safe when working with high voltages, the VFD typically has 220V to 240VAC as inputs and three phase 240VAC as outputs here in the USA. Some commercial buildings actually use higher voltage three phase power like 380VAC or 480VAC, and they require VFDs that use that level of imput. Anything over 5HP always uses 3 phase power inputs.

    Robert, after you read how to flash the programs which was detailed in the other thread with the ELTE spindle, you can attempt the speed tests. You might need to take closer photos of the board for me to determine where the PWM input is converted to a voltage but I am sure that circuit is on the K2CNC breakout board.

    Russ



  12. #12
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    With the detail of the pictures you provided I can't read the numbers on the parts on the K2CNC breakout board. It appears to me that J9 is the cable that goes to the VFD for spindle control. The parts near that connector would be my guess of when the PWM signal is getting converted to a analog voltage. If you can take better detailed pictures and write the number on the parts, such as U1 - abcdef, U2 - xyzay, U3 - 12A123, etc. Then I can tell for sure. Also if you know what cables plug into each of the J plugs that would also be useful information.

    Russ



  13. #13
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    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



  14. #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



  15. #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


  16. #16
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    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



  17. #17
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    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



  18. #18
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    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



  19. #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



  20. #20
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    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



Page 1 of 8 1234 ... 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