iPendant Customization -- HTML pages in the pendant browser

  • Hi, all, it's me again. What? No, don't run away! :D


    So, I've been asking a lot of questions about user interfaces on R30iBs lately. This is because I'm a Fanuc n00b, and been assigned to (along with everything else) come up with an "HMI" for a new Fanuc, for a customer who needs a really simple, never-touch-the-pendant interface. But it also needs to be cheap, and put together quickly, b/c this project has a very... "compressed"... timeline.


    What we've settled on is using the iPendant Customization methods (no purchased options required), and create a "web" page on the robot that can be accessed from the pendant browswer, and presents some "buttons and lights" to the operator.


    Of course, I'm not just a Fanuc n00b, I'm also a novice at "web stuff" -- html, javascript, Ajax controls, etc. And just to ice the cake, the bulk of the iPendant Customization manual seems to assume that the robot has KAREL, and that whoever is reading it is already a KAREL expert. Well, I know even less KAREL than I do TP, and this robot doesn't have the KAREL option anyway. :uglyhammer2:


    Now for the good news: using a very simple sample HTML file that someone at Fanuc was kind enough to provide, I've been able to achieve a minimal proof-of-concept page -- once I put the STM file (Fanuc's HTML file extension) into my virtual robot's FR, I was able to add it to my Browser Favorites. The page has buttons that can actuate DOs, and I was able to pull "live" values from Registers and display them.


    What I need some help with is figuring out what I can and can't do without KAREL, and how (if?) I can modify the Ajax controls to get live control of aspects of the screen objects -- for example, if I want a button to change color, or blink, based on a Register value or a DO state, or how to post long messages when SRs are limited to 23 characters.


    And, mostly, the "this stuff isn't in the manual" things that (hopefully) someone here learned when they had to climb this learning curve, and are (hopefully) willing to share. :pfeif:

  • AD
  • Hoho, also it's me again.

    As already stated, I'm in the same damn position like you. Don't know much about html, javascript (absolutely nothing about ajax) and only small knowledge about Karel, but:

    I can read and understand manuals and forum entries :D. Did the job within two days ;).

    About the Karel thing: did you do a search for the system variable $KAREL_ENB? Most (all?) robots have Karel installed, but not activated, setting that variable to 1 will do the job.

    Karel isn't really that heavy to learn, it's easier than TP, because it's nearer to any other common program language like C,Basic,Pascal, and the things that will be needed aren't complicated.

    If you get Karel to work, this will be the easiest way. Give an answer here, and you will get help (a simple example with nearly all you need).

    jm2c

  • Hoho, also it's me again.

    :icon_eek::away:

    About the Karel thing: did you do a search for the system variable $KAREL_ENB? Most (all?) robots have Karel installed, but not activated, setting that variable to 1 will do the job.

    Is that legal? I thought KAREL was a paid option?


    I'm still waiting on my actual robot to arrive, but the virtual robot I'm using in the meantime in RoboGuide has $KAREL_ENB already set to 1. However, when I attempted to create a new KAREL file, I got a "compile" error message stating "this robot does not have KAREL."

  • Think if it works it will be legal, because for every option you need on fanuc robots they create a specific operating system. If you want to have one more option for a robot you already have, you will get a complete new image to load into the robot.

    I haven't had that much fanucs in the past (may be 15 or so, in whole life), but they all came with karel.

    If you created your virtual robot by yourself may be you haven't marked the option.

    I made mine from a backup of the actual real robot. On the order file for the robot there is no Karel listed, but it is installed.

  • The robot runs on KAREL internally. But when purchasing a robot, the KAREL option description says:

    "The KAREL option is required to run any customer KAREL programs in FANUC robots."

    So I'm not sure if you will be able to run your KAREL code or not.


    As far as what you can do without KAREL,

    You are limited to what is available through the ActiveX control settings in SharePoint.

    For example, if you create a Toggle Button and go into the properties in the Colors tab you can set a TRUE/FALSE color so that the control changes color when the DO is ON or OFF.

    For a Toggle Lamp control you can set a TRUE/FALSE image. You could use Background logic programs to add some functionality. For example, you could write a BG logic program to blink a FLAG when a DI is on, etc. Then you could link a Toggle Lamp control to that FLAG to make it blink.


    If you can use KAREL it will be helpful. It allows you to do things such as populate a DropDown list or display custom text messages.


    Update:

    Sorry, I was not clear. The old way to create custom STM files was to use Microsoft SharePoint Designer and to install Fanuc's iPendant Controls. It looks like the new version of the robot controllers don't use SharePoint anymore. So it may be similar, but I haven't used it yet.

    Edited once, last by jmd2777: Updated information. ().

  • Is that legal? I thought KAREL was a paid option?

    That used to work in the RJ3iB days, but Fanuc got wise (greedy) and made Karel a paid option on anything v7.50 and later.


    Are you using 2007 Office Sharepoint and the activeX controls to create your .stm pages? You get a bunch of options when you create your controls using that.

    when SRs are limited to 23 characters

    I tested on v9.10 in roboguide, and I was able insert 78 characters. More might fit, but that is where I stopped.

    Check out the Fanuc position converter I wrote here!

  • That used to work in the RJ3iB days, but Fanuc got wise (greedy) and made Karel a paid option on anything v7.50 and later.

    I have done it a month or two ago, on a robot with V9.10P/23, it works like a charm. May be I had luck and it's optional from 9.2 and later, or they made a mistake while creating the system.


    The full capabilities of activeX controls only work on the robot. Some things like f.e. setting an output, flag or register don't work on an external browser.


    Update:

    Sorry, I was not clear. The old way to create custom STM files was to use Microsoft SharePoint Designer and to install Fanuc's iPendant Controls. It looks like the new version of the robot controllers don't use SharePoint anymore. So it may be similar, but I haven't used it yet.

    Sharpoint Designer can still be used for creating the STM files. The robot controller doesn't use the program with which you created the STM file, you even can create the STM file with notepad, if you know what content they have to have (that will not be a good option but possible).

  • Are you using 2007 Office Sharepoint and the activeX controls to create your .stm pages? You get a bunch of options when you create your controls using that.

    No, I didn't know about Sharepoint -- I'll have to give that a try. The iPendant Customization manual talks about "Microsoft Impression," but that seems to be really, really outdated. So far I've just been using NotePad++.

    I tested on v9.10 in roboguide, and I was able insert 78 characters. More might fit, but that is where I stopped.

    Hm! I'll have to try that. Thanks!


    Regarding the KAREL option, we decided to just add KAREL to the robot and eliminate the question entirely.



    Now, for a related question: The iPendant Customization manual comes with a .zip package of example files. I've been trying one of the simplest ones, and ran into something odd. It displays properly on the RoboGuide pendant browser, but if I point an external browser (IE 11on my RG host) at the same STM page, the display is oddly broken. What's the most strange about this is that, if I look at the raw .STM source, it's almost all just plain HTML -- the only "exotic" bits are the Ajax controls. I wanted to use an external browser to help with debugging, using the Page Inspection tools.

    (I will note that only Internet Explorer will even display this much -- Chrome and Firefox only show blank pages. I haven't tried Edge).


  • As already stated most of the ipendant controls don't work on an external browser.

    Don't waste your time with that. I did that already, if you want to use an external browser you have to use the examples from chapter B3 (form example) and B4(ajax example) in the manual.

    In my manual there is an explicit reference to Sharepoint Designer, and a complete chapter about working with Sharepoint Designer.

    For me that works very good, for some things I also use Notepad++.

  • ... It displays properly on the RoboGuide pendant browser, but if I point an external browser (IE 11on my RG host) at the same STM page, the display is oddly broken. What's the most strange about this is that, if I look at the raw .STM source, it's almost all just plain HTML -- the only "exotic" bits are the Ajax controls. I wanted to use an external browser to help with debugging, using the Page Inspection tools....

    Haven't tried that example (I don't have that .zip file, only the documentation), but I think those buttons/leds are activeX controls (nothing to do with ajax).

    So you have to install those activeX controls on the computer where you use the IE (should already be done by installing RG).

    Unfortunately the newer browsers like Firefox don't support axtiveX controls anymore, and for IE you have to change security premissions for the robot homepage. But it's really not worth the time you have to spend.

  • Yeah, I'm mostly sticking to the pendant browser for now. Although I've had some good luck with the KAREL calls -- my STM page can "call" a KAREL program that returns an "HTML" file (really, just some ASCII written in the KAREL program) that my STM page can probably parse using "stock" javascript and CSS, and that works nicely with an external browser for debugging.


    My next issue is kind of silly -- I want to get some of the UOP signals (Fault, Fault Reset, etc) to/from my HMI, but there's no access DataType for the iPendant Controls to the UOPs (that I can find). So, I can access DI/Os easily enough (especially if I assign them to Rack 0, Slot 0), and KAREL variables and system variables. I'm trying to figure out how to get around the UOP issue. It seems I can probably circumvent most of the UIs by using KCL commands via URL, but so far, I haven't found a good way to get UOs out to the HMI. I've been combing the System Variables manual looking for variables that follow the state of particular UOPs, but so far, no dice.


    I'm guessing there's probably a trick to getting UOPs connected to DI/O (without actual external I/O network or hardware) that "everyone knows," but I haven't learned yet.

  • Oh, and just for posterity, this is the list of DataTypes for the iPendant Controls objects that I've compiled from the manual so far:


    =======================

    Data Types:

    100: Static

    101: NumReg

    102: System Variable

    103: KAREL Variable (this one requires a “/ProgramName/VariableName” in the DataIndex parameter)

    104: Dictionary Element

    105: Position Register

    106: KAREL Position

    107: Current Position

    108: Tool Frame

    109: Jog Frame

    110: User Frame

    112: String Register

    1: DI

    2: DO

    3: AI

    4: AO

    5: ?

    6: PI

    7: PO

    8: RI

    9: RO

    10: ?

    11: SI

    12: SOP

    13: ?

    14: TPIN

    15: TPOUT

    16: WI

    17: WO

    ========================

    • Helpful

    I'm trying to figure out how to get around the UOP issue.

    You can assign the UOPs to the Flags i.e. Rack 34 Slot 1, then you can access the UOP through the flags. Flags have DataType 35.

    You don't have to handle with the DataTypes if you use Sharepoint Designer you can change that with an "normal" property dialog after double clicking the activeX element.

    In RG some UOP don't work like on real robot, think this is neccessary for making the simulation work.

  • Yeah, I've been climbing that learning curve all day. It would appear that IMSTP, START, SFSPD, are all "hijacked" by RG.


    I did find a way to "hotwire" the UIs to DOs, and vice-versa, though. I mapped all the UIs to Rack 0, Slot 0, and mapped a matching-size block of DOs to the same location. Then I mapped all the UOs to Rack 0, Slot 0, but with a starting point high enough to avoid overlap with the UI mapping, and mapped a block of DIs to the same rack/slot/start.


    It works fine in RG, except for the signals that RG is forcing into certain states (it's odd, watching a DO follow the state of a UI, it feels backwards, but...). Fortunately, I was able to borrow a "real" RJ for a few minutes and try it out, and found that I could control all the UIs from the co-mapped DOs. So that's a load off my mind.


    I didn't know you could map directly to Flags, though -- I'll have to look at what I can do with that. And DataType 35 -- perfect, I can use that!

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