System variable for active payload ?

  • Hello,


    I am looking for the system variable for active payload.. I can't find anything in the documentation..


    I found $plst_updnum[1] and $plst_parnum[1] but they are write protected so I can't change the value with these variables.. I am looking for a writable variable, can you help me please?

    Edited once, last by CPh ().

  • You can write to write protected system variables with a tp program. Just use the mixed logic command to do it.


    eg:


    1: $PLST_PARNUM[1]=(3) ;


    However you would normally use the PAYLOAD[...] command to set the payload. What are you trying to achieve?

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • Great it works! Thank you for your help!
    What is the difference between plst_parnum and udpnum? I don't find it in the doc..


    I send a text command to the robot from my computer, the text command is read by KAREL
    For example the command: R[1] = 10, R[2] = 29, run SETTOOL will set R[1] and R[2] to resp. 10 and 1 and then will call the TP program SETTOOL


    In SETTOOL I did:

    Code
    PAYLOAD[R[1]]
    UTOOL_NUM=R[2]


    But it did not work... in fact it generates error INTP-263 for the payload and INTP-303 for the utool.


    But, with the same text command it works perfectly with:

    Code
    $PLST_PARNUM[1]=R[1]
    $MNUTOOLNUM[1]=R[2]


    I don't understand why.. do you have an idea why the behavior is different?

  • The only thing I can think of is that Karel is setting the registers as reals, and the tp commands do not like that. Make sure your Karel code is explicitly setting the registers as integers.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

Advertising from our partners