Change Configuration of a PR[] in Program

  • Hi guys,


    Hi need change a configuration of joints in a program, like we can make PR[10,4]=10; something like that but i can´t find information how I can change CONF: NUT to FUT in program... I kown i can chage it in TP when I define PR[]... But I need kown if it possible change it by program language!


    Thank´s in advance :)!

  • Create some setup PR's of all zeros for each config you want. Then set your PR = that setup PR in your program, and modify as needed.


    It is not a direct method but works. I also recommend having one set up as joint representation.


    Sent from my VS985 4G using Tapatalk

  • Hi HawkME,


    That is what im doing now, the problem is when you load a program to a new robot you need to configure that points in robot... I want do it in program...

  • You can also assign PRs to points in a program (e.g. PR[100]=P[1]), so you could make a program with some dummy points in it with different configurations.

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

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

  • in a PR the first 6 data are X, Y, Z, w, p, r the 7th data is the position config which is not directly accessible with TP language, nor by inderect addressing (PR[2,7] = [PR1,7]) but only with the use of Karel routine which doesn't really worth the effort. The best way is to make a point in the config you want and copy it in the PR before loading each of the 6 values of positions (XYZwpr).

  • Soo Far i use the Karel to initiate a config var like in the manual, but I didin't find how to push it on a XYZWPR var.

    I think i will be in obligation to translate into a position data type to use it.


    VAR

    config_var1, config_var2: CONFIG

    pos_var: POSITION

    seam_path: PATH

    i: INTEGER

    BEGIN

    config_var1 = pos_var.config_data

    config_var1 = config_var2

    config_var1.cfg_turn_no1 = 0

    IF pos_var.config_data.cfg_flip THEN...

    FOR i = 1 TO PATH_LEN(seam_path) DO

    seam_path[i].node_pos.config_data = config_var1

    ENDFOR


    In hope it will help you.

Advertising from our partners