Karel Systax error

  • Hello,


    I need help,


    i want to create a program who gives me a status of the devices connected to my robot, i can use this variable:
    $DN_DEV_LIST
    is made of 80 Data types of this parameter DN_DV_DATA_T and inside of this data type is the variable that i need ($DN_DV_STAT).


    this is my program:


    IF $DN_DEV_LIST[1].$DN_DV_STAT <> 2 JMP LBL [2]
    JMPLBL[1]
    LBL[ 2]
    R[253]=1



    but when i try to run this program on the BG Logic a systax error in the rung of the variable appears.


    i dont now where the mistake is.

  • You can only use mixed logic IF statements in background logic programs.


    Your IF statement needs to look like this:

    Code
    :  IF ($DN_DEV_LIST[1].$DN_DV_STAT<>2), JMP LBL[2] ;

    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