Posts by TomTom

    I don't think you need that option. There's a way to do it with just Karel.

    I don't think you can change the DO directly but you can start a Karel program through HTTP that will change the DOs for you. You need to unlock Karel in Menu->Setup->HostComm->HTTP for this. Also you'll have to write the specific program yourself. I am quite sure there is a way to set a DO in Karel though.


    Take A look at this project https://github.com/ABC-iRobotics/fanuc-webcontrol.

    It's a WebInterface with which you can Jog a Fanuc Robot. The WebInterface works by starting Karel progs that change Flags on the Robot. Then they have a TP program that needs to be running at the same time that waits for those Flags. Once they are set the TP prog begins to move the Robot.

    Here's the JavaScript code that invokes their Karel program that then sets their Flags. You just need to send your HTTP GET request to the right URL.


    You can get something like this to work on Internet Explorer but I am not sure if it will work on the TeachPendant. As far as I know the TeachPendant itself can only run ancient JavaScript versions. In theory it should be possible as well as long as you are extra carefull with your JS code. Maybe the best way is to start by programming it for the TeachPendant and then exchange stuff with HTTP Get requests. Worst case you need two HTMLs, one for InternetExplorer and one for the TeachPendant.

    What kind of error? Also does it fail at GET_PREG_CMT or SET_SREG_CMT?


    I am using GET_PREG_CMT like this to ensure my PR's are named:

    Not mine but checkout https://github.com/ABC-iRobotics/fanuc-webcontrol

    It's a webpage that allows to "jog" a robot and execute programs though HTTP. Probably not production ready or safety rated so be careful but it does some interesting things.


    Their webmonitor.kl program returns a .json response when you send a http get request to <robotIP>/KAREL/WEBMONITOR. The json contains only the most recent error but you could modify it. This should work in all browsers and if your HMI supports HTTP then it should be doable.

    If navigate to "MENU->SETUP->HOST Comm" using the hardware TeachPendant you can change the password for each protocol(HTTP for the WebBrowser iPendant) but I don't think it shows the currently used passwords

    The exact alarm code whould help. Also what robot model are you using? I am assuming a six axis robot and you got a MOTN-023 error.


    Likely J4 and J6 are exactly parallel in the position where you want to move to and you are using a linear move. You could do:

    - teach that position differently

    - always move with joint moves from and to this position

    - use a Linear move with wrist joint

    - maybe the Singularity Avoidance option would help, I am not 100% sure though

    I tried that once as well. Couldn't get it to work sadly. The Fanuc documentation that I got seemed to contradict itself on the naming conventions for the forms. There is one convention specifiying two letters as language code and the other stating that it is four letters.


    I was using two letters for the language code when I posted my issue here on the forum. I think four letters got me a bit further later on.


    Let me know if you find out how. I'd still like to do something with this tbh.

    You can set your IO config to receive the results of the DCS. The concrete settings depend on which part of the DCS you need specifically.

    Rack 36 Slot 6 Start 1 in your DI for example will give you the results of the Cartesian Position Checks.

    Just as a general comment. If you set the disabling input of a zone to ON then the zone will be considered unsafe. In your case this means CPC[1] will be OFF as soon as SIR[2] is ON. It doesn't matter where the robot is at that moment. The robot will be able to move outside of your Zone though for as long as the disabling input is ON. This is working as intended.



    If I am reading everything correctly then what you currently have configured is this:

    1) DO[X]=OFF -> NSI[1]=OFF -> SIR[2]=ON -> CPC[1]=OFF -> SIR[1]=ON (Doesn't matter where the robot is, robot can move outside of zone)

    2.1) DO[X]=ON -> NSI[1]=ON -> SIR[2]=OFF, CPC[1]=OFF -> SIR[1]=ON (Robot outside of safezone, will trigger power-off stop)

    2.2) DO[X]=ON -> NSI[1]=ON -> SIR[2]=OFF, CPC[1]=ON -> SIR[1]=OFF (Robot inside of safezone)


    Is this what you wanted to do?

    The Macro menu allows you to execute a program once a certain signal turns on, e.g. a button on the HMI is pressed or a PLC is received. You find it when you press the "Menu" button on the teach pendant and then go to "Setup" and "Macro". It's similar to the condition monitor that Famous_Fella described but the condition monitor seems less restrictive. On the pic below you can see how I set the "REF_POS" program to UI:7 which is usually the "Home" signal. The other things(UK = TeachPendant button; SU = TeachPenant button + shift) are assignments to the blank buttons of the teach pendant to control for example the grippers. You could also set your homing programm to a button in this menu.




    Looks like both me and ps0f0r use custom programs to reach the home position. This offers complete control but can be tedious to program.


    What you described from Stäubli sounds more like what stare284 mentioned(I haven't tried those functions so I dunno).

    I always write a recovery program for each robot that traverses backwards though the position sequence. This I assign to UI7:Home under Menu->Setup->Macro. If the robot is not busy and all errors have been reset you can send UI:7 from the PLC to start it. You could also assign macros to certain buttons on the teach pendant there.

    I thought it was required but started to second guess myself when line 24 seemed to proof me wrong. Yeah maybe it's because after MESSAGE[] the line always ends, other commands have a ton of optional stuff.


    Glad it's working now, have a nice weekend :beerchug:

    Here's a Karel program that clears and writtes a tp programm called MY_FILE when you execute it.

    For some reason I need to put a blank line with just ";" in line 1 in every new TP program. Then I start writting and just start at line 1 again and continue incrementing my line number like normaly.


    I thought the ";" was required since it goes through the ASCII Upload option but it seems I was mistaken. Looks like it is optional..... sometimes... when I took it out of the first line that just writtes an empty line it didn't work. The MESSAGE[3] line works fine though.... I'd recommend adding it to every line, never gave me any problems atleast.


    Anyway hope that helps you getting started.


    PS. This doesn't work if the programm is currently selected or running.

    The alarm log is under Menu->Alarm->Alarm Log. Once your are there you can switch between the active alarms and an alarm history with F3. I don' t think the program you posted shows much.

Advertising from our partners