XPS-Q8
Tcl Manual
# Initialize group
set
code [
catch
"
GroupInitialize
$socketID $Group"]
if
{$code !=
0
} {
DisplayErrorAndClose
$socketID $code "GroupInitialize"
$telnetOut
return
}
# Home group
set
code [
catch
"
GroupHomeSearch
$socketID $Group"]
if
{$code !=
0
} {
DisplayErrorAndClose
$socketID $code "GroupHomeSearch"
$telnetOut
return
}
# Set analog tracking parameters
set
code [
catch
"PositionerAnalogTrackingPositionParametersSet
$socketID $Positioner $AnalogInput $Offset
$Scale $Velocity $Acceleration"]
if
{$code !=
0
} {
DisplayErrorAndClose
$socketID $code
"PositionerAnalogTrackingPositionParametersSet" $telnetOut
return
}
# Enable analog position tracking mode (group must be ready)
set
code [
catch
"
GroupAnalogTrackingModeEnable
$socketID $Group
$TrackingType"]
if
{$code !=
0
} {
DisplayErrorAndClose
$socketID $code
"GroupAnalogTrackingModeEnable" $telnetOut
return
}
# Change the amplitude of GPIO2.ADC1 analog input during 20 seconds
after
20000
# Disable analog position tracking mode
set
code [
catch
"
GroupAnalogTrackingModeDisable
$socketID $Group"]
if
{$code !=
0
} {
DisplayErrorAndClose
$socketID $code
"GroupAnalogTrackingModeDisable" $telnetOut
return
}
# Close TCP socket
puts
$telnetOut "End of program"
flush
$telnetOut
set
code [
catch
"TCP_CloseSocket $socketID"]
}
EDH0307En1041 — 10/17
50