Posts by Ash

    I will mention there's one drawback to the ref-by-string in RAPID that I've run into personally. When coming cold to a large, complex software package that's not heavily documented and/or commented, the ref-strings make it much harder to track down the whole program flow. Because now instead of simply using RobotStudio's Find All References tool, or even doing a mass text search, you now have to do those and then track down every %"string"% occurrence in the entire robot, and backtrack, and then backtrack every line that sets a value to every one of those string variables.


    Makes for a lot more work trying to build a flowchart. When you think you've found every way a PROC can be called, there's always a chance of some call-by-string you didn't catch calling it. Based on my experience, even when I have that option, I tend to use it only sparingly, if at all.

    True, Definitely can see that. Although I want to add in all of this (maybe I didn’t actually say this) but I’ve only been talking about using strings to run background/system level stuff. Nothing that the average user needs to mess with. All of the front end stuff make as simple and readable as you can for sure. :thumbup:

    there is a pinned topic for feedback and suggestions to KUKA. feel free to add it to the list.

    Honestly I actually do like KRL though, it has definitely grown on me considering I was a hardcore ABB guy, and it is pretty functional for almost everything I want to do bar a few annoying bits like above haha, plus it always manages to surprise me with new random Variables for things, It’s like a mystery box :D KRL does feel more clunky though, like if you dig techie stuff then it’s great for poking around with things. ABB’s are exceptionally well thought out, but they don’t have so much Charm, possibly in part because of how well Documented they are. :/

    You wouldn’t have to make changes on a robot programmed by me 8o  :D

    Ahh you definitely don't have to do all of that to declare interrupts anymore in Rapid, Maybe they learnt from Kuka haha :/ Its literally the same as KRL now.


    As for the maintaining of things, wouldn't you agree that we should then be writing more step by step functions that operators can use with little knowledge? This is one area I would say Kuka is very weak on and also why i prefer strings, I wrote a commissioning module a while back in rapid, that basically gives you a graphical step by step guide to setting up a material handling system, all of the text was pulled from text files into arrays, the movements were from Nullframe basically so you would just touch up the Base via the interface and the rest is done. In rapid this is a very nice way to drive things.

    In KRL, usertech's are obscure and not all all accessible for the majority of people so you really lack a lot of the great benefits that rapid gives you through the almost "iPhone'esque appy" nature of them. Although i suppose you might be able to achieve the same through MsgDlg's? :/ :/

    I think 99% of software is bloated and inefficient. hardware makers are reaching some physical limits and cranking out new CPUs with more and more performance is harder and harder. big part of my computer resources are taken by OS alone, regardless what if anything is actually used.


    years ago one could get operating system with GUI on a floppy disk. today single image in a desktop theme take more space. then there are zillion of services for things nobody used in 10 years and yet they all are running all the time.

    Ok so that sounds actually rather damning of the industry to be honest, because I've often seen there are some very real limits to this field also, which probably accounts for the increasing amount of bloatware as people try to differentiate themselves or indeed expand themselves. But then what is the answer, where do we go from here? We can put everything in clouds, or on remote computers, but ultimately the control and sequences still need to drive a robot from a to b? Dunno mate. Beyond me :/ ^^


    Really what the industrial sector in this field needs is a single unified robot architecture and language then standardised software solutions that you MUST use, period. They give you all of the logic and frameworks for any solution, download it, install it, off you pop. In theory I shouldn't even be writing anything, if it weren't for the fact that a large majority of places end up with poor installs with bugs and holes in the logic because of how subjective it is.

    uh... no. that is very simplistic view that only looks at one aspect which is the end effect.


    there is a cost to everything. high cost and low cost are not the same.

    parsing strings to extract integer or boolean value may look fancy on the surface but it is more complex and takes more resources (CPU time, memory, interrupts...). all resources are limited. some platform may expose more that others but programmer still need to be aware of this.

    If you want to take it to that level sure, but in a world where processing power generally doubles every few years (for now) is processing power really going to be an argument in this, or should it be?

    Again its not about looking fancy, yours and skyefires examples yesterday were equally as fancy if you're not familiar with code structures? :)

    I wrote a fair amount of RAPID code years ago, and a lot of KRL code over the years, and there have been times in KRL when I would have liked to have RAPID's ability to access variables, or call subroutines, by string. But it was never a show-stopper. Similarly, I can't get the degree of fine-grained Interrupt handling in RAPID that KRL gives me, but there are still ways to get the job done.


    One thing to remember is that, for robot languages, the 1st, 2nd, and 3rd priority of the system engineers is always going to be safety, reliability, and motion control. Adding nice bells and whistles to the programming language (and all the testing involved to guarantee those new features have zero impact on the critical functions) is probably going to be down around 7th, maybe 9th.


    90% of the robot code out in the world is probably never going to need these features. And 90% of the remainder is probably generated by the robot manufacturers as purchasable option packages. Indirect referencing by string is obviously something that KUKA, Fanuc, Kawasaki, and Nachi never felt any market demand for -- ABB is, as far as I'm aware, the only brand that supports that feature.

    Intrigued by your assessment of fine grained interrupt handling? There are many more methods for error handling in ABB's I've found as opposed to Kuka's who seem more linear?


    Definitely agree about safety and reliability naturally, although motion is such a limited aspect of robots, it just seems to be the get out of jail free for people to funnel the majority into being pendant jockeys. Ultimately your code and sequence will be what enables motion to either work well or perform poorly.


    I personally think 90% of the world probably is just stuck with antiquated ways of industry thinking. Which is why little has moved on in 20+ years apart from faster processing and more gimmicks. ?(

    I wouldn't say that.

    It contradicts to ABB programing guideline.

    For me it doesn't make sense to access variables by a string that contents the name of the variable, never ever had the wish to do it. It makes programs unneccesary complicated.

    If you insist on accessing variables by a string during runtime, just use ABB robots ;) .

    JM2C

    Definitely doesn't contradict any Guidelines as far as I'm aware, and no, ill stick with creating whacky things in Kuka's and then whinging about why it doesn't work as it should haha ;) :P

    Fair enough, Swings and roundabouts, I guess I quite like stringy things haha

    But I would disagree with Hermann, I think strings actually can give you a more clear and concise dimension to things when used properly. Complexity is definitely in the eye of the beer holder :P

    Problem is there's a lot of grey and subjectivity in it. But also none at all. I hear what you're saying and agree, there are of course subtle differences. But i do genuinely believe even as you go more complicated the underlying sequences and events will be largely the same, almost to the point i would say yes there is "almost" a universal programming model. You have a main , some initialisation sequences and positional checks, a program number, some handshakes with ancillary equipment (or other robots) and an end of cycle. That accounts for probably 90% of any system. How you approach that within code is the subjective part, you still need to fire outputs for things, you still need to wait for inputs. So whether via strings or just $OUT, the end result is the same.


    I would say accessing variables by strings is fairly common practise in ABB's, certainly from a systems module point of view where the average user won't/shouldn't be tinkering. The only reason it doesn't seem as prevalent in Kuka's (Apart from elements in the MsgLib) is clearly because Kuka's aren't as advanced in this area. Which is fine, but that doesn't mean Kuka shouldn't develop this further because it is very useful if handled correctly in a proper sequence. :)

    No its not. First of all in KUKA there are two program pointers (advance run and main run) that come from the architecture underneath and requires some understanding of the underneath concepts. I am not talking about implementing features into the real-time controller kind of know how.


    Maybe this helps understanding my view: English and German can express totally the same information but use totally different rules on grammar. If what you are saying would be the case every language in the world would have the same grammar. Would ease things definetly but will never happen. 8o

    Basically the same in ABB's then, naturally they have an advance run also as they have to. So what you're saying is the syntax has a few quirks in the way its structured that means you have to code in a certain way? So with previous examples, ok in a Kuka you have STRUCS, In an ABB you have RECORD, In Kukas you have $ERR, In ABB's you have ERROR_RAISE, You have a motion pointer and and an advance run pointer. You move into routines and functions and shuffle bits around. If i am building a system in an ABB i will do it almost in the exact same way in a Kuka or fanuc only you have to alter minor details to accommodate for slight syntax differences (More so in fanucs i would say). Do the systems then communicate and operate the same? :S

    But not the underlying real-time controller archicture which will be totally different and this to some degree also must reflects on the programming language.

    But who really needs to use or understand the real time controller, apart from nerds 8o ? What relevance does it have to how you build an automation system? Does the robot have a program pointer that moves through various sequences and functions? That is common in all robots is it not? So how the code is structured or built is irrelevant because you have to fundamentally build the logic the same?

    Well this is as always a very personal view. Its whatever you are more used to is always the best one. Its the same as C/C++ is not Java and is not C# although they all serve similar purposes.


    Fubini

    Well sort of agree to disagree there, i think control logic and how you handle it will be the same for any robot? Nothing changes in how they physically perform, operate, or the kinds of things you need to handle. Its just you say tomayto, i say tomato.

    At the end of the day, programming in robots and PLCs is halfway between CNC machine G-Code, and 1970's-era pre-PC computer programming. Sadly, one must adjust one's standards of code snobbery to fit the programming environment. :bawling:

    See you say that, but I stand by the fact that half of the mystery with kuka's just doesn't exist in ABB's because of how user friendly and well documented the code is. Plus you mentioned about complexity, I've been around far more complex stuff in ABB's because, for example how you can build strings and jump the program pointer around in error handlers. Kuka's i can more believe are 1970s era/machine code, than ABB's. Fanuc's well i think they are a pascal derivative aren't they, depending on which of the languages you use there, TP, Karel? :)

    You could literally simply create an array of STRUCs, like so:

    Code
    STRUC MyStruc CHAR String[], INT InterrupNumber
    
    DECL MyStruc MyArray[10]
    MyArray[1] = {String[] "IntNum1", InterruptNumber 1}
    MyArray[2] = {String[] "IntNum2", InterruptNumber 2}

    And so on. Then, you could FOR loop through the array, using STRCOMP to compare MyArray[Counter].String[] to your desired string, then DO INTERRUPT ON MyArray[Counter].InterruptNumber when STRCOMP returns a TRUE.


    Although, honestly, I'm not sure why your program is so complex. You could literally write an entire subroutine that was just:

    Code
    DEF InterruptSet(InterruptNumber :IN)
        INTERRUPT ON InterrupNumber
    END

    Just what are you trying to accomplish with all that program complexity?

    Oh and just to add i actually did initially write the routine as suggested with a huge long switch case. But hey I'm a code snob. Shoot me ;)

    Ok nice, some interesting things for me to look at for sure :) Cheers buddy. :) :thumbup:

    You could literally simply create an array of STRUCs, like so:

    Code
    STRUC MyStruc CHAR String[], INT InterrupNumber
    
    DECL MyStruc MyArray[10]
    MyArray[1] = {String[] "IntNum1", InterruptNumber 1}
    MyArray[2] = {String[] "IntNum2", InterruptNumber 2}

    And so on. Then, you could FOR loop through the array, using STRCOMP to compare MyArray[Counter].String[] to your desired string, then DO INTERRUPT ON MyArray[Counter].InterruptNumber when STRCOMP returns a TRUE.


    Although, honestly, I'm not sure why your program is so complex. You could literally write an entire subroutine that was just:

    Code
    DEF InterruptSet(InterruptNumber :IN)
        INTERRUPT ON InterrupNumber
    END

    Just what are you trying to accomplish with all that program complexity?

    Ok fair doos and i get where you're coming from, does make sense. Although i didn't really think its that complex. Your method sounds as complex comparatively. Again, more so it wasn't strictly just about the setting interrupts it was the process of using string variables to structure things. Maybe its somewhat of my bias since i come from ABB's originally and their String handling is definitely a lot more on point. :thumbup: :)

    Did you read my post complete?

    It is not possible to read the value of an integer via the name of it during runtime.

    You should use arrays.

    Oh sorry yes i understand you now. Yes i had to find out the hard way about GET_SIG_INF (Which does work really nice). But its kind of frustrating, there must be a way somehow to read it? :/


    I wonder if it would be possible to have a dummy SIGNAL then using GET_SIG_INF you input the string, Output the value and then read it back again? :/ Sounds feasible haha


    How did you mean use arrays?

    well, if it works for you then all is good.

    but KUKA does not have normal string type, char arrays are used a substitute and there are various limitations with the data type itself and with associated functions. those tings are usually not mentioned or documented anywhere, or some of documentation is not even right, so it it a lot of trial and error involved...

    haha Don't i know it :D ;( ;( ;(

    There are other ways to achieve this by the way, i am aware, BUT its more the principle I'm trying to establish as doing this stuff via string arrays is bloody useful.