Elmomc Multi-Axis Motion Controller-Maestro Instrukcja Użytkownika Strona 261

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 313
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 260
v1.addline ( -128000, 64000 )
v1.addcircle( 64000,180,-90 )
v1.vse = 0
v1.ends() //finish building trajectory
wait(10)
v1./jointfilesconvert/1588249/bg //start motion
end function
B.2 Motion Mathematics
Refer to the Motion Library Tutorial which can be viewed on the Elmo web site at
http://www.elmomc.com/support/Samples-Tutorial/MAN-MLT.
pdf.
B.3 Basic Programming
B.3.1 Break-Continue-Return Sample
//The "continue" statement forces immediate transfer of control to the
// next iteration of the loop.
//The "break" statement is used to exit the loop.
//The "return" statement ends the current function
// (and transfers control back to the calling function)
function run()
int i,j
for i=1:2:20
if (i%2 == 0)
j=i/2
continue //go to next iteration
else if (i%4 == 0)
j=i/4
break //exit the loop
else
j=i
return //exit this function
end if
i=i+1
end for
j=j+i
end function
B.3.2 Function Call Sample
function run()
int multipleVar
multipleVar=multiple(10,15) //call embedded function "multiple"
end function //after returning from the called function (multiple),
//multipleVar=150
function [int c] = multiple(int a, int b)
// this func has two input parameters (a and b)
// and one output parameter (c)
c=a*b
end function
B.3.3 For Sample
function run()
int i, a
a=0
Maestro Software Manual Appendix B: Sample Programs
MAN-MASSW (Ver. Q)
B-9
Przeglądanie stron 260
1 2 ... 256 257 258 259 260 261 262 263 264 265 266 ... 312 313

Komentarze do niniejszej Instrukcji

Brak uwag