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


Page 3 of 8 FirstFirst 123456 ... LastLast
Results 41 to 60 of 158

Thread: K2cnc spindle stopped for KG-4925

  1. #41
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Hi Robert,

    In my effort to better understand the KMotion.exe I'm hoping you can shed some light on some questions.
    In the CProgram screen there is a "New" button. When do you use this?
    It is intended for when you want to make a New C Program staring from scratch. This is not common.

    If I press it it states that it will overwrite something. What does that mean?
    It will create an empty program with the name UserX.c where X is the current Thread number you have selected. It warns you that any file you might have had named UserX.c will be overwritten.

    Overwrite what I see on the screen or overwrite the program in the computer files?
    It will overwrite the disk file UserX.c. with basically an empty program shell and the screen will then show that file. Normally after creating the program you would "SaveAs" to a name that would make sense for you. None of this has any immediate effect on the Threads in KFLOP. It is similar to using notepad to edit files on your disk. Until you do something to Compile/Download the File to KFLOP.

    Also, I've noticed that if I highlighted and deleted anything that is on the CProgram Threads screen, it not only clears the screen it also clears program from the computer file location. The name of the file is still listed but it contains no coding. Why is that? Normal?
    That is correct. This is the same as opening a file with Microsoft Word. If you delete everything and select "Save" the disk file ill then be an empty file. What might be confusing is that you are saving the file without realizing it by pushing the Save or Save/Compile/Download/Execute button. If you want to edit things without changing a particular disk file first save it with a new name.

    Do you know if K2 flashed into memory any of the other Threads besides the K2mc_driver.c?
    I'm not sure what K2CNC did. But I showed you what they typed into the file:

    // - K2mc_driver.c -> Thread 6
    // - homing.c -> Thread 5
    // - toolchange.c -> Thread 4
    // - bitJog_sLimit.c -> Thread 1

    I believe they are saying that those files should be compiled, downloaded, and Flashed into those KFLOP Threads. This comment might not be up to date.

    I wonder why the tool changer thread is listed. We don't have a tool changer.
    Again the comment might be old or they might always set that up for every machine whether they have certain features.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


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

    Default Re: K2cnc spindle stopped for KG-4925

    I also have the 4th axis rotary.



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

    Default Re: K2cnc spindle stopped for KG-4925

    Tom,

    That helped a lot! I was able to confidently delete the duplicate program from thread #7. I also tried a different configuration of Threads and put the K2_SpindlePWM.c program on a thread line. Just to see what would happen. This was my configuration but nothing changed. Spindle still not turning. Since I do not have a tool changer I replaced it with the spindle program and moved what was in line 4 onto line 7. All axis' work, Homing works but spindle still does not turn on when called.

    Thread line up:
    #1 bitJog_slimit.c
    #2 InitStepDir3Axis.c
    #3 StopCallBack.c
    #4 K2_SpindlePWM.c
    #5 homing_zyx.c
    #6 k2mc*_driver.c
    #7 SetStepPulseLength.c

    Thanks again for answering my other questions. I was wondering if you could shed some light on when to use the "recovery" button in config/flash screen? Does it also restore Threads?

    Robert



  4. #44
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1729
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    When you did this and compiled the programs did you download them into KFLOP? Also if you moved the spindle program to thread #4, make sure you update KmotionCNC for spindle to look in thread #4 originally I think it was in thread two if I recall correctly.

    Also on the init button in KmotionCNC, you now have that in thread #2 make sure you adjust that change in KmotionCNC as well. After you do that you might want to press the init button and then try to issue some spindle commands again.

    Does the relay still click when you issue the command M3 S9000 ???

    Russ


    Russ



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

    Default Re: K2cnc spindle stopped for KG-4925

    Hi Russ,

    Yes, I did change all the threads from 2 to 4 in the tool set up and also changed the command speed. Nothing changed. Also, M3 and M5 on/off clicking still working and the display on the VFD still says run when M3 is clicked and off with M5 is clicked.

    I also tried changing all the Threads back to what I think was originally loaded and just adding the spindle program to Thread 7. - tested and then changed the all the thread calls from 2 to 7 in the tool set up screen. Nothing different.

    Robert



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

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    Run an experiment, first start up Kmotion.exe, then after that is running minimize it and then start up KmotionCNC.exe and go ahead and hit the init button. Before you do anything else look back at the console page on Kmotion.exe do you see any messages? Now try the M3 S9000 in KmotionCNC and then check Kmotion.exe console again, any messages?

    Tom,
    Is there anyway to determine what is downloaded in KFLOP and ready to run? I would have thought after he upgrade the Kflop to new firmware it would have removed all flashed programs? Not sure how it is getting initialized and how M3, M4, M5 are working without some code resident in KFLOP still?

    Russ



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

    Default Re: K2cnc spindle stopped for KG-4925

    Quote Originally Posted by CNCMAN172 View Post
    Robert,

    Run an experiment, first start up Kmotion.exe, then after that is running minimize it and then start up KmotionCNC.exe and go ahead and hit the init button. Before you do anything else look back at the console page on Kmotion.exe do you see any messages? Now try the M3 S9000 in KmotionCNC and then check Kmotion.exe console again, any messages?


    Russ
    OK, So This is what happened:

    Thu, Jul 23, 2015, 02:15:03 KMotion Program Started
    Spindle Set to 0.000000 pwm 255


    The first line was there when I opened it, nothing changed when I hit "Init", then the second line appeared when I entered M3 S9000.

    By the way, just for clarity, I restored all of the Threads to what I had the other day before I did this test.

    Robert



  8. #48
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1729
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    This seems to suggest that the PWM program is not adjusting the signal. It is saying it is set to 0, so clearly the issue has to do with the fact when you type in S and a speed number it is nothing getting there.

    Russ



  9. #49
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1729
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    Clearly the routine is getting called but "speed" does not appear to be getting passed. You could add a few more printf in the program but the speed variable seems to be the issue. You could prove this by hard coding a speed in the code and compile and download and when you call the spindle would turn on, just a test.

    Russ



    #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
    }



  10. #50
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Hi Robert,

    Do you have the Var configured for 35 as the C Program is expecting in the KMotionCNC Tool Setup S?

    Regards

    Regards
    TK http://dynomotion.com


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

    Default Re: K2cnc spindle stopped for KG-4925

    Tom,

    Great catch, NO he has the VAR on the KmotionCNC set to VAR 31.

    Robert you can change this on the KmotionCNC screen look at the S command that call the Spindle routine and based on the screenshots you sent earlier the VAR for spindle is setup for 31, change that to 35 and it should start working.

    Russ



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

    Default Re: K2cnc spindle stopped for KG-4925

    Tom and Russ,

    I just tested it after changing the VAR from 31 to 34 with out any luck. I noticed that M4 also lists VAR 31 so I tried changing that one as well with out a change.

    Robert



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

    Default Re: K2cnc spindle stopped for KG-4925

    Sorry, I meant VAR 35 not 34.



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

    Default Re: K2cnc spindle stopped for KG-4925

    However, the console now says this!

    Fri, Jul 24, 2015, 01:08:10 KMotion Program Started
    Spindle Set to 9000.000000 pwm 128




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

    Default Re: K2cnc spindle stopped for KG-4925

    Tom,

    Should the M4 also be VAR 35?

    Robert



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

    Default Re: K2cnc spindle stopped for KG-4925

    Russ,

    Retested ACM/AUI pins for voltage for S3000, S6000 and S9000. Still reading same for all - 0.067 DVC
    Retested Aux1-Pin 11 Still reading 0.5 DVC

    Robert



  17. #57
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1729
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    I actually think what they have listed for the two C programs for M3, M4, and M5 are not actually what they are using. M4 is not really required at all unless you plan on running the spindle in reverse. Some actual CNC machines implement the M4 command for rigid tapping. The turn the spindle slowly forward to turn in the tap, stop, reverse the motor and remove the tap. This is the most common use of M4, there are some reverse cut bits that are designed for the spindle to run CCW but they are rare.

    what you would normally do is configure the M3 command to set bit 34 to a 1, and M5 command would set bit 35 to a 0.

    The fact that Kmotion now is printing out the the console the spindle is set to a given RPM and PWM signal is good. Are you still hearing the relay click when you issue the M3 command? Keep in mind the spindle will not turn even in you have the speed signal if the M3 command does not close the relay. Did this spindle ever work correctly? If the relay is indeed closing and the PWM signal is really there we need to troubleshoot the components that convert the PWM signal into a analog voltage. With Spindle set at 9000 RPM the voltage going to the spindle should actually be 5V.

    Russ



  18. #58
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1729
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    Correction to my last post, M3 and M5 should be controlling bit 34.

    Russ



  19. #59
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Hi Robert,

    KFLOP Aux1-Pin 11 is PWM generator #4

    Your Spindle C Program is specifed to use PWM #5

    Regards

    Regards
    TK http://dynomotion.com


  20. #60
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1729
    Downloads
    0
    Uploads
    0

    Default Re: K2cnc spindle stopped for KG-4925

    Robert,

    JP6 - AUX1

    PIN-12
    IO31
    Gen Purpose LVTTL I/O (3.3V Only) or PWM5 out

    Check this pin to see if you have a voltage between Pin-12 and GROUND.


    Russ



Page 3 of 8 FirstFirst 123456 ... 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