Gathering With Motion; Configuration; Description; Tcl Code - Newport XPS-Q8 Manual

Universal high-performance motion controller/driver
Table of Contents

Advertisement

XPS-Q8
This is what gets displayed on a telnet window for the above example.
7.4

Gathering with motion

7.4.1

Configuration

Group type
Single axis
7.4.2

Description

This example opens a TCP connection, kills the single axis group, then initializes and
homes the group. The program then configures the parameters for the gathering (data to
be collected: setpoint and current position). It then defines an action (GatheringRun) to
an event (SGamma.MotionStart). When the positioner moves from 0 to 50, the data is
gathered (with a divisor equal to 100, data is collected every 100
10 ms). At the end, the gathering is stopped and saved in a text file (Gathering.dat in
Admin/Public directory of the controller). Finally, the program ends by closing the
socket.
Please see sections:
4 Principle of a Tcl script redirection to a telnet session.
6 Proposed function for error handling.
7.4.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
Group "SINGLE_AXIS"
set
Positioner "SINGLE_AXIS.MY_STAGE"
set
Type1 "SINGLE_AXIS.MY_STAGE.SetpointPosition"
set
Type2 "SINGLE_AXIS.MY_STAGE.CurrentPosition"
set
Event "SGamma.MotionStart"
set
Action "GatheringRun"
Number
Group name
1
SINGLE_AXIS
31
Tcl Manual
Positioner name
SINGLE_AXIS.MY_STAGE
th
servo cycle, or every
EDH0307En1041 — 10/17

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents