0% found this document useful (0 votes)
5 views1 page

Nested Loop Script for Velocity Control

This script demonstrates a nested loop for controlling a drive's velocity. It initializes variables for velocity and delta, then iterates through a series of velocity adjustments while counting iterations. The script includes warnings about enabling and moving the drive, and it provides output for velocity and count during execution.

Uploaded by

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

Nested Loop Script for Velocity Control

This script demonstrates a nested loop for controlling a drive's velocity. It initializes variables for velocity and delta, then iterates through a series of velocity adjustments while counting iterations. The script includes warnings about enabling and moving the drive, and it provides output for velocity and count during execution.

Uploaded by

mmreigen
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

;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

You might also like