starting my C program, any guidance would be appreciated. - Page 4


Page 4 of 10 FirstFirst 1234567 ... LastLast
Results 61 to 80 of 199

Thread: starting my C program, any guidance would be appreciated.

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

    Default re: starting my C program, any guidance would be appreciated.

    Why are you pushing send?

    Regards
    TK http://dynomotion.com


  2. #62
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    Why are you pushing send?
    Sry the green arrow; cycle start. To test this machine and see if it works.



  3. #63
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    That's strange. Did you mean Green cursor?

    Attached is the attached Guninit.c. Please do the previously described test. It should take ~35 seconds to run circles.ngc

    Attached Files Attached Files
    Regards
    TK http://dynomotion.com


  4. #64
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    That's strange. Did you mean Green cursor?
    The green arrow? The cursor to me is the mouse arrow.

    Attached Thumbnails Attached Thumbnails starting my C program, any guidance would be appreciated.-20201229_183131-jpg  


  5. #65
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    No those wrong settings would give you different errors.

    I'm able to run with your configuration without any errors without having any motors or hardware by turning off limits and following errors. You might try that. I've attached your Init file with those changes.

    To simplify things further you might set the KMotionCNC M3, M4, M5 Actions to "none"

    #1 disconnect power to your hardware (motors)
    #2 power cycle KFLOP
    #3 from KMotion.exe C Program Screen Thread #1 load attached GunInit.c and Save/Compile/Download/Execute it
    #4 Verify on Axis Screen first 3 axes are enabled
    #5 KMotionCNC load circles.ngc into File #1
    #6 Cycle Start
    #1 disconnect power to your hardware (motors). Power was disconnected and servos wires were unplugged from servos.
    #2 power cycle KFLOP, Power was restored and Kflop was rebooted in the console window.

    #3 from KMotion.exe C Program Screen Thread #1 load attached GunInit.c and Save/Compile/Download/Execute it.
    File was saved to C-program file and then opened in C-program window.

    #4 Verify on Axis Screen first 3 axes are enabled.
    First 3 axis were enabled.

    #5 KMotionCNC load circles.ngc into File #1.
    file was loaded.

    #6 Cycle Start;
    pressed the INIT button, then the cycle start, and program ran as I would expect it. completed in 4.71 min. at F5

    #7 To simplify things further you might set the KMotionCNC M3, M4, M5 Actions to "none"
    All were set to none.



  6. #66
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    That sounds like it worked, but it isn't clear what you did or as I requested.


    #1 disconnect power to your hardware (motors). Power was disconnected and servos wires were unplugged from servos.
    #2 power cycle KFLOP, Power was restored and Kflop was rebooted in the console window.
    correct


    #3 from KMotion.exe C Program Screen Thread #1 load attached GunInit.c and Save/Compile/Download/Execute it.
    File was saved to C-program file and then opened in C-program window.
    It seems you did not execute the program


    #4 Verify on Axis Screen first 3 axes are enabled.
    First 3 axis were enabled.
    Maybe you did execute it?? Otherwise they would not be enabled.


    #5 KMotionCNC load circles.ngc into File #1.
    file was loaded.
    Correct


    #6 Cycle Start;
    pressed the INIT button,
    Why did you do this? What action is INIT configured to do?


    then the cycle start, and program ran as I would expect it. completed in 4.71 min. at F5
    That seemed to work. I'm guessing you configured INIT to run Guninit.c otherwise I would expect following error disables if not running Guninit.c with limits and following errors disabled.


    You might now connect motors and apply motor power and repeat the exact same sequence. You should get the exactly the same result except now the motors should actually move. Beware that limits and following errors will be disabled so if anything unusual occurs you will need to quickly kill power.

    If that works then the next thing would be to restore limits and Max Following Errors one at a time and check if it still works.

    Regards
    TK http://dynomotion.com


  7. #67
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    This morning I attempted to run with my original Init. file and had the same result, but the Init. file you gave me worked. I updated your Init. file with my information and it still works, so the fault was in my Init. file. I've reconnected all the servos and did a test run and everything works, this actually looks like a CNC machine working. What did you do to the Init file to get it to work?

    I know I'm a pain but I can't thank you enough. Were getting there, and I may be learning something. When running the program the axis are jerky not smooth, I assume that is in the tuning?



  8. #68
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    This morning I attempted to run with my original Init. file and had the same result, but the Init. file you gave me worked. I updated your Init. file with my information and it still works, so the fault was in my Init. file. I've reconnected all the servos and did a test run and everything works, this actually looks like a CNC machine working. What did you do to the Init file to get it to work?
    Good news. I believe I only changed the limits and max following errors. You might compare the files to see what's different. There is a great free open source program called Winmerge that makes this easy as well as to merge changes from one file into another.

    I know I'm a pain but I can't thank you enough. Were getting there, and I may be learning something.
    No worries. Thanks for your patience.


    When running the program the axis are jerky not smooth, I assume that is in the tuning?
    Yes

    Regards
    TK http://dynomotion.com


  9. #69
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Having trouble getting the jerk out of my Y axis, I added some Lead Compensation which I think may helped, and i also have adjusted the P and D settings but still having trouble getting it to minimal jerking. Here is a screen shot of the current Y setting, can you suggest any of the perameters I need to adjust? also where/how do i find my systems Freq. Hz. for adjusting Lead Comp.?



  10. #70
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Having trouble getting the jerk out of my Y axis, I added some Lead Compensation which I think may helped, and i also have adjusted the P and D settings but still having trouble getting it to minimal jerking. Here is a screen shot of the current Y setting, can you suggest any of the perameters I need to adjust? also where/how do i find my systems Freq. Hz. for adjusting Lead Comp.?

    Attached Thumbnails Attached Thumbnails starting my C program, any guidance would be appreciated.-screenshot-69-jpg  


  11. #71
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    I added some Lead Compensation which I think may helped
    No Lead Compensation has no effect for DAC Servos. Set to zero.


    Here is a screen shot of the current Y setting
    Can you see the output is saturating (clipping) ?


    Note it always makes me chuckle when I see a setting like 31579 counts/sec. That's like seeing a speed limit sign with 59.862346378 mph

    Regards
    TK http://dynomotion.com


  12. #72
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    Why did you do this? What action is INIT configured to do?
    Its configured to start the init. program. Each time I have a fault I can press this button and it resets my axis.

    Quote Originally Posted by TomKerekes View Post
    That seemed to work. I'm guessing you configured INIT to run Guninit.c otherwise I would expect following error disables if not running Guninit.c with limits and following errors disabled.
    Exactly.

    Quote Originally Posted by TomKerekes View Post
    No Lead Compensation has no effect for DAC Servos. Set to zero.
    Ok, Done.


    Quote Originally Posted by TomKerekes View Post
    Can you see the output is saturating (clipping) ?
    It's cutting the top of the Output line out, yes I can see that. So, that's what saturating is...


    Quote Originally Posted by TomKerekes View Post
    Note it always makes me chuckle when I see a setting like 31579 counts/sec. That's like seeing a speed limit sign with 59.862346378 mph
    That's what TripsWPF told me so, Do I need to adjust that to 32000 and keep it straight numbers?



  13. #73
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Can you see the output is saturating (clipping) ?
    It's cutting the top of the Output line out, yes I can see that. So, that's what saturating is...
    Correct so normally we would reduce the Velocity or Acceleration so this never occurs. However see below.


    That's what TripsWPF told me so, Do I need to adjust that to 32000 and keep it straight numbers?
    TripsWPF doesn't tell you anything. It only takes what you tell it and shows you what will happen. I suppose you moved a slider to set an arbitrary value. Yes things like limits and gains normally need to change by a significant percentage to make a difference. So round them to 1 or 2 digits of precision, You might go back to post 46 and answer my question.


    I see a major issue with the axis. Look at the beginning. Note the output is at 1000 (green plot right side scale) and there isn't any motion (red plot is flat). Similarly at 2.7 seconds the output is at full 2000 and there is little or no motion. Then to just begin to gradually reverse the output jumps to around -1000. So something is severely wrong with your system. Either mechanically ie extreme friction or binding. Or electronically. Inspect your system to see what is causing this. This is like being in a car with the gas pedal half way down and not moving. Something is wrong. Like having the parking brake on.

    Regards
    TK http://dynomotion.com


  14. #74
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Very good. Can you see what maximum Velocity and Acceleration are used?

    I assume you are talking about this Question, and yes these are some of the numbers I'm using. I did find a problem with the Y axis servo pulley; which is binding the belt, going to check the rest of them and see if I can set them straight.



  15. #75
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Can you see what maximum Velocity and Acceleration are used?

    I assume you are talking about this Question, and yes these are some of the numbers I'm using.
    Yes, but no you missed the point. Can you see that you specified a Maximum Acceleration of 11000 but in actuality the acceleration never even reaches 10000 ?

    Your earlier tests we more dramatic. For example in post 30 your max acceleration setting was 320000 but you were only reaching 56000.

    The idea is to get an understanding of why changing parameters sometimes have no effect for a particular test.

    Regards
    TK http://dynomotion.com


  16. #76
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    I am hooking up a pneumatic valve which controls the spendle speed of my mill. I believe I can hookup the 24v to Jp8 SW5, where Im having a problem is the valve is 2 wires, how can I got from Jp8 to 24v power to valve?



  17. #77
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    It isn't clear what you have or are trying to do.

    What are the specifications of the valve?

    A pneumatic valve normally is only on/off. It wouldn't be a speed control.

    Do not connect 24V directly to SW5 without going through a load or it will cause damage.

    Regards
    TK http://dynomotion.com


  18. #78
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    It isn't clear what you have or are trying to do.

    What are the specifications of the valve?

    A pneumatic valve normally is only on/off. It wouldn't be a speed control.

    Do not connect 24V directly to SW5 without going through a load or it will cause damage.
    Its a 24vdc pneumatic valve which controls the speed control on my bridgeport. The air controls what direction it turns and also activates my break.

    Their are two wires connecting the air valve (+/-)and I'm unsure where to connect it to my Kannalog board. I need to connect the valve to a 24v power supply and then to Kannalog to control opening and shutting the valve. What way would be best to connect it to Kannalog, through JP8 or Jp15?



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

    Default re: starting my C program, any guidance would be appreciated.

    Its a 24vdc pneumatic valve which controls the speed control on my bridgeport
    I still don't understand why you describe it as speed control. A valve is only on or off.

    What are the specifications of the valve?

    Regards
    TK http://dynomotion.com


  20. #80
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    I still don't understand why you describe it as speed control. A valve is only on or off.

    What are the specifications of the valve?
    It is an on/off air control that spins the variable speed control wheel. It just has a 24vdc selenoid switch that opens and closes the valve. I need to connect that selenoid to Kanalog and its 25vdc supply with 2 wires. I believe I could hook it up to one of the Jp15 connections just like I did with my e-stop and control it with dac commands.



Page 4 of 10 FirstFirst 1234567 ... 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

starting my C program, any guidance would be appreciated.

starting my C program, any guidance would be appreciated.

starting my C program, any guidance would be appreciated.