フィルターのクリア

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
  1 件のコメント
Jan
Jan 2013 年 6 月 22 日

サインインしてコメントする。

回答 (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 Center および File ExchangeProgramming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by