Problem Dialogue problems between KMotionCNC and C program


Results 1 to 12 of 12

Thread: Dialogue problems between KMotionCNC and C program

  1. #1
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Dialogue problems between KMotionCNC and C program

    good day to everyone,
    my goal is to write a G Code program based on the input of a KMotionCNC graphics page to execute a complete thread G32 based. As u can see from attached screenshots, I used the instruction

    GetEditControlDouble(variable,VAR,offset)

    to read the Controls inside the page, but I get always a NULL value. Of course there is something wrong, but I can't to understand where.
    Some advice to fix the problem?

    Beppe

    Similar Threads:
    Attached Thumbnails Attached Thumbnails Dialogue problems between KMotionCNC and C program-screeneditor-jpg   Dialogue problems between KMotionCNC and C program-screenapp-jpg   Dialogue problems between KMotionCNC and C program-screenresult-jpg  
    Attached Files Attached Files


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

    Default Re: Dialogue problems between KMotionCNC and C program

    Hi Beppe,

    To print the value of a variable a format specifier must be included in the string to indicate where and how the value should be placed. %f for a floating point variable. Like in the line you commented out. %5.1f requests 5 characters total with one decimal place be printed.

    Note all the strings should end with a \n (newline character) to cause it to print.

    Regards
    TK http://dynomotion.com


  3. #3
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: Dialogue problems between KMotionCNC and C program

    hi Tom

    following your advices now the C program is running.
    I have another problem on the tool changer: until a week ago it was working fine and suddenly it stopped to work. As you can see on attached KMotionCNC screenshots, the TOOL_VAR variable read is always zero and obviously the tool change program reports an error. Doesn't care if I call the change by manual button, by MDI command or from a G-Code... the TOOL_VAR is always zero. I am sure that the declaration #define TOOL_VAR 9 is inside the rotate tool changer program only and I am also sure I don't use any persist.UserData[] to write the VAR #9 into the other C programs: any advice how to debug the problem?
    Attached screenshots and RotateToolChanger program

    Beppe

    Attached Thumbnails Attached Thumbnails Dialogue problems between KMotionCNC and C program-kmotioncnc-screen-jpg   Dialogue problems between KMotionCNC and C program-kmotion-screen-1-jpg  
    Attached Files Attached Files


  4. #4
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: Dialogue problems between KMotionCNC and C program

    Tom

    sorry, when I recorded the KMotionCNC screenshot I didn't see i wasn't inside the right thread but the Console is reporting what happened due Tool Changer program

    Beppe



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

    Default Re: Dialogue problems between KMotionCNC and C program

    Hi Beppe,

    Do you have M6 configured to use Var #9?

    Regards
    TK http://dynomotion.com


  6. #6
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: Dialogue problems between KMotionCNC and C program

    hi Tom,

    if you mean in the KMotionCNC tool setup, yes



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

    Default Re: Dialogue problems between KMotionCNC and C program

    Hi Beppe,

    Correct.

    What Slot Value do you have in the Tool Table for Tool ID 1002?

    Regards
    TK http://dynomotion.com


  8. #8
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: Dialogue problems between KMotionCNC and C program

    hi Tom,

    here is already night and I will check tomorrow morning what you ask. Just to understand better... is the Tool ID value been passed from KMotionCNC to Kflop VAR #9?

    Beppe



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

    Default Re: Dialogue problems between KMotionCNC and C program

    Hi Beppe,

    Normally what is important for a Tool Change Program is what Slot the Tool is in not the ID. But both are passed to the Tool Change Program. Slot in VAR and ID in VAR+1.


    HTH

    Regards
    TK http://dynomotion.com


  10. #10
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: Dialogue problems between KMotionCNC and C program

    good day Tom,

    problem fixed: because I develop C programs at home, something went wrong with copying files to the lathe PC and the M6 calling was on VAR #0 instead #9. That's all. A stupid problem that make me feel more stupid.
    thanks anyway for your infinite patience.

    Beppe



  11. #11
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: Dialogue problems between KMotionCNC and C program

    Hi Tom,

    I was designing a KMotionCNC diagnostics page to view all the status of Kflop-Kanalog IN / OUT but I realized I didn't have enough IDC_But to use as a led. Is there any way to add more buttons?

    Beppe



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

    Default Re: Dialogue problems between KMotionCNC and C program

    Hi Beppe,

    Not without changing the source code. We will consider adding more.

    You might consider going to multiple screens.

    Regards
    TK http://dynomotion.com


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

Dialogue problems between KMotionCNC and C program

Dialogue problems between KMotionCNC and C program