Karel question

  • Hi

    I initialized the variables, still does not work

    I had sothing similar running for testing, then I "clean" the code and it's not working, and it;s so simple

    PROGRAM PRcomment


    status: INTEGER

    pos_cmt: STRING[30]


    register_no :INTEGER

    real_flag :BOOLEAN

    int_value :INTEGER

    real_value :REAL

    -- SR[1] will manage the comments names for the registers






    int_value =1

    real_value =1

    pos_cmt = 'aaa'

    -- Read value from register 3, flag it if it is integer or real


    -- Read comment of an specific position register

    GET_PREG_CMT(int_value, pos_cmt, status)

    -- Write comment from PR to an specific string register


    END PRcomment

    Retired but still helping

  • Odd. I compiled your code, and it works fine on my machine. I tested it with your values and a few others.

    Maybe try deleting your code and the vr file it leaves, then recompile and see if it works.

    Check out the Fanuc position converter I wrote here!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now