Newport HXP Motion Controller User manual

Type
User manual
HXP
Hexapod
Motion Controller
Programmer’s
Manual
Intaller Pack Version #30002
HXP Controller Programmer’s Manual
©2018 by Newport Corporation, Irvine, CA. All rights reserved.
Original instructions.
No part of this document may be reproduced or copied without the prior written
approval of Newport Corporation. This document is provided for information only, and
product specifications are subject to change without notice. Any change will be
reflected in future publishings.
EDH0335En1051 — 12/18 ii
HXP Controller Programmer’s Manual
Table of Contents
Introduction ........................................................................................................... 1
1.0 TCP/IP Communication ......................................................................... 1
1.1 Description ...................................................................................................................... 1
1.2 Function Description ....................................................................................................... 3
1.2.1 CloseAllOtherSockets ................................................................................................. 3
1.2.2 Login ........................................................................................................................... 6
1.2.3 OpenConnection ......................................................................................................... 9
1.2.4 TCP_CloseSocket ..................................................................................................... 10
1.2.5 TCP_ConnectToServer ............................................................................................. 12
1.2.6 TCP_GetError ........................................................................................................... 15
1.2.7 TCP_SetTimeout ....................................................................................................... 17
2.0 XPS .NET Software Drivers ................................................................. 19
2.1 How to install .NET Drivers for XPS Controller ............................................................19
2.1.1 Requirements ............................................................................................................ 19
2.1.2 Installing the 32 bit (x86) Windows platform ........................................................... 20
2.1.3 Installing the 64 bit (x64) Windows platform ........................................................... 21
2.2 How to Use XPS .NET Assembly from Visual Studio C#? ...........................................22
2.2.1 Add Reference to .NET Assembly ............................................................................ 22
2.2.2 C# Code Sources ....................................................................................................... 23
2.3 How to use XPS .NET Assembly from LabVIEW? .......................................................24
2.3.1 Add Reference to .NET Assembly ............................................................................ 24
2.3.2 LabVIEW Code Sources ........................................................................................... 25
2.4 How to use XPS .NET assembly from IronPython? .......................................................26
2.4.1 Add Reference to .NET Assembly ............................................................................ 26
2.4.2 IronPython Code Source ........................................................................................... 26
2.5 How to Use XPS .NET Assembly from Matlab? ...........................................................28
2.5.1 Add Reference to .NET Assembly ............................................................................ 28
2.5.2 Matlab Code Source .................................................................................................. 28
3.0 HXP Features ......................................................................................... 29
3.1 General Features .............................................................................................................29
3.1.1 DoubleGlobalArrayGet ............................................................................................. 29
3.1.2 DoubleGlobalArraySet.............................................................................................. 32
3.1.3 ErrorStringGet........................................................................................................... 35
3.1.4 ElapsedTimeGet ........................................................................................................ 38
iii EDH0335En1051 — 12/18
HXP Controller Programmer’s Manual
3.1.5 FirmwareVersionGet ................................................................................................. 40
3.1.6 GroupStatusStringGet ............................................................................................... 43
3.1.7 GlobalArrayGet......................................................................................................... 46
3.1.8 GlobalArraySet ......................................................................................................... 49
3.1.9 KillAll ....................................................................................................................... 52
3.1.10 Reboot ....................................................................................................................... 55
3.1.11 RestartApplication .................................................................................................... 57
3.1.12 TimerGet ................................................................................................................... 59
3.1.13 TimerSet .................................................................................................................... 62
3.2 Positioner ........................................................................................................................65
3.2.1 Description ................................................................................................................ 65
3.2.2 Object Structure ........................................................................................................ 65
3.2.3 Definition of the Different Positions for a Positioner ............................................... 66
3.2.4 Function description .................................................................................................. 67
3.2.4.1 PositionerBacklashDisable ............................................................................ 67
3.2.4.2 PositionerBacklashEnable ............................................................................. 70
3.2.4.3 PositionerBacklashGet ................................................................................... 73
3.2.4.4 PositionerBacklashSet ................................................................................... 76
3.2.4.5 PositionerCompensatedPCOAbort ................................................................ 79
3.2.4.6 PositionerCompensatedPCOCurrentStatusGet .............................................. 82
3.2.4.7 PositionerCompensatedPCOEnable ............................................................... 85
3.2.4.8 PositionerCompensatedPCOFromFile ........................................................... 89
3.2.4.9 PositionerCompensatedPCOLoadToMemory ............................................... 93
3.2.4.10 PositionerCompensatedPCOMemoryReset ................................................... 97
3.2.4.11 PositionerCompensatedPCOPrepare ........................................................... 100
3.2.4.12 PositionerCompensatedPCOSet .................................................................. 104
3.2.4.13 PositionerCompensationFrequencyNotchsGet ............................................ 108
3.2.4.14 PositionerCompensationFrequencyNotchsSet ............................................ 114
3.2.4.15 PositionerCompensationLowPassTwoFilterGet .......................................... 119
3.2.4.16 PositionerCompensationLowPassTwoFilterSet .......................................... 122
3.2.4.17 PositionerCompensationNotchModeFiltersGet ........................................... 125
3.2.4.18 PositionerCompensationNotchModeFiltersSet ........................................... 131
3.2.4.19 PositionerCompensationPhaseCorrectionFiltersGet ................................... 137
3.2.4.20 PositionerCompensationPhaseCorrectionFiltersSet .................................... 142
3.2.4.21 PositionerCompensationSpatialPeriodicNotchsGet .................................... 147
3.2.4.22 PositionerCompensationSpatialPeriodicNotchsSet ..................................... 153
3.2.4.23 PositionerCorrectorNotchFiltersGet ............................................................ 159
3.2.4.24 PositionerCorrectorNotchFiltersSet ............................................................ 163
3.2.4.25 PositionerCorrectorPIDDualFFVoltageGet ................................................ 167
3.2.4.26 PositionerCorrectorPIDDualFFVoltageSet ................................................. 173
3.2.4.27 PositionerCorrectorPIDFFAccelerationGet ................................................ 179
3.2.4.28 PositionerCorrectorPIDFFAccelerationSet ................................................. 185
3.2.4.29 PositionerCorrectorPIDFFVelocityGet ....................................................... 191
3.2.4.30 PositionerCorrectorPIDFFVelocitySet ........................................................ 197
3.2.4.31 PositionerCorrectorPIPositionGet ............................................................... 203
3.2.4.32 PositionerCorrectorPIPositionSet................................................................ 207
3.2.4.33 PositionerCorrectorSR1AccelerationGet .................................................... 211
3.2.4.34 PositionerCorrectorSR1AccelerationSet ..................................................... 217
EDH0335En1051 — 12/18 iv
HXP Controller Programmer’s Manual
3.2.4.35 PositionerCorrectorSR1ObserverAccelerationSet....................................... 223
3.2.4.36 PositionerCorrectorSR1OffsetAccelerationGet .......................................... 227
3.2.4.37 PositionerCorrectorSR1OffsetAccelerationSet ........................................... 230
3.2.4.38 PositionerCorrectorTypeGet ....................................................................... 233
3.2.4.39 PositionerCurrentVelocityAccelerationFiltersGet....................................... 236
3.2.4.40 PositionerCurrentVelocityAccelerationFiltersSet ....................................... 240
3.2.4.41 PositionerDriverFiltersGet .......................................................................... 244
3.2.4.42 PositionerDriverFiltersSet ........................................................................... 248
3.2.4.43 PositionerDriverPositionOffsetsGet ............................................................ 252
3.2.4.44 PositionerDriverStatusGet .......................................................................... 255
3.2.4.45 PositionerDriverStatusStringGet ................................................................. 258
3.2.4.46 PositionerEncoderAmplitudeValuesGet ..................................................... 261
3.2.4.47 PositionerEncoderCalibrationParametersGet .............................................. 265
3.2.4.48 PositionerErrorGet ...................................................................................... 269
3.2.4.49 PositionerErrorRead .................................................................................... 272
3.2.4.50 PositionerErrorStringGet ............................................................................ 275
3.2.4.51 PositionerHardInterpolatorFactorGet .......................................................... 278
3.2.4.52 PositionerHardInterpolatorFactorSet .......................................................... 281
3.2.4.53 PositionerHardInterpolatorPositionGet ....................................................... 284
3.2.4.54 PositionerHardwareStatusGet ..................................................................... 287
3.2.4.55 PositionerHardwareStatusStringGet ............................................................ 290
3.2.4.56 PositionerMaximumVelocityAndAccelerationGet ..................................... 294
3.2.4.57 PositionerMotionDoneGet .......................................................................... 297
3.2.4.58 PositionerMotionDoneSet ........................................................................... 301
3.2.4.59 PositionerPositionCompareDisable ............................................................. 305
3.2.4.60 PositionerPositionCompareEnable .............................................................. 308
3.2.4.61 PositionerPositionCompareGet ................................................................... 311
3.2.4.62 PositionerPositionCompareSet .................................................................... 315
3.2.4.63 PositionerPositionComparePulseParametersGet ......................................... 319
3.2.4.64 PositionerPositionComparePulseParametersSet .......................................... 323
3.2.4.65 PositionerPositionCompareScanAccelerationLimitGet .............................. 327
3.2.4.66 PositionerPositionCompareScanAccelerationLimitSet ............................... 330
3.2.4.67 PositionerPositionCompareAquadBAlwaysEnable..................................... 333
3.2.4.68 PositionerPositionCompareAquadBWindowedGet..................................... 336
3.2.4.69 PositionerPositionCompareAquadBWindowedSet ..................................... 340
3.2.4.70 PositionerRawEncoderPositionGet ............................................................. 344
3.2.4.71 PositionersEncoderIndexDifferenceGet ...................................................... 347
3.2.4.72 PositionerSGammaExactVelocityAjustedDisplacementGet ....................... 350
3.2.4.73 PositionerSGammaParametersDistanceGet ................................................ 353
3.2.4.74 PositionerSGammaParametersSet ............................................................... 358
3.2.4.75 PositionerSGammaParametersGet .............................................................. 362
3.2.4.76 PositionerSGammaPreviousMotionTimesGet ............................................ 366
3.2.4.77 PositionerStageParameterGet ...................................................................... 369
3.2.4.78 PositionerStageParameterSet ...................................................................... 372
3.2.4.79 PositionerTimeFlasherDisable .................................................................... 375
3.2.4.80 PositionerTimeFlasherEnable ..................................................................... 378
3.2.4.81 PositionerTimeFlasherGet .......................................................................... 381
3.2.4.82 PositionerTimeFlasherSet ........................................................................... 385
3.2.4.83 PositionerUserTravelLimitsGet .................................................................. 389
3.2.4.84 PositionerUserTravelLimitsSet ................................................................... 392
v EDH0335En1051 — 12/18
HXP Controller Programmer’s Manual
3.2.4.85 PositionerWarningFollowingErrorGet ........................................................ 395
3.2.4.86 PositionerWarningFollowingErrorSet ......................................................... 398
3.2.5 Configuration Files ................................................................................................. 401
3.3 Group ............................................................................................................................409
3.3.1 Description .............................................................................................................. 409
3.3.2 Object structure ....................................................................................................... 409
3.3.3 Function Description ............................................................................................... 417
3.3.3.1 GroupCorrectorOutputGet ........................................................................... 417
3.3.3.2 GroupInitialize ............................................................................................. 420
3.3.3.3 GroupInitializeWithEncoderCalibration ...................................................... 423
3.3.3.4 GroupHomeSearch ...................................................................................... 426
3.3.3.5 GroupHomeSearchAndRelativeMove ......................................................... 429
3.3.3.6 GroupKill..................................................................................................... 433
3.3.3.7 GroupMotionDisable ................................................................................... 436
3.3.3.8 GroupMotionEnable .................................................................................... 439
3.3.3.9 GroupMoveAbort ........................................................................................ 442
3.3.3.10 GroupMoveAbsolute ................................................................................... 445
3.3.3.11 GroupMoveRelative .................................................................................... 449
3.3.3.12 GroupPositionCurrentGet ........................................................................... 453
3.3.3.13 GroupPositionSetpointGet .......................................................................... 456
3.3.3.14 GroupPositionTargetGet ............................................................................. 459
3.3.3.15 GroupReadyAtPosition ............................................................................... 462
3.3.3.16 GroupStatusGet ........................................................................................... 466
3.3.3.17 GroupReferencingActionExecute ............................................................... 469
3.3.3.18 GroupReferencingStart ............................................................................... 473
3.3.3.19 GroupReferencingStop................................................................................ 476
3.3.3.20 GroupVelocityCurrentGet ........................................................................... 479
3.4 SingleAxis Group .........................................................................................................482
3.4.1 Description .............................................................................................................. 482
3.4.2 State Diagram.......................................................................................................... 482
3.4.3 Specific Function Description ................................................................................. 483
3.4.3.1 SingleAxisSlaveModeDisable ..................................................................... 483
3.4.3.2 SingleAxisSlaveModeEnable ...................................................................... 486
3.4.3.3 SingleAxisSlaveParametersGet ................................................................... 489
3.4.3.4 SingleAxisSlaveParametersSet .................................................................... 492
3.4.4 Configuration Files ................................................................................................. 496
3.5 Hexapod Group ............................................................................................................497
3.5.1 Description .............................................................................................................. 497
3.5.2 State Diagram.......................................................................................................... 497
3.5.3 Specific Function Description ................................................................................. 498
3.5.3.1 HexapodCoordinatesGet .............................................................................. 498
3.5.3.2 HexapodCoordinateSystemGet .................................................................... 502
3.5.3.3 HexapodCoordinateSystemSet .................................................................... 505
3.5.3.4 HexapodMoveAbsolute ............................................................................... 508
3.5.3.5 HexapodMoveIncremental .......................................................................... 511
3.5.3.6 HexapodMoveIncrementalControl .............................................................. 514
3.5.3.7 HexapodMoveIncrementalControlWithTargetVelocity ............................... 518
EDH0335En1051 — 12/18 vi
HXP Controller Programmer’s Manual
3.5.3.8 HexapodMoveIncrementalControlLimitGet ................................................ 522
3.5.3.9 HexapodMoveIncrementalControlPulseAndGatheringSet .......................... 528
3.5.3.10 HexapodSGammaParametersDistanceGet .................................................. 531
3.5.4 Configuration Files ................................................................................................. 535
3.6 Analog and Digital I/O .................................................................................................536
3.6.1 GPIO Name List ..................................................................................................... 536
3.6.1.1 Digital Inputs ............................................................................................... 536
3.6.1.2 Digital Outputs ............................................................................................ 536
3.6.1.3 Analog Inputs .............................................................................................. 536
3.6.1.4 Analog Outputs ............................................................................................ 536
3.6.2 Function Description ............................................................................................... 537
3.6.2.1 GPIOAnalogGainGet................................................................................... 537
3.6.2.2 GPIOAnalogGainSet ................................................................................... 540
3.6.2.3 GPIOAnalogGet .......................................................................................... 543
3.6.2.4 GPIOAnalogSet ........................................................................................... 546
3.6.2.5 GPIODigitalGet ........................................................................................... 549
3.6.2.6 GPIODigitalSet............................................................................................ 552
3.7 Gathering ......................................................................................................................556
3.7.1 Function Description ............................................................................................... 556
3.7.1.1 GatheringConfigurationGet ......................................................................... 556
3.7.1.2 GatheringConfigurationSet .......................................................................... 559
3.7.1.3 GatheringCurrentNumberGet ...................................................................... 562
3.7.1.4 GatheringDataAcquire ................................................................................. 565
3.7.1.5 GatheringDataGet ........................................................................................ 567
3.7.1.6 GatheringDataMultipleLinesGet ................................................................. 570
3.7.1.7 GatheringExternalConfigurationGet ............................................................ 572
3.7.1.8 GatheringExternalConfigurationSet ............................................................ 575
3.7.1.9 GatheringExternalCurrentNumberGet ......................................................... 578
3.7.1.10 GatheringExternalStopAndSave ................................................................. 581
3.7.1.11 GatheringReset ............................................................................................ 583
3.7.1.12 GatheringRun .............................................................................................. 585
3.7.1.13 GatheringStop ............................................................................................. 588
3.7.1.14 GatheringStopAndSave ............................................................................... 590
3.8 Events and Actions .......................................................................................................592
3.8.1 Functions Description ............................................................................................. 592
3.8.1.1 EventExtendedAllGet .................................................................................. 592
3.8.1.2 EventExtendedConfigurationActionGet ...................................................... 595
3.8.1.3 EventExtendedConfigurationActionSet ....................................................... 598
3.8.1.4 EventExtendedConfigurationTriggerGet ..................................................... 604
3.8.1.5 EventExtendedConfigurationTriggerSet ...................................................... 607
3.8.1.6 EventExtendedGet ....................................................................................... 613
3.8.1.7 EventExtendedRemove ............................................................................... 616
3.8.1.8 EventExtendedStart ..................................................................................... 619
3.8.1.9 EventExtendedWait ..................................................................................... 622
3.9 TCL Programming ........................................................................................................625
3.9.1 Function Description ............................................................................................... 625
3.9.1.1 TCLScriptExecute ....................................................................................... 625
3.9.1.2 TCLScriptExecuteAndWait ......................................................................... 629
vii EDH0335En1051 — 12/18
HXP Controller Programmer’s Manual
3.9.1.3 TCLScriptKill .............................................................................................. 633
3.10 Version .........................................................................................................................636
3.10.1 Function Description ............................................................................................... 636
3.10.1.1 GetLibraryVersion ...................................................................................... 636
3.11 Positioner Error List .....................................................................................................638
3.12 Positioner Hardware Status List ...................................................................................638
3.13 Positioner Driver Status List .........................................................................................641
3.14 Group State List ............................................................................................................641
3.15 Error List ......................................................................................................................643
3.16 Function List Classed in Categories .............................................................................645
4.0 Process Examples ................................................................................ 647
4.1 Management of the Errors ............................................................................................647
4.2 Firmware Version .........................................................................................................648
4.3 Gathering with Motion .................................................................................................649
4.4 External Gathering ........................................................................................................651
4.5 Backlash .......................................................................................................................653
4.6 Timer Event and Global Variables ...............................................................................655
4.7 Running Simultaneously Several Motion Processes .....................................................657
Service Form ...................................................................................................... 661
EDH0335En1051 — 12/18 viii
HXP Controller Programmer’s Manual
Introduction
The HXP is a high-performance motion controller, dedicated for the use with Newport
Hexapods. One HXP is part of each Newport Hexapod system. The controller is
preconfigured to the Hexapod mechanics.
The HXP bases on the same hardware as the Newport XPS Universal High-
Performance Motion Controller/Driver, but uses a special firmware for Hexapod
motion. The HXP has many common features with the XPS, but can control Hexapods
and up to two SingleAxis motion systems.
1.0 TCP/IP Communication
1.1 Description
HXP controller is based on a 10/100 Base-T Ethernet communication link with TCP/IP
protocol and uses a web site approach for all software tools and a FTP server for file
transfer. This makes the HXP controller most independent from the operating system of
the user. When networked, Unix, Linux or Windows users can access the same
controller from any place in the world for remote control, code development, file
transfer or diagnostics. The completely object oriented approach of the HXP firmware
with powerful, multi-parameter Function’s (commands) is also much more self-
consistent and intuitive to use than old-style mnemonic commands.
To connect to the HXP controller you must open a socket with the “OpenConnection()”
Function. Communication through this socket is done by specifying the socket identifier
(socketID) with the Function.
Hexapod
Motion Controller
HXP
1 EDH0335En1050 10/17
HXP Controller Programmer’s Manual
Each Function returns a completion or error message. In case of a successful
completion, the return is 0 (zero). In case of an error, the returned error code can be
used for diagnosing the problem by the Function ErrorStringGet().
The function call is blocked until a reply is sent by the HXP, or until the timeout value
has been reached. For running several processes in parallel (for instance for asking the
position while a stage is moving), several sockets can be used in parallel. When using
the HXP controller with programming languages that do not support multiple sockets,
the timeout value of the Function can be also set to a low value (20 ms).
EDH0335En1050 10/17 2
HXP Controller Programmer’s Manual
1.2 Function Description
1.2.1 CloseAllOtherSockets
Name
CloseAllOtherSocketsCloses all sockets beside the one used.
Input tests
- Configuration files reading: ERR_FATAL_INIT (-20)
- HXP initialization in progress: ERR_IN_INITIALIZATION (-21)
- Valid command format: ERR_WRONG_FORMAT (-7)
- Number of command parameters: ERR_WRONG_PARAMETERS_NUMBER (-9)
- Check “Administrator” rights: ERR_NEED_ADMINISTRATOR_RIGHTS (-9)
Description
This function allows an administrator to close all sockets beside the one used to call this
function.
All used sockets are closed. So, the ERR_SOCKET_CLOSED_BY_ADMIN error is
sent to each function in running before to close the used socket.
NOTE
Call the “Login” function to identify the user as “Administrator”.
CAUTION
If some TCL scripts are in progress (after a “TCLScriptExecute”
function or a “TCLScriptExecuteAndWait” function), don’t use this
function before to kill these TCL scripts. So, you must call the
“TCLScriptKill” function to stop the TCL execution and only next
you can use theCloseAllOtherSockets”
function to close sockets.
Return
- ERR_FATAL_INIT (-20)
- ERR_IN_INITIALIZATION (-21)
- ERR_WRONG_FORMAT (-7)
- ERR_NEED_ADMINISTRATOR_RIGHTS (-107)
- ERR_WRONG_PARAMETERS_NUMBER (-9)
- SUCCESS (0): No error
3 EDH0335En1050 10/17
HXP Controller Programmer’s Manual
TCL
Prototype
CloseAllOtherSockets
Input parameters
None
Output parameters
None
Return
Error integer Function error code
C/C++
Prototype
int CloseAllOtherSockets ()
Input parameters
None
Output parameters
None
Return
Error int Function error code
Visual Basic
Prototype
Long CloseAllOtherSockets ()
Input parameters
None
Output parameters
None
Return
Error Long Function error code
Matlab
Prototype
[Error] CloseAllOtherSockets ()
Input parameters
None
Return
Error int32 Function error code
EDH0335En1050 10/17 4
HXP Controller Programmer’s Manual
Python
Prototype
[Error] CloseAllOtherSockets ()
Input parameters
None
Return
Error integer Function error code
5 EDH0335En1050 10/17
HXP Controller Programmer’s Manual
1.2.2 Login
Name
Login – Self-identification.
Input tests
- Configuration files reading: ERR_FATAL_INIT (-20)
- HXP initialization in progress: ERR_IN_INITIALIZATION (-21)
- Check command format: ERR_WRONG_FORMAT (-7)
- Verify the number of parameters: ERR_WRONG_PARAMETERS_NUMBER (-9)
- Check the user name and the password:
ERR_WRONG_USERNAME_OR_PASSWORD (-106)
Description
This function allows a user to identify himself as “SuperUser”, “Administrator” or
“User”.
The user account must be exited else the
ERR_WRONG_USERNAME_OR_PASSWORD (-106) error is returned.
NOTE
To add a new user account, you must use the HXP web site with “Administrator”
rights. In the main menu, select “CONTROLLER CONFIGURATION” and go to
the “Users management” page.
Error codes
- ERR_FATAL_INIT (-20)
- ERR_IN_INITIALIZATION (-21)
- ERR_WRONG_FORMAT (-7)
- ERR_WRONG_PARAMETERS_NUMBER (-9)
- ERR_WRONG_USERNAME_OR_PASSWORD (-106)
- SUCCESS (0): no error
EDH0335En1050 10/17 6
HXP Controller Programmer’s Manual
TCL
Prototype
Login $SocketID $UserName $Password
Input parameters
SocketID integer Socket identifier gets by the
“TCP_ConnectToServer” function
UserName string user name
Password string password
Output parameters
None
Return
TCL error code (0 = success or 1 = syntax error) or Function error code
C/C++
Prototype
int Login (int SocketID, char *UserName, char *Password)
Input parameters
SocketID int Socket identifier gets by the
“TCP_ConnectToServer” function
UserName char * user name
Password char * password
Output parameters
None
Return
Function error code
Visual Basic
Prototype
Long Login (ByVal SocketID As Long, ByVal UserName As String, ByVal
Password As String)
Input parameters
SocketID Long Socket identifier gets by the
“TCP_ConnectToServer” function
UserName String user name
Password String password
Output parameters
None
Return
Function error code
7 EDH0335En1050 10/17
HXP Controller Programmer’s Manual
Matlab
Prototype
int32 Login (int32 SocketID, cstring UserName, cstring Password)
Input parameters
SocketID int32 Socket identifier gets by the
“TCP_ConnectToServer” function
UserName cstring user name
Password cstring password
Return
Function error code
Python
Prototype
integer Login (integer SocketID, string UserName, string Password)
Input parameters
SocketID integer Socket identifier gets by the
“TCP_ConnectToServer” function
UserName string user name
Password string password
Return
Function error code
EDH0335En1050 10/17 8
HXP Controller Programmer’s Manual
1.2.3 OpenConnection
Name
OpenConnectionopens a socket to connect TCP server (local).
Input tests
- Check number of used sockets (Max = 100): if no free socket then the SocketID is
affected to -1
Description
This function allows to open a socket in a TCL script located in the “Scripts” directory
from HXP controller.
The TCP/IP communication is configured as like:
Local Host Address = 127.0.0.1
IP Port = 5001
This function returns a socket identifier to use for each function call. The socket
identifier is defined between 0 to 99. If the TCP/IP connection failed then the
“SocketID” value is 1.
RETURN
- Socket identifier used in each function
TCL
Prototype
OpenConnection $TimeOut SocketID
Input parameters
TimeOut floating point Timeout in seconds used for each
Function execution
Output parameters
SocketID integer Socket identifier used in each function
Return
Error code
9 EDH0335En1050 10/17
HXP Controller Programmer’s Manual
1.2.4 TCP_CloseSocket
Name
TCP_CloseSocketCloses a socket.
Input tests
- Check socket identifier (Max = 100).
- Socket must be used.
Description
Closed the opened TCP/IP communication defined by the given socket identifier. If the
socket is undefined or is not used then nothing is doing.
Return
- None
TCL
Prototype
TCP_CloseSocket $SocketID
Input parameters
SocketID integer Socket identifier used in each function
Output parameters
None
C/C++
Prototype
void TCP_CloseSocket (int SocketID)
Input parameters
SocketID int Socket identifier used in each function
Output parameters
None
Visual Basic
Prototype
TCP_CloseSocket (ByVal SocketID As Long)
Input parameters
SocketID Long Socket identifier used in each function
Output parameters
None
EDH0335En1050 10/17 10
HXP Controller Programmer’s Manual
Matlab
Prototype
TCP_CloseSocket (int32 SocketID)
Input parameters
SocketID int32 Socket identifier used in each function
Python
Prototype
TCP_CloseSocket (integer SocketID)
Input parameters
SocketID integer Socket identifier used in each function
11 EDH0335En1050 10/17
HXP Controller Programmer’s Manual
1.2.5 TCP_ConnectToServer
Name
TCP_ConnectToServerConfigures the TCP/IP communication and opens a socket.
Input tests
- Check number of used sockets (Max = 100): if no free socket then the SocketID is
affected to -1
Description
Configures the TCP/IP communication and opens a socket to connect TCP server.
This function returns a socket identifier to use for each function call. The socket
identifier is defined between 0 to 99. If the TCP/IP connection failed then the
“SocketID” value is 1.
NOTE
OpenConnection function is used when users are in local, it only needs the timeout
and socket number to open the connection with the HXP controller.
TCP_ConnectToServer function needs more information like the port number and
the IP address. This function is called with the DLL.
Return
- Socket identifier used in each function
TCL
Prototype
TCP_ConnectToServer $IP_Address $IP_Port $TimeOut SocketID
Input parameters
IP_Address string TCP IP address : 195.168.33.xxx or
another
IP_Port interger TCP IP port : 5001 for HXP controller
TimeOut floating point Timeout in seconds used for each
Function execution
Output parameters
None
Return
SocketID integer Socket identifier used in each function
EDH0335En1050 10/17 12
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282
  • Page 283 283
  • Page 284 284
  • Page 285 285
  • Page 286 286
  • Page 287 287
  • Page 288 288
  • Page 289 289
  • Page 290 290
  • Page 291 291
  • Page 292 292
  • Page 293 293
  • Page 294 294
  • Page 295 295
  • Page 296 296
  • Page 297 297
  • Page 298 298
  • Page 299 299
  • Page 300 300
  • Page 301 301
  • Page 302 302
  • Page 303 303
  • Page 304 304
  • Page 305 305
  • Page 306 306
  • Page 307 307
  • Page 308 308
  • Page 309 309
  • Page 310 310
  • Page 311 311
  • Page 312 312
  • Page 313 313
  • Page 314 314
  • Page 315 315
  • Page 316 316
  • Page 317 317
  • Page 318 318
  • Page 319 319
  • Page 320 320
  • Page 321 321
  • Page 322 322
  • Page 323 323
  • Page 324 324
  • Page 325 325
  • Page 326 326
  • Page 327 327
  • Page 328 328
  • Page 329 329
  • Page 330 330
  • Page 331 331
  • Page 332 332
  • Page 333 333
  • Page 334 334
  • Page 335 335
  • Page 336 336
  • Page 337 337
  • Page 338 338
  • Page 339 339
  • Page 340 340
  • Page 341 341
  • Page 342 342
  • Page 343 343
  • Page 344 344
  • Page 345 345
  • Page 346 346
  • Page 347 347
  • Page 348 348
  • Page 349 349
  • Page 350 350
  • Page 351 351
  • Page 352 352
  • Page 353 353
  • Page 354 354
  • Page 355 355
  • Page 356 356
  • Page 357 357
  • Page 358 358
  • Page 359 359
  • Page 360 360
  • Page 361 361
  • Page 362 362
  • Page 363 363
  • Page 364 364
  • Page 365 365
  • Page 366 366
  • Page 367 367
  • Page 368 368
  • Page 369 369
  • Page 370 370
  • Page 371 371
  • Page 372 372
  • Page 373 373
  • Page 374 374
  • Page 375 375
  • Page 376 376
  • Page 377 377
  • Page 378 378
  • Page 379 379
  • Page 380 380
  • Page 381 381
  • Page 382 382
  • Page 383 383
  • Page 384 384
  • Page 385 385
  • Page 386 386
  • Page 387 387
  • Page 388 388
  • Page 389 389
  • Page 390 390
  • Page 391 391
  • Page 392 392
  • Page 393 393
  • Page 394 394
  • Page 395 395
  • Page 396 396
  • Page 397 397
  • Page 398 398
  • Page 399 399
  • Page 400 400
  • Page 401 401
  • Page 402 402
  • Page 403 403
  • Page 404 404
  • Page 405 405
  • Page 406 406
  • Page 407 407
  • Page 408 408
  • Page 409 409
  • Page 410 410
  • Page 411 411
  • Page 412 412
  • Page 413 413
  • Page 414 414
  • Page 415 415
  • Page 416 416
  • Page 417 417
  • Page 418 418
  • Page 419 419
  • Page 420 420
  • Page 421 421
  • Page 422 422
  • Page 423 423
  • Page 424 424
  • Page 425 425
  • Page 426 426
  • Page 427 427
  • Page 428 428
  • Page 429 429
  • Page 430 430
  • Page 431 431
  • Page 432 432
  • Page 433 433
  • Page 434 434
  • Page 435 435
  • Page 436 436
  • Page 437 437
  • Page 438 438
  • Page 439 439
  • Page 440 440
  • Page 441 441
  • Page 442 442
  • Page 443 443
  • Page 444 444
  • Page 445 445
  • Page 446 446
  • Page 447 447
  • Page 448 448
  • Page 449 449
  • Page 450 450
  • Page 451 451
  • Page 452 452
  • Page 453 453
  • Page 454 454
  • Page 455 455
  • Page 456 456
  • Page 457 457
  • Page 458 458
  • Page 459 459
  • Page 460 460
  • Page 461 461
  • Page 462 462
  • Page 463 463
  • Page 464 464
  • Page 465 465
  • Page 466 466
  • Page 467 467
  • Page 468 468
  • Page 469 469
  • Page 470 470
  • Page 471 471
  • Page 472 472
  • Page 473 473
  • Page 474 474
  • Page 475 475
  • Page 476 476
  • Page 477 477
  • Page 478 478
  • Page 479 479
  • Page 480 480
  • Page 481 481
  • Page 482 482
  • Page 483 483
  • Page 484 484
  • Page 485 485
  • Page 486 486
  • Page 487 487
  • Page 488 488
  • Page 489 489
  • Page 490 490
  • Page 491 491
  • Page 492 492
  • Page 493 493
  • Page 494 494
  • Page 495 495
  • Page 496 496
  • Page 497 497
  • Page 498 498
  • Page 499 499
  • Page 500 500
  • Page 501 501
  • Page 502 502
  • Page 503 503
  • Page 504 504
  • Page 505 505
  • Page 506 506
  • Page 507 507
  • Page 508 508
  • Page 509 509
  • Page 510 510
  • Page 511 511
  • Page 512 512
  • Page 513 513
  • Page 514 514
  • Page 515 515
  • Page 516 516
  • Page 517 517
  • Page 518 518
  • Page 519 519
  • Page 520 520
  • Page 521 521
  • Page 522 522
  • Page 523 523
  • Page 524 524
  • Page 525 525
  • Page 526 526
  • Page 527 527
  • Page 528 528
  • Page 529 529
  • Page 530 530
  • Page 531 531
  • Page 532 532
  • Page 533 533
  • Page 534 534
  • Page 535 535
  • Page 536 536
  • Page 537 537
  • Page 538 538
  • Page 539 539
  • Page 540 540
  • Page 541 541
  • Page 542 542
  • Page 543 543
  • Page 544 544
  • Page 545 545
  • Page 546 546
  • Page 547 547
  • Page 548 548
  • Page 549 549
  • Page 550 550
  • Page 551 551
  • Page 552 552
  • Page 553 553
  • Page 554 554
  • Page 555 555
  • Page 556 556
  • Page 557 557
  • Page 558 558
  • Page 559 559
  • Page 560 560
  • Page 561 561
  • Page 562 562
  • Page 563 563
  • Page 564 564
  • Page 565 565
  • Page 566 566
  • Page 567 567
  • Page 568 568
  • Page 569 569
  • Page 570 570
  • Page 571 571
  • Page 572 572
  • Page 573 573
  • Page 574 574
  • Page 575 575
  • Page 576 576
  • Page 577 577
  • Page 578 578
  • Page 579 579
  • Page 580 580
  • Page 581 581
  • Page 582 582
  • Page 583 583
  • Page 584 584
  • Page 585 585
  • Page 586 586
  • Page 587 587
  • Page 588 588
  • Page 589 589
  • Page 590 590
  • Page 591 591
  • Page 592 592
  • Page 593 593
  • Page 594 594
  • Page 595 595
  • Page 596 596
  • Page 597 597
  • Page 598 598
  • Page 599 599
  • Page 600 600
  • Page 601 601
  • Page 602 602
  • Page 603 603
  • Page 604 604
  • Page 605 605
  • Page 606 606
  • Page 607 607
  • Page 608 608
  • Page 609 609
  • Page 610 610
  • Page 611 611
  • Page 612 612
  • Page 613 613
  • Page 614 614
  • Page 615 615
  • Page 616 616
  • Page 617 617
  • Page 618 618
  • Page 619 619
  • Page 620 620
  • Page 621 621
  • Page 622 622
  • Page 623 623
  • Page 624 624
  • Page 625 625
  • Page 626 626
  • Page 627 627
  • Page 628 628
  • Page 629 629
  • Page 630 630
  • Page 631 631
  • Page 632 632
  • Page 633 633
  • Page 634 634
  • Page 635 635
  • Page 636 636
  • Page 637 637
  • Page 638 638
  • Page 639 639
  • Page 640 640
  • Page 641 641
  • Page 642 642
  • Page 643 643
  • Page 644 644
  • Page 645 645
  • Page 646 646
  • Page 647 647
  • Page 648 648
  • Page 649 649
  • Page 650 650
  • Page 651 651
  • Page 652 652
  • Page 653 653
  • Page 654 654
  • Page 655 655
  • Page 656 656
  • Page 657 657
  • Page 658 658
  • Page 659 659
  • Page 660 660
  • Page 661 661
  • Page 662 662
  • Page 663 663
  • Page 664 664
  • Page 665 665
  • Page 666 666
  • Page 667 667
  • Page 668 668
  • Page 669 669
  • Page 670 670

Newport HXP Motion Controller User manual

Type
User manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI