Posts by toro

    Fubini
    Well, we have qualified people setting up the robots and doing all the safety things etc on site... i am more like a backend programmer. However i don't want to go down that road of discussing liability here ...



    Quote


    Is rotation a rotation about the tool direction axis and a swivel a rotation about any other axis that is perpendicular to the tool?
    As in https://en.wikipedia.org/wiki/…a/File:3D_Spherical_2.svg swivel is a change in phi and rotation a change in theta where the Z-direction in the image is the tool direction axis (which is x by default in kuka)?


    Anyone can say anything to the swivel vs. rotation thing?

    Thanks, fubini for pointing that differences out.



    If you are Computer scientist it is probably easy to study bas.src which basically sets all necessary variable in case of inline form programming. Or read expert programming Manual (System Integrators Manual). These Topics are covered in there. Also the Basic programming courses offered by KUKA cover these.


    I have the integrators manual and i have read it from top to bottom with focus on movement programming and the whole expert chapter.
    Everyone seems to assume that information is covered there (i would assume so myself), however IT IS NOT :mad: (prove me wrong). $ACC or $VEL is not even mentioned anywhere but in 2-3 examples codes where its functionality is not explained.


    Also the system variables manual rather lists variables and does not explain their function in detail.


    Unfortunately my company is not willing to pay for training courses.


    Do you have system variable manual for KSS 8.3 and 8.4?


    Yes. But it is not in there. E.g. it says $ACC "contains the cartesian acceleration". It does not say how this relates to $ACC_AXIS, PTP or LIN. For example, when performing PTP the TCP moves and the axes move. So theoretically both, $ACC_AXIS and $ACC.CP values could be relevant to a PTP motion. Neither does it say anything about wether these variables must, can or should be used to read or set the acceleration / velocity or whether there might be some other, better command.


    Please be patient with me, i am only a computer scientist knowing math, but the terminology used seems slightly different for some things in robotics...




    Take a pencil, keep it vertical and roll it between your palms. That is "rotation".(note axis of rotation is fixed)


    Keep pencil vertically on a table and then... let go and watch it fall. It can fall in any direction. This is "swivel".


    Okay i do not quite understand your explanation. Is rotation a rotation about the tool direction axis and a swivel a rotation about any other axis that is perpendicular to the tool?
    As in https://en.wikipedia.org/wiki/…a/File:3D_Spherical_2.svg swivel is a change in phi and rotation a change in theta where the Z-direction in the image is the tool direction axis (which is x by default in kuka)?

    After a lot of reading it is still not entirely clear to me how to set acceleration and velocity for CP or PTP moves (KRC4, 8.3.32).


    So far i found that $ACC.CP defines the TCP acceleration and axis-wise accelerations seem to be set with $ACC_AXIS[1...6] in deg/sec.
    Likewise $VEL.CP and $VEL[1...6] define the respective velocities.


    (1)
    How do the values in $ACC and $ACC_AXIS relate?
    Is $ACC ($VEL) used for CP moves and $ACC_AXIS ($VEL_AXIS) for PTP moves?


    (2)
    If my assumption for (1) is correct: can a definitive ( e.g. m/s or m/s²) acceleration be set for PTP moves?


    (3)
    Am i correct that just writing to these values à la "$VEL.CP = 1.2" is a valid way to change acceleration or velocity for the next LIN/PTP?


    (3)
    What is the difference between the "swivel" and "rotation" values ORI1/2 in $ACC and $VEL?
    Or: What is the difference between swivel and rotation? Both translates to the same in german with a standard web-translator :stupid:

    Hi everyone.
    This is just a solution to "How to send a FRAME with EthernetKRL" which i and also others seem to have stumbled upon.


    E.g. SkyeFire wrote some time ago:

    Quote


    As an aside, as part of this same program, I was trying to send a FRAME variable across, but the EKI_SETFRAME didn't seem to work properly. Even though the variable type in the XML config was Type="FRAME", the EKI_SETFRAME kept failing with an "element not found" error (Status.MSG_NO=16). But when I broke up the Frame into 6 separate Reals, and sent them across using SETREAL and GETREAL, using an identical data structure, everything worked perfectly. Also puzzling.


    After contacting KUKA support it turns out the docs are not complete here. :waffen100:


    The solution:


    (1)
    In the <SEND> <XML> structure in the XML-config file for EthernetKRL connections no TYPE should be given as opposed to the Tags in the <RECEIVE> section, i.e.

    Code
    <ELEMENT Tag="mygroup/myInt" Type="INT"/>


    should read

    Code
    <ELEMENT Tag="mygroup/myInt"/>


    (2)
    When specifying a FRAME one MUST specify XYZABC as attributes:

    Code
    <SEND><XML>
    <ELEMENT Tag="mygroup/myFrame/@X"/>
    <ELEMENT Tag="mygroup/myFrame/@Y"/>
    <ELEMENT Tag="mygroup/myFrame/@Z"/>
    <ELEMENT Tag="mygroup/myFrame/@A"/>
    <ELEMENT Tag="mygroup/myFrame/@B"/>
    <ELEMENT Tag="mygroup/myFrame/@C"/>
    </XML></SEND>


    and THEN

    Code
    EKI_SetFrame("mychannelname", "mygroup/myFrame", {X 1, Y 2, Z 3, A 4, B 5, C 6})


    SetFrame funtion then disassembles the FRAME and distributes its values to the xyzabc buffers...

    The title gets it... in bas(#BASE, n) BASE_CORR_ON and M_BASE_COR_ON are checked and if any of them is true the frames BASE_CORR and M_BAS_CORR are applied before and after the normal BASE_DATA transformation...


    Any idea in what situation these corrections are used?


    The backgroud is that i would like to set BASE_DATA[n] to some computed FRAME myFrame and i do not know if i have to deal with BASE_CORR and M_BAS_CORR? :hmmm:
    (e.g. when i want my base_data[3] to be "myFrame" setting base_data[3]=myFrame only works when the corrections are off or zero)

    panic mode

    Quote

    sorry to hijack the topic but i need to ask where is this going and what is supposed outcome?


    Well, the supposed (and actual) outcome is a knowledge transfer regarding what the capabilities and features of KRL are and what i can expect of it. So far SkyeFires, hermanns and your explanations have been very helpful and gave me some insight in why things are as they are.


    Quote

    i just don't see a point in debate like this... it will not change anything about how KRL works or what it can or cannot do.


    No, it won't (unless of course some KRL core programmer reading this catches an idea). However, you wouldn't tell a school child not to ask how to solve an equation because it does not change the way math works... :icon_wink:



    SkyeFire

    Quote


    In industry, the "source code" has to be exposed and editable by the end user on the shop floor (like an IDE locked in debug mode), and using a compile-and-run sequence still isn't practical for the majority of use cases.


    Yes, but... , the majority of use cases could be nice-3D-visual programming with VR support, but this will stay a too big a leap forever if everyone is afraid of modernization as things are sufficient for the current use cases... (oversimplification, i know)

    Quote

    the finer details of memory management (which are handled in an idiot-proofed fashion by the OS)


    ... just not computer-scientist-proof :icon_wink:


    I don't think there is a wider variety of memory control in KRL than in C/C++. For example, in C/C++, variables can also be qualified as volatile (can change any time due to an external source, e.g. for Input Signals) or const. Also for remote assistence in C++ you can do a core dump, basically writing the state of everything to a file that can be downloaded and opened in a debugger to be inspected. The advantage is that the source files themselves are never touched - which at least i find confusing and error prone (never can be too sure during development if you have a clean start or a start from a previous erroneous state)). However i see why the KRL-way may seem more reasonable to a non-(C/C++)-programmer.

    Okay, i just checked that for myself... indeed the dat file is changed. I am not sure how to feel about that. Creepy that your actually hand-written code may be changed during testing :panic: :panic: :panic:. (That also explains why WorkVisual tells me that some files changed all the time...)


    I think i want to make everything in DAT files const now. Or at least never directly initialize anything and instead always use an init procedure at module startup -- i prefer a clean start :winking_face:


    Anyway thanks for pointing that out. :merci:

    First of all thank you very much for the extensive explanations to both of you -- they even answered two questions that just came up :beerchug:



    Regarding the variable scope and retention: is there any free or "limited cost" resource (excluding n-thousand-€ Kuka trainigs), i.e. book or website or similar that describes such basic things for KRL or robot controllers in general? I don't like bothering you all the time with things that must be basic for you ...


    ... but in lack of any good resource just now i'll give it one more try :icon_rolleyes:

    Quote

    Volatility is controlled by whether the DECL line includes an "={value}" or not -- if not, the variable is not retained. If it does, then the value is retained forever, and the .DAT file is actually updated every time the variable value changes. This means that a backup of the robot includes the values of these 'pre-initialized' .DAT variables, as they were the moment the backup was made.


    Does that mean that when I e.g. write "DECL INT myInt = 42" in a .DAT file and then run my module on the robot interpreter and some code changes myInt to 35 it will be 35 from the beginning the next time i run the module? Even if the module was aborted/reset/restarted? And the .DAT file is changed accordingly? What do you mean by "forever"? Sounds very strange to a c++ man ... (i know things might be different here :winking_face: )

    As a (c++) programmer i know what the difference between declaration and initialization is. But for most languages i know memory is reserved for every struct member upon creation of a struct as a whole. So, without explicit initialization of each member i can access all members - although there might be some random value in there. The fact that pose.X is does not exist in KRL until assign a value to it is different (at least in my common understanding of structs).


    When i do not think about this and fill all poses with the current position that would not be that safe, since my current position is perhaps not anywhere near the path received via ethernet and later going from any position to where i am currently is literally a bad "move". (dont want someone else to crush things accidentally )


    The perhaps better alternative would be to do

    Code
    E6POS p
    p.T = some value ;initializes p
    FOR j = 1 TO n
       myPoses[j] = p
    ENDFOR


    That way, accidentally LIN-moving to myPoses[j] would not move the robot, since abcxyz and e1..e6 are left untouched, right?

    I suppose it is not allowed to have to virtual controllers with overlapping subnets. In your initial config


    Controller (virtual5)
    IP: 172.31.1.147
    Subnet Mask: 255.255.0.0


    RSI (virtual6)
    IP: 172.31.2.147
    Subnet Mask: 255.255.255.0


    the subnet-mask of your two controllers are not mutually exclusive.


    That is, controller "virtual5" is used to send all data belonging to 172.31.*.* (due to the subnet mask 255.255.0.0) and "virtual6" is used to communicate to IPs in the range 172.31.2.* (due to subnet-mask 255.255.255.0).
    This way, if RSI wants to connect it may first decide that an 172.31.2.X address matches the virtual5-subnet and not send it through the RSI-Adapter, but the other one. Your ping would not be disturbed by this, because both adapters propably would answer it.

    Okay, i verified this now. Thanks for your input.


    One question that remains is if it is somehow possible to reset an E6POS (or even better an array of E6POSes) to its uninitialized state?


    This would be an additional safeguard in a situation where i LIN' through a list of 100 poses, fill this list again with say 50 poses and then only want to LIN' through the first 50. In case i had reset all poses to uninitialized state after doing the 100 poses (and before filling in the 50 new ones) the robot would stop when accidentaly moving to the 51th or another pose by (software)accident...


    Or can someone propose a good idea how to handle this with maximum safety (besides storing the number of points to move through, which is of course done)?

    Thanks for the quick replies.


    Q4:
    So are you telling me that if i do "myPoses[j].X = 3", then "myPoses[j].Y,Z,A,B,C..." stay uninitialized and that a "LIN myPoses[j]" IN THIS CASE equals "LIN {X 3}" and leaves Y,Z,A,B,C,... as they were?
    (Maybe i think to c++ here...)



    Q5:
    If the above is correct, then how can i "uninitialize" myPoses[j].X again if i want to specify only Y in the next run (doing some other path)?`

    Code
    E6POS p
    FOR j=1 TO n
       myPoses[j] = p
    ENDFOR


    ?



    SkyeFire:
    Thanks for the explanations with integrated and not integrated axes.
    Am i right that in any case the xyzabc are interpreted relative to whatever $BASE ( regardless of integrated or not integrated external axis)?
    Only if the axis is integrated, the inverse kinematics work via the moving robroot ($ROBROOT_C) and if not they work via the world-fix $ROBROOT and are potentially unable to come up with an axis solution (after 3meters...)?

    Hi everyone,


    i am relatively new to Kuka and i am trying to develop a system where poses are sent to a KR C4 (8.3.x) via Ethernet, stored as FRAME/POS/E6POS/AXIS or E6AXIS -arrays and processed later (LIN, PTP).
    Let's say i use an array E6POS myPoses[1000] to store poses. I can then populate them by setting X,Y,Z,A,B,C,E1...E6,S,T via


    Code
    myPoses[j].X = myX
    myPoses[j].Y = myY
    ...
    myPoses[j].T = myT


    Then, i can do

    Code
    PTP myPoses[j]

    to move along my poses.


    Question 1:
    Now, what if i do not know S,T or do not want to specify some of the external axes?
    I know i can leave parameters out in "immediate mode", i.e. "PTP {X 3.4, Y 4.2}", but if i have the myPoses struct and fill it first, i suppose "myPoses[j].Z" is predefined and exists in any case - wheter i explicitly do "myPoses[j].Z=..." or not - right?



    Question 2:
    Since i do not have an external axis here to test this - when i do "LIN {X 1, Y 2, Z 3, A 4, B 5, C 6, E1 20}" does that mean "go to the xyzabc in #BASE and ensure that E1==20"? So this only works if xyzabc is reachable from E1==20?



    Question 3:
    Is "LIN {X myPose.X, Y myPose.Y}" indeed impossible? Cannot use variables here, only literals? Then how can i "LIN" to a "variable"?



    Any :help: appreciated here ...

Advertising from our partners