User Tools

Site Tools


microprofiling:linpos_howto

LINPOS-server

LINPOS-server is a standalone Win32 application allowing a complete control of motorized stages.

Supported hardware

  • Micos stages with Faulhaber/Pollux motors
  • LOT-Oriel motor
  • Dummy (motor emulation)

Installation instructions

are written here.

Before you start

  1. Connect the motor with the PC using a special cable (see screenshot)
    • Connect one end of the cable with the 9-pin connector to the motor
    • Connect the other end of the cable to the serial port (COM, or RS232) of the PC. If the PC does not have a COM port, use a USB-to-RS232 adapter: install drivers for the adapter, plug in the adapter, and hope that the system will recognize it.
    • Plug the power supply of the motor to the mains socket. After you do this, the motor should be powered, which you can test by trying to turn the motor spindle. This should be practically impossible, as the motor actively maintains its position.
  2. Check in the “System settings” the COM port number available on the PC (i.e., the native port or that associated with the USB-to-RS232 adapter)

How to control the motor with LINPOS-server

Interactive control through GUI

  1. Start LINPOS-server, and
    • Select COM port to which the motor is connected
    • Select the device number/id of the motor (should be written on the motor, and is usually 0, 1, or 2)
    • Select motor type
  2. Click on “Connect”. This should result in the current motor position being displayed in the yellow text field, which is a sign of success. If this does not happen, something is wrong and you need to check the cables, motor id, type, com port number.
  3. Once the motor position is displayed, you can set the motor velocity and a traveling range in the appropriate fields and test the movement. (Do not set the speed too high, typically 20-100 is good enough.)
  4. Use “Move Abs” to move the motor to a particular position, use “Move Rel” to move the motor by a particular position (our convention: positive numbers = down, negative = up).
  5. Use “Stop” to stop the movement. Use “Home” to set the current motor position to zero (0).
  6. Use hot-keys for more convenient control: F1=up, F3=down, F2=stop, Ctrl+Z=home. Make sure that up means up and down means down, and, particularly, that stop will indeed stop the motor immediately, to avoid later frustration when the sensors are attached.
    • When using hot-keys, just press them once, and do not hold.
  7. Set the software breaks of the motor movement. Their meaning: should the motor position exceed the break (either positive or negative) by the next movement command, the movement will not happen. Be aware that when testing the motor movement, the fact that it does not move even though you click on “Move Rel” or “Move Abs” may be due to the breaks being set to too low values.
  8. Check whether the motor speed is not too slow or not too fast for your application.

Remote control through TCP/IP

Motor connected to the LINPOS-server can also be controlled remotely using ASCII commands. Commands can be sent by any client connected to the LINPOS-server through the TCP/IP protocol (e.g., with G-client).

Syntax

  • Each command must end with a semicolon (;)
  • Multiple commands separated by a semicolon are also supported
  • The string of commands must end with \n\r (carriage return + line feed), i.e., the client application must end each command string with \n\r when sending it to the server!

Recognized commands

id N; set the ID of the active motor (i.e., the motor to be communicated with) to N
com N; set the COM port to which the motor is connected to N
type T; set the TYPE of the motor to T, where
T = F for Faulhaber motor; O for LOT/Oriel motor; P for Micos/Pollux motor; D for dummy motor
con; connect the motor
dis; disconnect the motor
sv N; set motor velocity to N
ma N; move to absolute position N
mr N; move by relative position N
stop; stop motor movement
home; set current position to zero
pos; ask for current motor position; reply will be returned
?; determine the status of the motor

Examples

  • To set motor position to zero, set velocity to 10 and move motor by 200, sent this to the server: home; sv 10; mr 200;\n\r
  • To ask the motor for the current position, sent this to the server: pos;\n\r
microprofiling/linpos_howto.txt · Last modified: 2013/09/10 12:23 by lpolerec

Page Tools