Master-Slave Mode; Configuration; Description; Tcl Code - Newport XPS-Q8 Manual

Universal high-performance motion controller/driver
Table of Contents

Advertisement

XPS-Q8
}
# Close TCP socket
set
code
}
7.7

Master-Slave Mode

7.7.1

Configuration

Group type
Single axis
XY
7.7.2

Description

This example opens a TCP connection, kills the Singles Axis group and the XY group.
The program then initializes and homes the groups. It sets the parameters for the master
slave mode (slave: single axis group, master: X positioner from XY group). Then, it
enables the master slave mode and executes a relative move of 20 units with the master
positioner. At the same time, the slave positioner executes the same move as the master.
The master slave mode is then disabled and the program ends by closing the socket.
Please see the sections:
4 Principle of a Tcl script redirection to a telnet session.
6 Proposed function for error handling.
7.7.3

TCL Code

# Set channel's name to be used for telnet.
# In this example we assume it is passed to the script as the
# first argument, if not specified output to stdio.
# Open the channel for read mode and get its id,
# this is the id that will be passed to puts function.
if
{$tcl_argv(0) != 0} {
set
telnetOut [ open "/dev/$tcl_argv(0)" r+]
else
}
{
set
telnetOut stdout
}
# Initialization
set
60
TimeOut
set
SlaveGroup "SINGLE_AXIS"
set
XYGroup "XY"
set
MasterPositioner "XY.X"
set
MasterRatio 1
set
0
code
set
Displacement
# Open TCP socket
set
code
[catch
if
{$code != 0} {
puts
stdout "OpenConnection failed => $code"
else
}
{
# Kill single axis group
set
code
if
{$code != 0} {
DisplayErrorAndClose $socketID $code "Single axis GroupKill"
[catch
"TCP_CloseSocket $socketID"]
Number
Group name
1
SINGLE_AXIS
1
XY
20
"OpenConnection $TimeOut socketID"]
[catch
"GroupKill $socketID $SlaveGroup"]
39
Tcl Manual
Positioner name
SINGLE_AXIS.MY_STAGE
XY.X and XY.Y
EDH0307En1041 — 10/17

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents