Indirect access of system variables


  • TP programming. I've got a customer that requires I not use Karel.
    I want to read the reference positions I've set up and write them to PR's. I want to access R[21] = $RefPos1[R[20]].PerchPos[R[19]]


    Anyone got an idea?


    Not sure about using indirection (R[20] & R[19]) but if you can, R19 will have to go from 1-8 and the values returned will be that joint's position in radians.

  • As far as I can tell, Fanuc TP doesn't allow you to read system vars indirectly. I was able to build a system var string out of string subsets and registers, and get that into a string register using arguments, but there doesn't appear to be a way to get TP to indirectly read a system var from a string register.


    I think your only option will be to create a big lookup table of every system var combo you need to look at. It will be ugly, but I think it is the only way to make it work.

    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