BGLOGIC code questions

  • Dear friends please help me to solve this tasks. Thanks a lot for helping


    1. Write BG LOGIC program which, when changing the input state DI [1] from OFF to ON, will increase the register value R [1] by 1.


    2. Write a program that would be used to measure the stack height of the inserts. A sensor attached to RI [1] is mounted on the robot head, the robot moves past the stack and detects the signal from the sensor, saving the current robot height, and then the robot points to the saved TCP altitude.


    3.Write a program for stacking cartons on a pallet. A robot with a 1400mm conveyor takes two cartons and places it on a pallet lying on a 400mm conveyor in the same pattern as below. Head height 600mm, carton dimensions 385x200x285mm (lx w x h), interlayer every layer and on the bottom of the pallet, we lay 4 layers of product.


    Best regard,
    P.Fedoniuk
    pashafedonjuk@gmail.com

  • Dear Friend,


    Can you help me to check if it is right I will thanks a lot too you.


    For the first task


    1. Write BG LOGIC program which, when changing the input state DI [1] from OFF to ON, will increase the register value R [1] by 1.


    I made like this:
    F[1]=(OFF)
    IF (DI[1] AND !R[1]), F[1]=(ON)
    R[1]=1


    For the second one


    2. Write a program that would be used to measure the stack height of the inserts. A sensor attached to RI [1] is mounted on the robot head, the robot moves past the stack and detects the signal from the sensor, saving the current robot height, and then the robot points to the saved TCP altitude.


    IF (DI[1] AND !R[1]), DO[1]=(!DO[1])
    R[1]=(DI[1])


    For the third one


    3.Write a program for stacking cartons on a pallet. A robot with a 1400mm conveyor takes two cartons and places it on a pallet lying on a 400mm conveyor in the same pattern as below. Head height 600mm, carton dimensions 385x200x285mm (lx w x h), interlayer every layer and on the bottom of the pallet, we lay 4 layers of product.


    Where can I find some manual guide to understand how to correct make this program. Thank you so much for answering and advicing. I wish you all the best!!!


    Best regard,
    P.Fedoniuk
    pashafedonjuk@gmail.com

  • Is this some job-application test? If so, I think I even know the name of the company... Anyway, I can only show you the right direction.


    1.
    - in your given solution, you are not increasing the R[1], just rewriting a value of 1 to it. Use R[1]=R[1]+1 formula.
    - way to detect a positive edge of the DI[1] is described in this topic.


    2. In this case, you'll need to write a .TP program, which breaks the robot's movement on detection of RI[1], then saves the position of the robot to a PR and writes an appropriate coordinate value to a NumReg. Look for SKIP funtion to do that (could probably also be done in BG-Logic, but no point in that).


    3. Here, you'll need a .TP program with some offset calculations, based on the given values. Can be done by operating directly on coordinates of PRs or with offsets.

  • Dear bidzej,


    Thank you so much again and yes you are right this is some job-application test. At my previous job I used Process Simulate and now I'm want to learn and to understand PLC programming.


    I have done the first task for : writing BG LOGIC program which, when changing the input state DI [1] from OFF to ON, will increase the register value R [1] by 1.


    By the way the second and third tasks I'm still working on them because I want deeply to understand the skip function and how to do offset calculation in TP program that's why I would like to ask you about some examples or websites where I can find this information. THANK YOU SO MUCH!!!


    Best regard,
    P.Fedoniuk
    pashafedonjuk@gmail.com

  • I don't know a website which could provide examples on the verry issues that you need to solve, but here is one which should give you an idea of "good practices" in programming: http://www.onerobotics.com


    Guess the best way to get to know the functions is just a Fanuc manual... (Operator + PalletTool if you are about to work with palletizing robots). Is the company you're applying to Wikpol?

  • Dear Sergei Troizky,


    I'm so sorry that my questinos were out of topic, because I just looking for help in understanding BG logic programing and TP programing. I'm just a beginer which want to learn and to know intresting topic. If you intelegent person you might understand me.


    Best regards,
    P.Fedoniuk

Advertising from our partners