![Nanomotion XCDX Скачать руководство пользователя страница 54](http://html.mh-extra.com/html/nanomotion/xcdx/xcdx_user-manual_705065054.webp)
XCDX458000-00 rev A
54
Example Scripts
If raster motion is started by Raster Mode with parameter 5 (Single vector), the
motion stops at the end of the vector and waits for the next Raster Mode
command as described above.
4.6.6
S
TEP
-R
EPEAT
O
PERATION
Raster Mode command with parameter 9 starts raster operation in a Step-
repeat mode.
In this case, the operation does not hold constant velocity at a vector, but
stops in each trigger point. Dwell parameter in the Raster Data defines
milliseconds to stay in each trigger point; and the time has elapsed, the motion
goes to the next trigger point or to the next vector if the current vector is
through.
If Raster Mode command with parameter 2 (Pause) is issued within Step-
repeat operation, the motion stops in the next trigger point and waits for the
next Raster Mode command. If the next command specifies Resume, the axis
moves to the next trigger point and continues operation in Step-repeat mode.
4.7
E
XAMPLE
S
CRIPTS
4.7.1
S
ETTING
IO S
TATE
//This script shows how to use IO at XCD
// Set IO_2 to logical 1
IO_2 = 1
// Set IO_2 to logical 0
IO_2 = 0
4.7.2
C
REATING
S
QUARE
P
ULSE
ON
IO_2
//Infinite loop to produce square pulse at IO_2 at 20
and 10 Hz
while 1
// wait 25 msec for 20Hz
delay 25
// check if IO_1 is high
if IO_1 = 1