548,545 active members*
1,424 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > Dialogue problems between KMotionCNC and C program
Results 1 to 12 of 12
  1. #1

    Join Date
    Apr 2019
    Posts
    45

    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
    Attached Thumbnails Attached Thumbnails ScreenEditor.jpg   ScreenApp.jpg   ScreenResult.jpg  
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    May 2006
    Posts
    3904

    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.
    TK
    http://dynomotion.com

  3. #3

    Join Date
    Apr 2019
    Posts
    45

    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 KmotionCNC Screen.jpg   Kmotion Screen 1.jpg  
    Attached Files Attached Files

  4. #4

    Join Date
    Apr 2019
    Posts
    45

    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
    Junior Member
    Join Date
    May 2006
    Posts
    3904

    Re: Dialogue problems between KMotionCNC and C program

    Hi Beppe,

    Do you have M6 configured to use Var #9?
    TK
    http://dynomotion.com

  6. #6

    Join Date
    Apr 2019
    Posts
    45

    Re: Dialogue problems between KMotionCNC and C program

    hi Tom,

    if you mean in the KMotionCNC tool setup, yes

  7. #7
    Junior Member
    Join Date
    May 2006
    Posts
    3904

    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?
    TK
    http://dynomotion.com

  8. #8

    Join Date
    Apr 2019
    Posts
    45

    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
    Junior Member
    Join Date
    May 2006
    Posts
    3904

    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
    TK
    http://dynomotion.com

  10. #10

    Join Date
    Apr 2019
    Posts
    45

    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

    Join Date
    Apr 2019
    Posts
    45

    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
    Junior Member
    Join Date
    May 2006
    Posts
    3904

    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.
    TK
    http://dynomotion.com

Similar Threads

  1. Set Cycle Start Button in KmotionCNC by .c program
    By felluco in forum Dynomotion/Kflop/Kanalog
    Replies: 1
    Last Post: 03-19-2019, 04:39 PM
  2. Replies: 6
    Last Post: 02-09-2017, 06:48 AM
  3. KmotionCNC - Sending information to user program?
    By nickcornilsen in forum Dynomotion/Kflop/Kanalog
    Replies: 5
    Last Post: 01-29-2013, 03:56 AM
  4. Ramping dialogue box
    By skipper in forum SolidCAM for SolidWorks and SolidCAM for Inventor
    Replies: 11
    Last Post: 03-10-2009, 01:44 PM
  5. Cant Resize Dialogue Box
    By Jedi in forum Mastercam
    Replies: 1
    Last Post: 02-28-2007, 11:19 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
  •