Take piece to punch and stack

  • Hello


    KRC2 KSS 5.2.14 KR2210_L150


    I have a project to take a disk metal with magnetic tool punch the disk and stack the punched disk



    so i need to use 2 cicles "FOR"

    one cicle for take the disk and heigth Z decreasing dependig of the thickess of the disk

    and other cicle "FOR" increase Z height with the finished disk


    reading older post i thik the next code can be useful





    once finished 50 disk , make a Buzzer sound to take the disk with forklif



    any suggetions to the project ?



    Thanks

  • Place your Ad here!
  • Hello ,


    the probles was solved with the next code:



    just left configure I/O digitals ,sensors , activate magnetic tool, and add "Wait for" take / leave disk

    punching machine ready,disk taken TRUE, FALSE , etc


    was not possible to use the next:


    Code
    FOR Height = 10 TO 1 STEP -1
      LIN {X 100,Y 100, Z Height}
    ENDFOR


    LIN { X 100, Y 100 , Z HEIGHT}

    Was nos possible to use, i try many options to manipulate Z up/down

    ...

    Z=[I]

    Z=[HEIGTH]

    ....



    any advice for the code are accepted.





    Kind regards

  • of course not... aggregate is a collection of literals.


    aggregate is noted by use of curly braces.


    literal is an unnamed constant (also known as hardcoded value) and you were attempting to use "Height" which is a named value (either variable or named constant). those things don't mix, so one must use dot operator to manipulate specific element using something like this:

    Code
    DECL FRAME temp
    ;
    FOR Height = 10 TO 1 STEP -1
       temp = {X 100, Y 100, z 0, A 0, B 0, C 0}
       temp.Z = Height
       LIN temp
    ENDFOR

    or

    Code
    DECL FRAME temp
    ;
    FOR Height = 10 TO 1 STEP -1
       temp = $nullframe
       temp.X = 100
       temp.Y = 100
       temp.Z = Height   
       LIN temp
    ENDFOR

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • thanks for the info

    i ll try.


    the cicle FOR just work to decrease or increase no both , take or leave disk.

    the target is:



    take disk then (decrease Z)

    move to punt

    leave the disk punched then (increase Z)


    .......


    take disk then (decrease Z)

    move to punt

    leave the disk punched then (increase Z)

    .......




    so its neccessary drecrease Z an increase Z inside a loop

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

Advertising from our partners