Update robtarget in a record

Hello,

Is it possible to update a position from the flexpendant that exist in a record?
Tagged:

Answers

  • This is from the technical reference manual - Rapid overview:
    A specific component of a record data can be accessed by using the name of that component, for example pos1.x := 300; assignment of the x-component of pos1.
    Now if you mean by modposing the position with the pendant, I don't know. 
    Lee Justice
  • lemster68 said:
    This is from the technical reference manual - Rapid overview:
    A specific component of a record data can be accessed by using the name of that component, for example pos1.x := 300; assignment of the x-component of pos1.
    Now if you mean by modposing the position with the pendant, I don't know. 
    I mean modposing the position. When I try to do it in the virtual flexpendant, an error pops up and says "The given source position is illegal for the operation". I'm also using correct wobj and tool when attempting this.

    I feel like this should work because you can modpos a robtarget in an array atleast.
  • Is the robtarget in question constant?
    Lee Justice
  • lemster68 said:
    Is the robtarget in question constant?
    I have tried both constant and persistent
  • How about in a routine as an INOUT parameter?
    Lee Justice
  • Hey ...
    I believe that what you are trying to do is something similar to wanting to modify a position obtained through an Offs(pp,0,0,0) routine. This is not possible.
    The flexpendant 'modpos' function expects to receive a robtarget and not 'RECORD.robtarget' or 'Offs(robtarget, x,y,z)'.
    Good job.
  • lemster68 said:
    How about in a routine as an INOUT parameter?
    I have tried it aswell
  • mandolas said:
    Hey ...
    I believe that what you are trying to do is something similar to wanting to modify a position obtained through an Offs(pp,0,0,0) routine. This is not possible.
    The flexpendant 'modpos' function expects to receive a robtarget and not 'RECORD.robtarget' or 'Offs(robtarget, x,y,z)'.
    Good job.
    That may be the case but the "Update Position" button should not light up when you highlight the robtarget, it does not light up when you mark a offs/reltool.
  • mandolas
    mandolas
    edited February 12
    @Burro I agree with your statement, however, as far as I can remember, it has always been this way.

    @lemster68's idea can partially solve your problem...

    Some time ago, I wanted the user to be able to modify positions without interacting with or changing the code. So I 'removed' the user's permissions to edit RAPID.
    In a procedure, I passed a robtarget array (INOUT) and, at each iteration, asked the user if they wanted to save the position. This way, they could move the robot (using the joystick) to the desired position and respond YES to save it.

    In this routine, I used CRobT() to get the current position. Of course, there are some limitations, such as the Tool and Work Object used to store this position.

    Good work.

    Post edited by mandolas on
  • For sure it would have to be persistent or VAR, constant would not work at all.
    Lee Justice
  • mandolas
    mandolas
    edited February 12
    lemster68 said:
    For sure it would have to be persistent or VAR, constant would not work at all.
    Exactly. In my case PERS