Kanalog outputs sometimes stop working...


Page 1 of 2 12 LastLast
Results 1 to 12 of 15

Thread: Kanalog outputs sometimes stop working...

  1. #1
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    315
    Downloads
    0
    Uploads
    0

    Default Kanalog outputs sometimes stop working...

    Hi Tom, im running into an occasional problem with my mill since the last kmotioncnc upgrade. I've ran into this twice now, and each time it was running a batch of parts, everything running fine with several parts made and then suddenly a toolchange times out because the drawbar cylinder isnt being turned on. At this point my spindle will not start either. Seems like several of the kanalog relay driver outputs stop working. I am able to retract my toolchanger which is controlled by a konnect board, so these outputs still work.

    Its fairly easy to fix, all i have to do is run the init file again and everything is fine. Any idea what could be causing this? The fact that running the init file again gets rid of the problem almost suggests an error in my code, but my code has been working for a while and the fact that its happening suddenly after running several cycles seems to suggest something else too.

    Also, I added a 4th axis and custom screen during my last upgrade as well.

    Similar Threads:


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

    Default Re: Kanalog outputs sometimes stop working...

    Hi mmurrary70,

    When the problem occurs before re-initializing you might determine the reason the IO isn't working. Did you try toggling the IO with the digital IO screen? Is the bit shown set on the screen but physically not? Did you check the pin voltage and supply voltages?

    I can't think of a way Kanalog relay drivers would stop responding. Unless Kanalog communication has somehow stopped. Is the Kanalog charge pump Enable LED on? Or if a Program was continuously writing to the IO. Halt all Programs and then check if the IO works.

    If you post the code we can look it over.

    Regards



  3. #3
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    315
    Downloads
    0
    Uploads
    0

    Default Re: Kanalog outputs sometimes stop working...

    Sorry I dont have more info. I need to do more testing for sure next time it happens. It only did it twice, the first time i didnt really know what was going on, and second time it happened it was in the middle of a rush job so I had no time to test then. I have a fair bit of work with the mill next couple weeks so ill report back more info next time it happens.

    Where exactly is the charge pump enable led? All the axes still moved fine, and also worked with mpg so still must have been communication with kanalog.



  4. #4
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2929
    Downloads
    0
    Uploads
    0

    Default Re: Kanalog outputs sometimes stop working...

    Hi mmurrary70,

    Where exactly is the charge pump enable led?
    There is only one LED on Kanalog D7. At the bottom right corner of the board near JP15.

    All the axes still moved fine, and also worked with mpg so still must have been communication with kanalog.
    I believe that is correct.

    Regards



  5. #5
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    315
    Downloads
    0
    Uploads
    0

    Default Re: Kanalog outputs sometimes stop working...

    I have a little update on this. I still have a problem, but the issue i talked about with the loss of all kanalog outputs and then being fixed by running the init file was my fault. I have a lot of outputs blocked while the toolchanger program is running, and when my toolchanger program timed out and stopped it didnt finish the cycle, so these outputs were still being blocked. Running the init file set everything back to startup condition so it was all fine again.

    So the problem im still having is occasionally my machine is ignoring SetBit and ClearBit commands. This is only happening maybe once every 30-40 hours of use, but its a pretty serious problem. This has occurred many different ways. Most common is my tool change program trying to release a tool and timing out. When I check the states of the outputs in kmotion, they have not been set on when told to do so. Also i have seen the same thing when clamping a tool. Times out and when i check state the drawbar output has not been switched off. This has also happened in my spindle program, I've gotten timeouts while changing gears the exact same way. And a few times I've even had the spindle not start which is a major problem! I've actually added another M code to check to make sure the spindle bit has been set on properly so I can run the machine unattended, and finally today this detected the spindle not being turned on and shut things down.

    Any idea what could be causing this? What can I do to try and fix this? Im thinking of putting the SetBit and ClearBit commands into a While loop that checks the state of the bit, but I feel like this would make a mess of all my c programs, and shouldn't be necessary. Is this a good idea for a band aid for now? Any other suggestions?



  6. #6
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    315
    Downloads
    0
    Uploads
    0

    Default Re: Kanalog outputs sometimes stop working...

    I did a test program tonight to repeatedly set a bit, check if its on, and then clear it and repeat. Here is the program:

    Code:
    #include "KMotionDef.h"
    #define TMP 10 // which spare persist to use to transfer data
    #include "KflopToKMotionCNCFunctions.c"
    
    
    main()
    {
    
    for(;;)
    	{
    	SetBit(146);
    	Delay_sec(0.05);
    	if (!ReadBit(146)) printf("output not set\n");		// Print error
    	ClearBit(146);
    	Delay_sec(0.05);
    
    	if (ReadBit(1038)) return 0; // if feedhold pressed, exit program
    	}
    
    }
    I ran this program for about 10 minuites and got the error 5 times. This would be about 6000 cycles and it failed to set the bit 5 times.

    Also I should mention that the errors ive been having have always been with kanalog outputs, both the relay drivers and the opto outs. I have a bunch of stuff controlled by Konnect and never ever had an issue with those outputs.



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

    Default Re: Kanalog outputs sometimes stop working...

    Hi mmurray70,

    Yikes! Nice that you found a simple way to demonstrate the problem.

    The Kanalog SetBit/ClearBit operations perform a memory read/modify/write. This could be a problem if more than one Thread is running and both are changing bits at the same time. Did you have another Thread running while this test was running? Was the other Thread also Setting or Clearing Kanalog Outputs?

    Your example doesn't fail for me while running by itself, but if I put another Thread in a tight loop toggling an adjacent bit it does fail pretty quickly.

    What Version are you running? I will try to make a patch to make the read/modify/write atomic.

    Regards



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

    Default Re: Kanalog outputs sometimes stop working...

    Hi mmurray70,

    Please try this patched KFLOP Firmware to see if it resolves the problem. It is compatible with V4.34

    http://dynomotion.com/Software/Patch...4/DSPKFLOP.out

    Regards



  9. #9
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    315
    Downloads
    0
    Uploads
    0

    Default Re: Kanalog outputs sometimes stop working...

    Quote Originally Posted by TomKerekes View Post
    Hi mmurray70,

    Yikes! Nice that you found a simple way to demonstrate the problem.

    The Kanalog SetBit/ClearBit operations perform a memory read/modify/write. This could be a problem if more than one Thread is running and both are changing bits at the same time. Did you have another Thread running while this test was running? Was the other Thread also Setting or Clearing Kanalog Outputs?

    Your example doesn't fail for me while running by itself, but if I put another Thread in a tight loop toggling an adjacent bit it does fail pretty quickly.

    What Version are you running? I will try to make a patch to make the read/modify/write atomic.

    Regards

    Yes I ran the test with machine idling so init thread was running and servos were on. My init file is fairly complex too, i have alot of different stuff in my forever loop. I did some more testing today and it seemed to happen more often with servos turned on, if it was in estop it was less likely to do it.

    Thats awesome that you have a patch already! Ill try it tomorrow or the next day. I have some parts i need to finish in the morning and dont want to risk messing up the machine before i get these done. I think im using 4.34k rignt now. Ill post back results. Thanks again!



  10. #10
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    315
    Downloads
    0
    Uploads
    0

    Default Re: Kanalog outputs sometimes stop working...

    Hi Tom,

    I just tried updating firmware and got an error when launching my init file. See attached. Thanks.

    Mark

    Attached Thumbnails Attached Thumbnails Kanalog outputs sometimes stop working...-untitled-jpg  


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

    Default Re: Kanalog outputs sometimes stop working...

    Hi Mark,

    You must:

    #1 Install Version 4.34
    #2 copy the patched firmware to the \KMotion434\DSP_KFLOP dir keeping the same name of DSPKFLOP.out
    #3 run KMotion.exe V4.34
    #4 Flash New Version
    #5 Reboot KFLOP

    HTH
    Regards



  12. #12
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    315
    Downloads
    0
    Uploads
    0

    Default Re: Kanalog outputs sometimes stop working...

    Ok i tried flashing from a USB stick. Ill try copying it to proper folder first.

    You say to install 4.34... 4.34k will still work right? I dont actually have to use an older version do I?



Page 1 of 2 12 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

Kanalog outputs sometimes stop working...

Kanalog outputs sometimes stop working...