586,597 active members*
3,322 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    35

    trying to implement css

    Hi Tom

    I am trying to implement css on my lathe. To do this I have taken your examples and altered them to my needs. My intention is to let one thread handle all the S parameter changes. This is why I added an other if-statement for RPM mode. I attach the c-program I am using.
    Before going live on my machine I am testing with a slowed down loop and printing out the rpms that would be sent to my machine. Doing this I noticed sudden changes in RPM that I did not understand.

    While investigating I found out that the calculation of the radius is not working as expected.

    To test this I
    - set the x-axis to about 200mm (diameter)
    - do the "G96 D2500 S159.6" of your css sample in MIDI
    - start my attached css c-program
    - do a "G01 X50.8 F100" in MIDI

    The attached console output shows that at some point while traveling from 200mm to 50.8mm the radius suddently drops and comes back up again. The end value seams also to be wrong. I think it should read one inch and not 0.89 inch.
    The console output was done with a linear move from 200mm to 50.8mm. The radius does not reflect a linear move.
    In the attached picture you see the end position in KMotion and the console.
    Attached Thumbnails Attached Thumbnails css_test..PNG  
    Attached Files Attached Files

  2. #2
    Join Date
    May 2006
    Posts
    4047

    Re: trying to implement css

    Hi delcon,

    Sorry I'm not able to duplicate the issue. Are you sure you are not executing the GCode with Cycle start rather than sending the MDI command? I think that would do as you describe.

    Can you be more specific what you are doing and what happens? What does the DRO indicate with respect to the Console Screen Radius?

    What Version are you using?

    Regards
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Oct 2007
    Posts
    35

    Re: trying to implement css

    Hi Tom

    Thanks for looking at this. I did some more research on this and can report following. I don't want to sound complaining - your program is great and I appreciate your work. I just report what I noticed. Here is how to reproduce:

    prerequisites:
    KMotion 433l in lathe mode, metric
    G54 set all offsets to 0
    T1 X offset -50.

    - Fresh start of PC with Kmotion and Kflop
    - Machine Axis are at 0 since it is a fresh start
    - start Kmotion, G54 and T1 is shown as active offsets ->the green X-Axis-DRO reads 0.000, but it should read -50. I looks like the Tool offset is not applied
    - without Toolchange, DRO at 000, start my attached CSS handling c-program. ->No ouput of the c-program because PC_COMM_CSS_MODE is not initalized, reads 0
    - execute G97 ->Console shows RPM Mode, but RPM does not match Kmotion Spindle Speed reading, also configured c-programs for S-Commands have not been executed
    - execute G96 D2500 S159.6
    - execute G1 X 200. F100 ->Console output as expected
    - do a manual Toolchange to Tool No1 to apply the offset
    - execute G1 X50.8 -> Console output shows Radius calculation error for CSS

    not related to css, but worth trying:
    go to console and execute a "Reboot!" -> "Kmotion present but not responding" Dialog, then "Cant connect to Kmotion Board" - only solution is to cycle power

    I hope this helps to reproduce the behavior.

    From the technical Point: would it be a disadvantage to do

    DoPCInt(PC_COMM_GET_DROS,TMP);
    DROx=GetUserDataDouble(TMP);

    to calculate CSS?

    Best Regards

    Leo
    Attached Files Attached Files

  4. #4
    Join Date
    May 2006
    Posts
    4047

    Re: trying to implement css

    Hi Leo,

    Thanks for looking at this. I did some more research on this and can report following. I don't want to sound complaining - your program is great and I appreciate your work. I just report what I noticed.
    Not like complaining at all. I greatly appreciate your clear examples.

    You are correct the Tool X Offset was not being used for CSS.

    Here are some patched files that should correct this when applied to V4.33l (changed sources are included if you need them)
    Index of /Software/Patch/FixCSSToolOffsetV433l


    start Kmotion, G54 and T1 is shown as active offsets ->the green X-Axis-DRO reads 0.000, but it should read -50. I looks like the Tool offset is not applied
    Well I believe Tool offsets should not normally be applied until after Tool Length Compensation is turned on with G43Hxxxx. The patched KMotionCNC will now apply them on program startup if the Tool Setup Option "Tool Length/Offset Immediately" and "M6 on Tool Table Changes" are both selected.

    execute G97 ->Console shows RPM Mode, but RPM does not match Kmotion Spindle Speed reading, also configured c-programs for S-Commands have not been executed
    Since no S Speed has been commanded and no M3/M4 Spindle on command has been issued I think this is reasonable.

    - do a manual Toolchange to Tool No1 to apply the offset
    - execute G1 X50.8 -> Console output shows Radius calculation error for CSS
    Currently after doing anything that may change offsets (fixture, G92, tool, etc..) the G96 command needs to be issued to tell KFLOP about the change. That seems reasonable to me as one would expect the CSS rate to change when changing tools. Also something like a fixture offset change would result in a spindle RPM change. I suppose KMotionCNC could handle all these cases if you think it is unacceptable to have to specify a G96 after such changes.

    With the new patch, if a G96 is performed after the tool change, things should now work correctly.

    not related to css, but worth trying:
    go to console and execute a "Reboot!" -> "Kmotion present but not responding" Dialog, then "Cant connect to Kmotion Board" - only solution is to cycle power
    Sorry we haven't yet been able to fiure out a way to re-boot the board reliably without a hardware reset.

    From the technical Point: would it be a disadvantage to do

    DoPCInt(PC_COMM_GET_DROS,TMP);
    DROx=GetUserDataDouble(TMP);

    to calculate CSS?
    Yes the disadvantage would be non-deterministic response (if the PC was busy the CSS speed wouldn't change on time). It would also use a lot of USB bandwidth constantly polling the PC.

    Regards
    TK
    http://dynomotion.com

Similar Threads

  1. Got an idea, not sure how to implement it.
    By Ashlar in forum Hobby Discussion
    Replies: 10
    Last Post: 02-08-2015, 05:55 PM
  2. Spindle Speed Override: How to Implement?
    By jeffserv in forum Dynomotion/Kflop/Kanalog
    Replies: 7
    Last Post: 06-17-2014, 08:38 PM
  3. How to implement O9000 ATC macro in Yasnac MX3 ona VTC41 1991
    By oliverhanisch in forum Mazak, Mitsubishi, Mazatrol
    Replies: 10
    Last Post: 04-09-2013, 11:42 PM
  4. How to implement tool changer
    By Zig in forum LinuxCNC (formerly EMC2)
    Replies: 0
    Last Post: 04-01-2008, 08:09 AM
  5. Replies: 0
    Last Post: 10-30-2006, 03:50 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
  •