;Nested loop demo
;!! Warning: This script enable and moves the drive!!
; See progress in the outpot panel
#var $v1 ; Move velocity
#var $d2 ; Delta: Velocity step
#var $count1
$d2=50
$count1 = 1
k
opmode 0
en
#while $count1 < 5
$count1 = $count1 + 1
$v1= -200
#while $v1 < 200
j $v1
#delay 10
$v1 = $v1 + $d2
#print Velocity:$ v1
#End_While
#print $Count: $count1
#End_While
k