Output after power off

  • Hello
    Can someone help me please with an information how to keep the digital output signals after power off?
    For example
    SIGNAL Selection $OUT[322] TO $OUT[329]


    Selection=50. I need this number after restart. Right now it's resets to 0.
    Or just a single output like $OUT[20] =true.


    It's there a setting to reload in EXT the last program and pointer position after a restart? (like main (or subprogram) called from sps)


    Thank you!

  • in $CONFIG.DAT declare and initialize variable such as

    Code
    DECL INT save_selection = 0






    then in SPS add something like:





    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Hello guys,

    I searched lots of about my problem and this one is look similar.(but reversed)

    We have a KRC2 KUKA robot with profibus communication between turck HMI PLC.(And we have a profinet communication between HMI visualization program and PLC program) The full program not finished yet. Everything worked fine until yesterday. We ha some power outage and thefore the kuka switched to hibernate. After the power came back some signals get stuck(retained). I switched off the PLC(with HMI) and IOs refreshed. Everythings worked fine.. Interrupt on when input arrived, vacuum on etc. I pressed the emergency stop and gripper off and go away for 20 minute. I came back and try to continue the process. Gripper doesn't response, some IOs get stuck when i moved the robot from there etc.(IOS don't refresing) We never had this problem before and i don't know what happened. We checked the batteries and it's working full properly(adequate voltage and charging). I thought it's battery problem and kuka can't reach the memory properly because of low voltage or something, but we refute is, when we test those. Summed up, sometimes we getting stuck IOs, when the system work "properly" and sometimes we get some signals from HMI, but don't get signals from sensors.(i connect my PC to hmi PLC and everything worked properly, but in the kuka pendant-controller some signals don't appears) IT IS SO WEIRD....


    Can someone help us please?


    Thanks in advace,

    Máté

  • I noticed i forgot someting...
    I don't get any message in the user message part, which would mention this problem(like profibus error). After power outage i restarted the system and i got a QUIT Local Protective STOP (QE) (Message number:3024) and an Under voltage A1 "error". Can it cause problem?

    Moreover, i got an information message, which says error on reading, driver: CP561DRV(number 1033).

    I think this is just mentioned, cause of i restarted the system!?

    As i said i got stucking IOs sometimes, even i did nothing.(just walk away for 20 minutes and nobody touched the pendant)

  • Moreover, i got an information message, which says error on reading, driver: CP561DRV(number 1033).

    That's your problem. That means that the Profibus driver is not running, for some reason, and as long as it's not running, none of the signals going through that driver will update.

  • Power outage could have caused damage to one of the components, or possibly just made the bus falter.


    Are the errors persistent, or can you clear them using Acknowledge All?


    If the errors persist, then you may have a hardware failure.

  • ... sometimes we getting stuck IOs, when the system work "properly" and sometimes we get some signals from HMI, but don't get signals from sensors.(i connect my PC to hmi PLC and everything worked properly, but in the kuka pendant-controller some signals don't appears) IT IS SO WEIRD...

    that is a very common experience when bus is wired by someone not qualified. so check wiring and terminations.


    when wired and configured correctly, fieldbuses are extremely robust and reliable.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • that is a very common experience when bus is wired by someone not qualified. so check wiring and terminations

    The wireing and the configuration was completely reliable until last week. It was working about for 5months…so it doesn’t make sense. I think the KUKA worked perfectly(when power outage happened)…after power outage the system started hibernating.(i think this can’t cause problem like this, because it did what it have to)


    Are the errors persistent, or can you clear them using Acknowledge All

    I can clear it with ackn, and i can start moving with the robot(with some stuckked IOs and some of them is working correctly)

  • i see. since it was working for some time, chances are wiring is ok (maybe).

    another some file got corrupt if powered down abruptly (dead batteries, pc power connector in poor shape). you mention power outage so the batteries are prime suspect and resulting file corruption.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Thanks for your reply panic mode!


    After these poweroutage, I asked our electricians to check the condition of the batteries. We caused a power failure and then measured the battery voltage. In their opinion, when the power was turned off and the system began to hibernate, the meter showed adequate voltage (between 12 and 13 volts).


    you mention power outage so the batteries are prime suspect and resulting file corruption.

    Can is ask please what do you mean by file corruption?
    Can the IO card be damaged in the event of a power failure?(if the batteries are appropriate(undamaged))


    Thanks for your answer in advance!


    Mate

  • Are the errors persistent, or can you clear them using Acknowledge All?

    There it is…

    I tried it earlier in T1-T2 and i could ackn every single error message, but in Automatic external i could not!(i mean the plc CONF_MESS could not)

    If the errors persist, then you may have a hardware failure.

    What can i do with this?

    In T1 i could use sometimes the IOs and i could use the vacuum gripper with press the appropriate button!


    It’s weird.. sometime good sometimes bad…sometimes error field bus🤷🏼‍♂️

  • Reset IO driver

    Given it's been working for months it should not be the case, but... sometimes, if any of the bus participants get powered off, you need to reinitialize the IO driver.


    EXPERT mode >> Configuration >> IO >> IO driver >> Reset driver.


    NOTICE: Names come from memory, not in front of any robot now.


    During commissioning is not that strange needing this, but after this amount of time working... maybe a file corruption is the cause (as panic mode stated).


    When you get this undesired behavior, check if resetting the driver helps.


    Notes on file corruption

    A robot has a computer, that computer comes with a Microsoft Windows Operating System (OS), that OS (as it happens in any computer with a modern OS) needs to power off gracefully to avoid corrupting files.


    A simple example of file corruption would be:

    1. OS opens a file and start writing on it.

    2. Power outage happens.

    3. File stays open with half the modifications done.

    4. After power up the computer that file can be useless.


    To recover from that a reinstall of the KSS or even Windows would solve it. But it's complicated to recommend this without more info.


    Hope this helps.

  • Thanks for your help robotecnik !


    I just would like to know what happen if i just reconfigure I/O driver…and it was only 5 sec.

    After i tried to start aut ext, it is started working appropriate🤷🏼‍♂️😅


    Thank you!

    Máté

  • Can is ask please what do you mean by file corruption?
    Can the IO card be damaged in the event of a power failure?(if the batteries are appropriate(undamaged))


    KRC uses PC to control the robot. that PC has hard drive. on that drive are many files used by KSS. when robot is powered up, thousands of files are open. if PC looses power unexpectedly, files cannot be closed properly, files being written will not be written. this is one form of data corruption. next time you boot up, PC will not be able to read some of the files and you can get all kind of crazy scenarios and messages.


    normally when controller is switched off, batteries supply power for several minutes so that PC can finish writing any open files. if the batteries are in bad shape, or have lose connection or are otherwise prevented from doing their job (fuse blows, lose X961 connector etc.) then you ARE getting files corrupted every time KRC powers down.


    this is why one need to make regular backups - while everything is still ok. there are just too many files involved and selectively restoring or recovering one at a time is just not possible.


    you NEED clean and good backups of different forms. as a rule of thumb, consider HDD image backup once a year, and archive every week or so. even better, do not use single HDD. KUKA recommends replacing them every 5 years for a reason. get HDD image and restore it to a spare HDD. then swap the drives to test if freshly created backup really works (or just leave it in there until next backup + swap).


    everything CAN be damaged in an event of power failure. everything CAN fail for number of reasons, including age, incorrect or failing connections, transients, changes in voltage, changes in environment (temperature, dust, vibrations...). nothing is forever...


    the idea when troubleshooting is to narrow down problem from all possible things that could fail to one specific suspect (or maybe few). when problems could be either software or hardware related, software problems are EASY to identify or fix by using good backup - if you have one.


    about batteries...

    battery voltage is a CONVENIENT but it is NOT a very good indicator of battery condition.

    a 12V battery may show 12V voltage and still be dead.

    to properly evaluate battery condition, performance UNDER LOAD must be observed.


    example1:

    battery shows 12V with no load, you connect 10 Ohm power resistor or car lightbulb as a load and voltage may drop to 6V. clear indicator that battery is dead.


    example2:battery shows 13.2V with no load, you connect 10 Ohm power resistor or car lightbulb as a load and voltage slowly decreases. in 30 seconds it drops to 10V. clear indicator that battery is dead (too high internal resistance). this is not enough of time for PC to close all files and prevent corruption. also lead batteries are not good once they drop below 11V. if voltage drops below that, KRC will not even try to charge them. this is t prevent wasting time with dead batteries as well as protect against wrong polarity for example.


    example3:

    battery shows 11.6V with no load, you connect 10 Ohm power resistor or car lightbulb as a load and voltage slowly decreases. in 30 seconds it drops to 11.5V. looks like a good battery to me, just needs charging to get that voltage up.



    so keep your batteries and regular backups in order. plan for it, setup reminders.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • I tried it earlier in T1-T2 and i could ackn every single error message, but in Automatic external i could not!(i mean the plc CONF_MESS could not)

    Well, certain errors are only allowed to be cleared in Teach mode. Collision errors being the foremost example. That's what the "ACTIVE Status Required" message means. That message could be clearer....

Advertising from our partners