0% found this document useful (0 votes)
138 views8 pages

Robotic System For Liquid Refilling

The document presents an algorithm to control a robotic arm to refill two tanks before they become empty. It begins with the robotic arm at position A with both Tank1 and Tank2 empty. The algorithm moves the arm left and right to open and close values, refilling each tank before the time limit that would cause it to become empty. Pseudocode and a Java implementation of the algorithm are provided to demonstrate the logic.

Uploaded by

Musfira Usman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views8 pages

Robotic System For Liquid Refilling

The document presents an algorithm to control a robotic arm to refill two tanks before they become empty. It begins with the robotic arm at position A with both Tank1 and Tank2 empty. The algorithm moves the arm left and right to open and close values, refilling each tank before the time limit that would cause it to become empty. Pseudocode and a Java implementation of the algorithm are provided to demonstrate the logic.

Uploaded by

Musfira Usman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

NAME:

ID:
Contents
Introduction…………………………………………………………………………………………………………………………………………….

Literature Survey…………………………………………………………………………………………………………………………………….

Proposed Solution………………………………………………………………………………………………………………………………….

Result…………………………………………………………………………………………………………………………………………………….

Conclusion……………………………………………………………………………………………………………………………………………

Introduction:
Robotic arm is at A at the start. Both the tank1 and tank2 are empty initially. We
can’t let the tanks to be from state full to state empty. Tank1 passes from full to empty in 5 min
and Tank2 passes from full to empty in 2 min.
Tank1 TR1 = 0.1 * T1
Tank2 TR2 = 0.1 * T2

Literature Survey:
 Robotic Arm at Position A
 We cannot let tank to become empty
 Tank1 is Empty
 Tank2 is Empty
 Possible moves are Move Left, Move Right, Open Value, Close Value
 Tank1 become empty after 5mins
 Tank2 become empty after 2mins
 Refill system avoid tanks are empty

Proposed Solution:
Moving the arm in a way that neither tank becomes empty. Algorithm that
can assured that both the tank filled with water. We have to fill each tank before it become
empty.

Result:
We have developed an algorithm that move the robotic arm from left to right and right
to left so that both tank state remain full. Main purpose is full filled successfully
Conclusion:
We have to fill each tank before it become empty. So we have developed an
algorithm that move the robotic arm to tank before it become empty

ALGORITHM:
If ((Tank1 || Tank2) ! = Full && Arm! = Moving) {

Value = O

At first

Value = O

Tank1 = Fill

Value = C

Arm = R

Value = O

Tank2 = Fill

TR1 = 0.1 * T1

TR2 = 0.1*T2

If(Tank1||Tank2!=Empty){

If(TR1<2){

Arm = L

Value = O

Tank1 = Fill

T1++

If(TR2<5){

Value = C

Arm = R

Value = O
Tank2 = Fill

T2++

If(Tank1==Empty){

Arm! = R

If(Tank2 == Empty){

Arm! = L

Pseudo Code:
Begin:
Robotic arm -> A
Tank1 -> Empty
Tank2 -> Empty
L = Move Left
R = Move Right
O = Open Value
C = Close Value
if( (Tank1 || Tank2) ! = Full && Arm! = Moving) {
Value = O
}
TR1 = 0.1 * T1

TR2 = 0.1*T2

If(Tank1||Tank2!=Empty){
If(TR1<5){

Arm = L

Value = O

Tank1 = Fill

T1++

If(TR2<2) {

Value = C

Arm = R

Value = O

Tank2 = Fill

T2++

FLOW CHART
Code in Java:

public class Main

public static void main(String[] args) {

char Value = 'O';

String Tank1="empty";

String Tank2="empty";

String Arm="Freeze";

char L,R,O,C;

int T1=0,T2=0;

double TR1=0,TR2=0;

while(true){

if(Tank1!="empty"||Tank2!="empty"){

if(TR1<2){

Arm="L";

Value = 'O';

Tank1 = "Full";

T1++;

};

TR1=0.1*T1;

if(TR2<5){

Value = 'C';
Arm = "R";

Value = 'O';

Tank2 = "Fill";

T2++;

TR2=0.1*T2;

if(Tank1=="empty"&&Tank2=="empty"){

break;

You might also like