Issue deleting/editting a PC Program

  • Ok we had a issue Sunday night/Monday morning where we lost our tool identifying output from our robot to the plc after a backup was restored and a initialization occured. To mitagate this issue from reoccuring I created a PC Program that monitors the state of the tool identifying input and uses that to write to the tool Identifying output. It worked great until our input signal would flicker and momentarily turn off the output, which caused problemsfor some of our processes. Now Im trying to delete the original autostart.pc program and load in a updated one where I no longer turn the outputs off if no input signal is read. I also can not modify or edit the program. I have aborted the pc program, Killed the pc program, and disabled the system switch which automaticly runs the program in the event of a power cycle. All consecutivly and still cant delete/modify/edit the program. Online through KTerm or in teach mode on the pendant. any suggetions on what im doing wrong?

    Ive attached my modified program as a screen grab. it wont allow me to upload a .txt file fro some reason.

  • AD
  • I assume you have checked and confirmed the background task is actually aborted and killed (PC area is clear of the program).

    1. Which no. slot are you executing it in type in:

    PCSTATUS 1: (for slot 1)

    PCSTATUS 5: (for slot 5)

    2. Can you successfully do a full file save, even thought this problem exists?

    - ie does it complete the file save successfully or appear to 'hang' at any point during the save.

    3. What message(s) returns when you type in via KRTerm or teach pendant keyboard:

    DIR/p (does autostart.pc appear in the listing).

    LIST/P autostart.pc

    EDIT autostart.pc

    DEL autostart.pc

    4. Your file how are you trying to load it in, what command are you using and what message is coming back?

    That file as it stands will never load in, when you are doing any offline program via text editor you need:

    .PROGRAM xxxxxxx()

    put code in here

    put code in here

    put code in here

    .END (after .END ALWAYS carriage return THEN save)

    5. What is the Kawasaki Tools Suite (Part of KROSET or separate application)?

    What happens if you did the program in 'notepad' and load it in?

  • I ended up being able to edit the program eventually. Pretty much repeatedly aborted and then killed the pc program (PCABORT and PCKILL) till it decided to cooperate. Still haven't found a reason why.

    Alexandru, I only tried deleting it on the pendant, I would use the PC Abort function, the PC Kill function, verify it was terminated using the PC Status function, then select delete from the directory options, select autostart.pc and I would get an error stating "Unable to Delete, program running". Id hook up the laptop and connect via KRTerm, type (STATUS) just to verify my connection and id see autostart.pc is still in the program stack, Then id use the commands PCABORT then PCKILL, verify it was aborted and killed with command PCSTATUS, I'd try and delete it again or edit the program and id still get the same error "Unable to Delete, program running", or unable to edit if I was trying to edit. Eventually it did let me edit it on KRTERM, I don't know why though.

    kwakisaki, 1. I was executing all of this in slot 1 on the pendant which is were the program should be in. In KRTERM I was just using PCSTATUS as the command, does that matter? 2. I know I was able to create a saved backup but I don't remember it lagging? 3. Ill attach a photo of some of what I was seeing on KRTerm that may answer some of your third question. 4. That's just a literall screen grab from KTools, the .PROGRAMxxxxx() and .END gets added when ya save the file as a .as , Ill attach the note pad file screen grab just to verify and can you explain more what you mean about END ALWAYS carriage return? 5. My KTools Suite version is 1.8005 and its separate from KROSET. I have not tried programing it in a notepad file yet.

  • Talking with Kawasaki Tech support it they are saying I'm having a hard time differentiating the difference between the program "stack" and robot memory. I was under the impression that I was removing autostart.pc from the program "stack" by aborting and killing it? Is there another way or a step I'm missing?

  • As it's working now, there's not a lot I can bring to the table, as all the evidence has gone.

    Regarding .END

    The controller will normally add to the end of a program during a filesave to terminate the program.

    It is not something you ever type in when online programming.

    However, when offline programming, you need to make sure the .PROGRAM is terminated with a .END or the load will fail.

    Therefore you should always make sure you write in .END and also terminate the line by a carriage return to ensure correct termination, on some earlier versions of AS, without this caused a non termination of the line and would cause issues during loading.

    KTools is doing this for you, so it won't cause you problems.

  • Interesting, Ive had it error out because it still added in the .END even though I already had. I'd get a multiple end statement error. The carriage return is what really messed with me. I use different terminology so my mistake.

    and as far as its working, I'm skeptical it wont return as a issue because Im obviously not understanding something asfar as steps to modify/edit/delete my programs

  • You keep mentioning errors, but do not provide screenshots of ANY error messages received.

    I suspect I know where the problem may lie, but without evidence, I do not publish this information until I have further information as it could be a whole host of things (that I am unware of, hence the questions).

    Don't forget, here on the forum, we do not have the benefit of seeing what your seeing, or doing what your doing.

    I never said add a .END, as KTools is doing this for you as its a proprietary application.

    If you use a text editor, you will need to add the .END and include a carriage return after it, so that the cursor is on the line below the .END before saving.

  • Opinion 1:

    KHI do not document ANY procedure (at this time) to create OFFLINE programs and load them in except when using KROSET to create them.

    If you do not understand the correct syntax, structure of programs and data, then either ask Kawasaki to provide a training course in correct syntax and structure or always use documented methods such as teach pendant or PC Application for editing.

    KTools is a development tool created by KRI, which creates the correct structure/prepares the file for OFFLINE programming.

    KTools is not official application where you will find documentation in standard Kawasaki manuals to cross reference to, except contacting KRI.

    Opinion 2:

    If you are editing ONLINE using a PC Application or directly on the Controller using teach pendant:

    - You can only edit/access one program by ONE medium, when in edit mode, the first medium connected has priority.

    - Either using teach pendant gui, teach pendant keyboard or PC application such as KRTerm, KCWin32 or KCWin TCP.

    - Never use more than one medium during editing.

    - eg if you have the program open in edit mode on KRTerm, if you try and use POS MOD on teach pendant for the same program, data will not be written.

    - Likewise if you try and change code on teach pendant when program is already open in KRTerm.

    - It is common for people to have a program in edit mode on teach pendant or PC Application and try to load in from an offline source, this will not work.

    Opinion 3:

    If you are editing OFFLINE and loading in:

    - Make sure you understand the correct syntax and structure of the file you are loading in, see opinion 1:

    - Consider deleting the old program first, rather than loading in over the top, I have never had any issues using this method.

    - Kawasaki Controller will check syntax during the load, and will catch 99.9% of syntax problems and ask you to delete or comment out during load.

    - If there are connection issues during the load, power outage, then possible memory corruption can occur (disconnect, reboot and try again).

    - Make sure the program you are loading in is, not currently under execution, not currently in the stack.

    - Make sure the program you are loading in is not currently being edited by PC Application, not currently being edited on the teach pendant.

    - It is common for people to have a program in edit mode on teach pendant or PC Application and try to load in from an offline source, this will not work.

    Opinion 4:
    In your case with the PC Program, if this happens again:

    - Check and confirm if you are using any dedicated input signals (Aux Func 0601) to control PC Programs are disabled/turned off.

    - Check and confirm it is not currently being edited, under execution, in the stack (an asterisk next to the program name means its running).

    - If it is, then carry out PCSTATUS 'slot no' : , PCABORT 'slot no' : , PCKILL 'slot no' : commands to check, abort and clear program from stack.

    - Load in program.

    If program does not disappear from PC Program area, goto Aux Func 0502 and turn off system switch relative to autostart program you are autostarting.

    - Reboot Controller.

    - Carry out PCKILL 'slot no': again, this will now remove the program.

    - Load in your program.

    - Goto Aux Func 0502 and turn on system switch relative to autostart program.

    - Reboot Controller.

  • I had Kawasaki in my facility on Saturday for a training seminar and recreated the problem in front of the tech who had been previously helping with this problem. Also took pictures this time. After working on the issue with the Kawasaki tech the only way he was able to edit/delete/modify the program was to complete an initialization of the controller and restore a backup I had generated prior to the autostart.pc program was created. As I mention in my previous posts the system switch was inhibited, we had performed a PCAbort command on the correct slot, then we performed a PCKILL command on the correct slot. PCStatus showed no PC programs running, and the PC window/display on the teach pendant had no programs (with or without the asterisk) displayed. You would still not be able to delete/edit the program. Very interesting. This issue compounded with a couple other odd ball quirks lead to the Tech questioning the viability of our CPU. Its currently running but he is suspecting its at the end of its life. We also replaced the cpu battery as a preventive measure. Everything is functioning properly now, I just figured a follow up would be nice for background info.

  • Respectfully:


    I suspect I know where the problem may lie, but without evidence, I do not publish this information until I have further information as it could be a whole host of things (that I am unware of, hence the questions).

    Don't forget, here on the forum, we do not have the benefit of seeing what your seeing, or doing what your doing.

    This is exactly where my suspicions lay.

    IMG_0111 is the exact answer I wanted to one of my questions.

    I very rarely recommend a memory wipe unless the evidence points to it as other readers will randomly use the procedures in any instance to try and rectify a problem (and possibly introduce further problems) which does not benefit visitors/members to Robot Forum, hence the questions.

    If you have bad memory blocks in the CPU, this problem will re-occur.

    If this was caused by incorrect syntax during an OFFLINE upload, then the memory initialization will fix it.

    If you can re-create this, then you should know where the underlying problem is, How did you re-create this?.

    This issue compounded with a couple other odd ball quirks...…..Really and what were these?

    Kawasaki does have a memory flush procedure (they do not publicise for obvious reasons), which clears the memory, and attempts to reformat it and in the process, highlights ANY bad blocks, which can be 'sidelined' as not useable, this can be applied to the D and D+ Controllers and useful to indicate whether the memory chips or going bad or not and as the 1KA and 1RA boards are now at end of manufactured life, then finding replacements maybe difficult to obtain.

    I would definitely keep my eye out for reoccurrence of this in the future...………..:top:

  • The other odd ball quirks were "missing" programs that no one deleted. When programs were found missing we would reload a backup. The missing files would be there for a minute or two, and then be blown away again with no one actually deleting them. Kawasaki recommended performing an initialization, no one in my facility had ever done one before so we had a mix bag training day with Kawasaki on 12/7 and 12/14 to get my employees up to speed on that and some other basic functions. After the 12/7 training session in which a initialization occurred, we lost our output signal. We lost a whole shift of production due to that which lead me to create the original pc program. Don't you love how cyclic these thing can be sometimes? But yes we forsee more problems. Right now we are going to see if we can find a new cpu board, and then send this one out for repair. The Kawasaki tech told me they no longer make new ones. Worst case scenario we will have to replace the whole system and upgrade to a E series controller.

  • Yes, programs going missing, programs apparently accessing a variable, that doesn't exist in the program and programs being called from programs that don't exist, variables being in the wrong place, I remember I had a JOINT angle location stored in the program register once...….buggered everything up.

    I refer to it as the memory has gone soft, a kind of Robotic Alzheimer's.

    Trouble is, it may be cause issue in areas you are not currently dealing with, and with Kawasaki it is strongly spoken about, just reloading a previous backup in and it should return it to how it was.

    However, I think when you load in over the top, you are actually deleting/reload as you go along and I am pretty sure ANY exact match, is not skipped, but deleted and reloaded, therefore could possibly introduce issues.

    Instead you can use the LOAD/Q iteration, which provides a question before each section, this allows you to 'skip' areas during the load, thus leaving areas you are not intending to modify untouched.

    Sometimes the above method highlights the problem area.

    Alternatively you can try the SYSINIT/U, which should empty ALL the user data (programs, locations, reals, strings), but if there is a problem, then you know there is corruption in the User Data area.

    The quickest method is to carry out a full initialization (dipswitch 1 and 8 on) and completely emptying the controller of user data and put it into an unconfigured condition with default values loaded, then reloading the known backup.

    Either method, gives you a little more control of what you are loading in, but if there are problems at the hardware level (RAM IC's), obvious will not fix them.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now