move function to move a Tool

조회 수: 1 (최근 30일)
sia
sia 2013년 6월 22일
Hi,
i wanna write a function, within i can command the tool to move from a to b.
Can you guys help me, i dont have any idea!
THX

답변 (2개)

sia
sia 2013년 6월 22일
hi,
i have found this solution but i miss the command to run the engine. I should say that my tool is a milling, which is on an engine. and the milling can move in x,y, and z direction.
function move = Goel_position (x, y, z)
Vx = 0.036; %speed cm/s
Vy = 0.036;
Vz = 0.036;
X_runTime = (x - Xtsp)/ Vx; % Xtsp first position
Y_runTime = (y - Ytsp)/ Vy;
Z_runTime = (z - Ztsp)/ Vz;
while(X_runTime)
end
while(Y_runTime)
end
while(Z_runTime)
end
end
i wanna that the engine move while the runtime is true. how can i do it?

Jan
Jan 2013년 6월 22일
I've answered in the other forum (just for information of other readers):
We cannot know or guess how the tool is connected to your computer. This is a detail you have to find out at first.
The WHILE loops look strange: WHILE loops run as long as a condition is TRUE. But in the posted code, the condition is a constant time, which will not change it's state from TRUE to FALSE magically.
Please read the help text of while:
help while
And most of all you need any clear instructions about how the tool can be controlled. Ask your teacher, professor or read the manuals. But the forums cannot help you in this point.

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by