User manual

User manual
MoTex
Motorized beam expander
US ER MAN UAL
2014
UAB Altechna • Mokslininkų st. 6A, 08412 Vilnius, Lithuania
Tel. +370 5 2725738 • Fax +370 5 2723704 • E-mail: [email protected]
www.altechna.com
CO N T E N T S
1. Introduc tion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
5.4. “MoTex Selector” window overview.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 . A p p l i c at i o n s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
5.5. Control window description: “Zoom control” mode. . . . . . . . . . . . . . . . . . . . . 6
3 . T e c h n i c a l i n f o r m at i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
5.6. Control window description: “Output control” mode. . . . . . . . . . . . . . . . . . . 7
3.1. Main features.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
5.7. Control window description: “Setings” tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2. Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
6. M ot e x u s a g e w i t h PC - a d va n c e d u s e r s . . . . . . . . . . . . . . . 8
3.3. Possible configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
6.1. Virtual serial port.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.4. Optical Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
6.2. Unix-like operating system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.5. Mechanical Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
6.3. MoTex serial command summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.6. Electrical layout.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
6.3.1. Identifying serial port name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.7. Packaging contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
6.3.2. Serial port parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 . Ha r d wa r e i n s ta l l at i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6.3.3. Serial commands and protocol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5 . M oT e x u s a g e w i t h Wi n d o w s PC.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6.3.4. Software recommendations.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.1. Computer requirements.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
7. F r e q u e n t ly a s k e d q u e s t i o n s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1
5.2. Software installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
8. T r o u b l e s h o ot i n g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1
5.3. “MoTex” software description.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
9. C u s to m e r s u p p o r t a n d wa r r a n t y . . . . . . . . . . . . . . . . . . . . . . . . 1 1
1 . I nt r o d u ction
2. A p p l ications
MoTex has an expansion rate from 2.5X to 12X. Although it has such expansion rate all optical distortions are kept as low as possible. We are
able to achieve this because of innovative one non rotating moving lens
design that is driven by the stepper motor. All electronics that control the
stepper motor are integrated into the main housing.
• Laser beam size control
• Automatic control of focusing parameters (Numerical Aperture)
• Hands free operation in remote machinery places and hazardous conditions
Beam expander can be remotely controlled by software or can be driven
by two physical buttons on top of the housing. Using the software user
is allowed to select the magnification from the calibrated values by moving a magnification slider or select „user calibration“ to calibrate the device to the desired values. Optional functionality can be realized up on
the customers request.
2
www.altechna.com
3. T ec h nica l in f o r m ation
3.1. Main f eat u r es
• Aberration minimized design (special aberration compensation layout)
• Controller embedded in the same housing
• Suitable for usage with ultrafast picosecond and femtosecond lasers
• Optional adjustable mounting interface
• Reduced setup time by automatic magnification adjustment
• Manual magnification control
Information is subject to change without notice. Copyright 2014
3 .2 . S p eci f ications
Continuously variable magnification: 2.5X…12X
Wavelength range (custom wavelength available upon request):
• 1020 – 1070 nm
• 510 – 540 nm
• 340 – 360 nm
Figure 2. MoTex back view. All dimensions are in millimeters.
Material: Optical crown glass or UV grade fused silica (depending on
wavelength)
Control interfaces: USB 1.1/2.0/3.0 (“Virtual serial (COM) port”)
Software platform: Control software works in Windows OS: XP/2003/
Vista(32/64)/7(32/64)/8(32/64). Linux and MAC users can control device
with low level commands (drivers are not necessary), sent through virtual USB serial port.
Entrance beam diameter: up to 10 mm
Output beam diameter: up to 50 mm
Overall transmission: >98.5 %
Figure 3. MoTex right side view. All dimensions in millimeters.
LIDT: >7 J/cm2 for 10 ns pulses @ 1064 nm
Weight: <1 Kg
Positioning: for easier alignment input and output covers have removable aperture caps
3 .3 . Possi b l e con f i g u r ations
Wavelength and anti-reflective coating (if required) can be selected by
customer. Magnification range and output aperture can be selected by
the user. Mount has to be ordered separetly. Lens covers with alignment
holes are included as basic components.
3 .4 . O p tica l Desi g n
Figure 4. MoTex top view. All dimensions in millimeters.
3.6. E l ect r ica l l ayo u t
MoTex optical design for best performance and stability is based on one
moving lens design. No lens is rotating when changing the zoom level.
3 .5 . Mec h anica l Desi g n
Figure 5. Motex exterior. 1) Increase beam diameter button; 2) 12V power supply;
3) Decrease beam diameter button; 4) USB-B connection.
3.7. Pac k ag in g contents
Figure 1. MoTex front view.
3
www.altechna.com
• Motex beam expander with lens covers
• USB cable
• 12V power supply cable
• Software installation instructions
Information is subject to change without notice. Copyright 2014
4 . Ha r d wa r e insta l l ation
Figure 6. Lens safety caps are marked as 1) and 2), easy alignment caps are
marked as 3) and 4).
Figure 7. On the right side of MoTex there are three groups of mounting points.
On each group there are two M4 threads and one M6 thread. MoTex can be
mounted using these threads.
5 . MoT e x u sag e w it h Win d o w s P C
5 .1 . Co m p u te r r e q u i r e m ents
4. Installation window will appear, click “Next” to continue:
• Free USB port. MoTex is compatible with USB 1.1, USB 2.0 and USB 3.0
• Computer administrator rights (installation only)
• Windows XP sp3 (32-bit)
• Windows Server 2003 sp2 (32-bit)
• Windows Vista sp1 (32/64-bit)
• Windows Server 2008 (32/64-bit)
• Windows 7(32/64-bit)
• Windows 8(32/64-bit)
• Microsoft .Net framework 4.0 redistributable (installs automatically)
(please in section ?? for more information)
5 .2 . S o f t wa r e insta l l ation
1. Check for and download only latest “MoTex” software installer package
from
www.wophotonics.com/products/optomechanics/motorized-beamexpander-motex.
5. Select installation directory and click “Next” to begin installation:
2. Run the downloaded “MoTex-Setup.exe” installation file. In case you
are installing on operating system that does not meet requirements for
“MoTex” software, only USB drivers will be installed.
3. Click “Yes” to continue.
4
www.altechna.com
Information is subject to change without notice. Copyright 2014
6. “MoTex” software requires “Microsoft .NET Framework 4 Client Profile”
or higher version to be installed. Setup will offer to download it, choose
“Yes” if you have active internet connection. Choose no to download it
from:
9. Setup will finish by installing drivers. Click “Next” to continue:
www.microsoft.com/en-us/download/details.aspx?id=17113” and install
it manually.
You should choose “No” if you wish to install any newer version of framework, or do not have a working internet connection. This dialog will not
appear if framework is already installed. Download size is 42 Mbytes.
7. Setup will download “Microsoft .NET Framework 4 Client Profile”.
10. Press “Finish” to end installation. Program can not be opened if only
drivers were installed (see step 2 for details). “MoTex” software icon will be
created on “All Users” desktop and “All Users” start menu.
8. After download is finished, “Microsoft .NET Framework 4 Client Profile”
will be installed, wait for it to complete. This can take more than 10 minutes on slower computers.
11. Connect MoTex and PC via USB cable.
12. Plug in MoTex power supply jack and AC adaptor to wall outlet.
13. Windows will detect new hardware. Wait until windows configures
new device.
14. Device installation is now complete
5
www.altechna.com
Information is subject to change without notice. Copyright 2014
5 .3 . “ MoT e x ” so f t wa r e d esc r i p tion
If your operating system version meets requirements for “MoTex” software, as shown in Table 1, you will be able to use fully functional MoTex
control application. Otherwise, go to section “MoTex serial command
summary” on page 8 and read how to use this device with serial port
and commands.
“MoTex” program can be started by an icon, located on desktop or in start
menu
under “All programsnAltechnanMoTex”.
“MoTex” software consists of two windows: “MoTex Selector” window
fig. 8 and “MoTex control” window fig. 9.
5 .4 . “ MoT e x S e l ecto r ” w in d o w o v e r v ie w
“MoTex Selector” contains a list of currently connected and powered
beam expanders. This window is open all the time while program is running. Functions of this are described in next chapter.
Press this button if not all devices are
detected and listed in the list bellow. This
will force searching for MoTex devices
Select Motex you want to control from
the list and press this button. “MoTex
control” window will appear
List of currently connected and powered
on MoTex devices. If not all devices
are listed, press “Search for Devices”
button to refresh. There are two devices
connected in current example. Column
meanings are described later in this
document
Displays information about “MoTex”
software version and shange log
Figure 8. “MoTex Selector” window.
This window is used to choose which device to control if there are more
MoTex’es connected to computer.
“Search for Devices” button: you should click this button if not all devices
are detected and listed.
“Connect” button: select MoTex device you want to control from the list
and click this button. “MoTex control” window will appear. If only one MoTex is connected on program startup, control window will be opened
automatically.
5.5. Cont r o l w in d o w d esc r i p tion : . . . . . . .“ Zoo m cont r o l” m o d e
First run “MoTex control” window with factory setings (except name) is
shown in the picture below; MoTex is set to 250% (2.5x) of magnification.
MoTex zooming level can be changed in 0.1% steps. Minimum zoom
level is 250% and maximum is 1200%. Enter any number of this range
into the upper text field. Decimal point is represented by symbol “.” (dot),
not comma: for example “600.5” is a valid value, but “600,5” is not. Click
“Go” button to apply new zoom value. Lower slider will jump to position
representing zoom level of 600.5%. Upper slider will begin to move towards the same position as well. Lower slider reflects percentage entered
into textbox, and upper slider shows MoTex position in real time. You can
move lower slider to change text box value and vise versa.
Shows zoom
value, which
MoTex is
currently set
to. This is a
text representation of
upper slide
bar’s position
Switch
between
“Zoom control”
or “Output
control” modes
MoTex
name
and
serial
number
Curently zoom level is
selected as percents, valid
range is 250% ... 1200%. Go
to settings tab to change
measurement units to ratio
(valid range is 2.5x ... 12x)
Enter
required
zoom level
here, or
slide lower
slide bar to
change this
value. Click
“Go” to set
zoom
Upper slider
represents
actual zoom
level
Move lower
slider to
change
required
zoom level.
Click “Go”
button to
drive MoEwx
to wanted
zoom level
Click “Go”
to apply
zooming
level which
is shown in
upper text
box
Hold this
button to
constantly
decrease
zooming
Hold this
button to
constantly
increase
zooming
Immediately
stops MoTex
zooming
action
Figure 9. “MoTex control“ window in “Zoom control” mode. This window is used
to control zooming level if input beam diameter is unknown.
If you do not want to operate with hundreds of percents, go to “Setings”
tab and change measurement units to “Ratio...”, as shown in fig. 12. Previously used 600.5% will be rounded to 6.01x. With this option enabled
user can enter zoom in range of 2.5x .. 12x in steps of 0.01. Control window with new zoom applied (6.01x) is shown in fig. 10. At the output of
MoTex the resulting beam diameter will be 6x larger than input, but not
wider than 48 mm.
Device list column description: “Name” column: it is convenient to give
meaningful titles for each MoTex device that will be recognized by the
system.
“S/N” column: abbreviation “S/N” means “serial number”. This column
shows unique MoTex hardware serial number. It is used to distinguish
different devices, because factory names for each device are equal. Despite this, user can change name for each device, which is also saved into
hardware.
“COM” column: this column shows USB serial port name assigned by Windows. Each MoTex gets unique serial port name after first enumeration
with computer. Serial port name is necessary to know for users who want
to use serial commands in their applications. See chapter “MoTex serial
command summary” on page 8 for more details on this.
6
www.altechna.com
(a)
(b) First sub-figure
Figure 10. “Zoom control” window when “Measurement units” found in “Setings”
tab is set to “Percentage (200%..)” – 10a, and “Ratio (2x..)” – 10b.
Button “Go”: click this button to apply zoom level value entered in “Enter
required zoom” text field.
Information is subject to change without notice. Copyright 2014
Button “<<”: keep pressing this button to continuously decrease output
beam diameter. Releasing it will stop MoTex. This button acts the same
way as a pushbutton on top of MoTex body, marked as “-“ symbol. Device status LED will begin to blink once a second if minimum zoom is
reached.
Select “Ratio (2x...)” to scale zooming in percents to shorter form as ratio. For
example 250% can be theated as 2.5x, 600% is 6x, and 1200% is 12x
Click this button drive MoTex
to factory calibrated 2.5x
magnification position.
This must be done after
accidental powe loss while
shanging zoom. This must
be done if software promts
to do so. This should be
done also after more than 10
device power cycles. Ignoring
these rules can cause miss
calibrated and faulty device
operation!
Button “>>”: keep pressing this button to continuously increase output
beam diameter. Releasing it will stop MoTex. This button acts the same
way as a pushbutton on top of MoTex body, marked as “+“ symbol. Device status LED will begin to blink two times in a second if maximum
zoom is reached.
“STOP!” button: click this button to cancel zooming operation.
5 .6 . Cont r o l w in d o w d esc r i p tion :
. ......“O u t p u t cont r o l” m o d e
Users, that know input beam diameter, should switch to “Output control” mode of operation by clicking on “Output control” tab fig. 11. “MoTex control” window with factory setings (except name) is shown in the
picture below; MoTex is set to 250% (2.5x) of magnification. User should
measure laser beam diameter (measurement units are millimeters) and
enter it in upper textbox (“Enter Input Beam Diameter (mm)”). According
to it, possible output beam diameter values are recalculated, minimum
and maximum values are updated on the ends of lower track bar. For
example, if input beam diameter is set to 5 mm, user will be able to enter
output beam diameter in range from 12.5 mm (5x2.5 – input beam times
minimal zoom) to 48 mm (absolute maximum).
Enter laser beam
diameter at MoTex
input, Measured in mm
Enter required output beam
diameter here, or slide lower
slide bar to change this value.
Click “Go” to apply this output
beam diameter
Here output diameter is
shown in real time
You can change number in
“Output Beam Diameter” field
by moving lower lower slider
Minimal and maximal output
beam diameter values are
recalculated if user change
input beam diameter
Click “Go” to apply value
shown in “Output Beam
Diameter” field
Hold one of these
buttons to constantly
decrease or increase
output beam diameter
Immediantly
stopsMoTex zooming
action
Figure 11. “MoTex control“ window in “Output control” mode. This window
should be used to control output beam diameter if input beam diameter is
known.
5 .7 . Cont r o l w in d o w d esc r i p tion :
. ......“ S etin g s” ta b
“Measurement Units” seting is used in “Zoom control” mode to scale percentage value to shorter form. Select “Percentage (200%..)” in order to
enter zoom value in range of [250 .. 1200] % or select “Ratio (2x..)” in order
to enter zoom value in range of [2.50 .. 12.00].
7
www.altechna.com
Opens dialog box where current name “MoTex 2” can be changed to some
different text
Figure 12. “Setings” tab.
Button “Move motor to home limit switch”. MoTex is driven by a stepper motor. Each zooming value corresponds to exact motor position.
Hardware memorizes motor location after each zoom value change, so
if there is any sort of disruption during magnification move, for instance
– power supply loss, MoTex won’t save correct motor position. In such
case, device will report false zoom value on next start, motor position
will have an offset with actual zoom value. If user will try to set minimum
or maximum magnification, motor will reach internal limit switches. Program is tracking limit switch activity and once limit switch is reached, a
message box with a warning message will appear, urging to press this
button:
Figure 13. Message box saying that user should home MoTex.
Beside this message box, user will see red-highlighted text “Calibrate!” in
the upper right corner of the window in fig. 14. “Move motor to home
limit switch” button must be pressed to remove this reminder. This process cannot be automated by program itself, because MoTex will change
zoom value when homing and such behavior would be inappropriate
to user.
This button should also be pressed if MoTex is power supply cycled more
than 10 times. Almost every power cycle induces a minute stepper motor motion, because it looses its holding torque and comes to most stable position. These movements tend to occur in random directions and
mostly cancel themselves, we advice to home MoTex frequently depending on individual usage. Such accidental motor movement induces 0.1%
in zooming error, 10 such errors could lead to 1% of zoom accuracy in
worst case scenario.
Button “Change MoTex Name” will open window where user can rename
MoTex device (). Name will be updated and visible in “Control” window
title bar and in “MoTex” selector list. Name must be up to 20 characters
in length.
Information is subject to change without notice. Copyright 2014
Enter new MoTex name here.
Click OK to apply
(a)
(b) First sub-figure
Figure 15. MoTex rename window.
Figure 14. Red warning reminding that user should home MoTex (left). This
message will appear after successful MoTex home operation (right).
6 . Mote x u sag e w it h P C - a d vance d u se r s
6 .1 . Vi r t ua l se r ia l p o r t
6.2. Uni x - l i k e o p e r atin g s yste m
When MoTex is attached to the computer, it appears as “Virtual serial
port” or “COM port” under computer devices list. Such ports are used to
send and receive alphanumerical or binary data to variety of devices; traditionally it is used to control GSM modems and mobile phones. MoTex
receives commands that are sent to that port and changes zoom level
accordingly. MoTex can be controlled by opening this port with any kind
of terminal software (for example “Hyper terminal”, which is preinstalled
in Windows XP), and manually entering dedicated commands (see “MoTex serial command summary” on page 8). Another option to use
MoTex is to write scripts or software that automates command management. This possibility should be interesting to laboratory users, working
with telemetry or scientific software packages, for example National Instruments “LabView”, which has support for serial port communication.
“Altechna R&D” supplies fully functional MoTex control software for users
running most of Windows Operating system versions.
There is no need to install any drivers on modern Unix-like (Linux “Ubuntu”, “Slackware”, MAC OSX) operating systems. MoTex is automatically recognized and installed as “ttyUSB” device after connecting it to computer.
Serial port called „ttyUSB0“ is assigned to MoTex controller automatically
by OS. You can check which serial port is assigned in Your computer with
„sudo |dmesg | grep cp210x“ command. We communicated with controller by using „CuteCom“ program. Currently we do not have prepared
software libraries for MoTex yet, but user will find all essential functions
written in C# (Visual studio 2010) in „WattPilotProgrammingExample.7z“.
This archive contains source project. “Compiled EXE.7zip“ contains compiled output from mentioned sources, and „Software example. pdf“ contains all controller command summary, but it can also be found in Watt
Pilot user manual. This software example calculates and moves beam
expander to desired zoom levels it also supports homing and motor position monitoring. You can port theese essential functions from C# to any
programming language You need.
USB drivers and/or “MoTex” software should be installed before connecting MoTex to computer. Follow section “Software installation” on
page 4 to install it. MoTex virtual serial port driver and “MoTex” software compatibility with Microsoft operating systems is described in the
table 1 below. Note that serial port driver is available for more systems
than “MoTex” software. For example, you can send MoTex commands via
serial port from Windows XP Service Pack 1, because driver is available,
but “MoTex” software will not run unless Service Pack 3 is installed.
Has “serial port”
Has “Motex”
driver support? software support
Prior to Windows 2000
No
No
Windows 2000 (32-bit)
Yes
No
Windows XP (32-bit) Yes
Yes, with Service
pack 3 installed
Windows Server 2003 (32-bit)
Yes
Yes,
with Service pack
2 installed
Windows Vista (32/64-bit)
Yes
Yes,
with Service pack
1 installed
Windows Server 2008 (32/64-bit)
Yes
Yes
Windows 7 (32/64-bit)
Yes
Yes
Windows 8 (32/64-bit)
Yes
Yes
8
www.altechna.com
6.3.1. I d enti f y in g se r ia l p o r t na m e
First step to control MoTex using serial port and commands would be to
find which serial
port is assigned for device. This can be seen in “MoTex Selector” list – see
section “MoTex Selector” window overview on page 6.
Table 1. MoTex supported Microsoft operating systems.
Operating system
6.3. MoT e x se r ia l co m m an d s u m m a r y
In case if only drivers were installed (no “MoTex” software itself – see
Table 1 on page 8) serial port name could be checked in Windows
“Computer manager”. Right click on “My Computer” (1), select “Manage”
(2). “Computer manager” window will appear. Click on “Device Manager”
under “Computer Management” tree (3) and look for “Ports (COM and
LPT)” (4). Each connected and powered on MoTex appears as “Silicon
Labs CP210x USB to UART Bridge (Serial port name)”. Serial port name is
shown in parentheses fig. 16.
Third way to identify MoTex is to open each serial port and send “GetSerialNumber” command. If MoTex is present on that port, it will send
back string starting with “1MOT” which is a part of serial number and is
constant for all MoTex devices. If MoTex is not present, no bytes will be
received or received string will not begin with “1MOT”. Serial port read
timeout can be set to 50 ms to speed up scanning process. This method
is universal and can be used with any operating system. Read next chapters about serial port parameters and command list.
Information is subject to change without notice. Copyright 2014
Linux users can find MoTex port by executing command “root |dmesg |
grep cp210x”:
In the picture above we can see that one MoTex (cp210x) device is assigned to “ttyUSB0” port. There is also shown installation command for
“CuteCom” package, which is easy to use terminal application wth GUI.
Figure 17. Finding MoTex serial port under Linux. Screenshot is taken on
Slackware Linux 13.37 32 bit OS.
Figure 16. Finding MoTex serial port name using Windows “Computer Manager”.
6.3 .2 . S e r ia l p o r t pa r a m ete r s
Serial port parameters to be used are shown in a table below.
Table 2. Serial port parameters.
Baud rate
38400
Parity
None
Handshaking
No
Stop bits
1
Table 3. Serial commands description.
6.3 .3 . S e r ia l co m m an d s an d p r otoco l
MoTex is a slave device according to computer and computer is a master
device. That means that PC sends data requests to MoTex, and MoTex
must respond. MoTex itself will never send data to computer without
request.
MoTex writes all received bytes to internal buffer. If it receives “carriage
return” symbol (or ‘nr’ in C++ denotation, 13’th symbol in ASCII table, or
0x0D in hex), device will try to parse received bytes as a command string
and will execute it if no errors was found. MoTex echoes back every byte
it receives back to computer except for ‘nr’. Symbol echoing is essential
for users who literally type commands in terminal window. This enables
user to see what data is sent to device, because not all terminal programs
has a text field where sent symbols are shown.
MoTex will respond to byte nr’ by sending additional data (if command
requires it) and acknowledge (ACK) or not acknowledge (NACK) string.
ACK string (4 bytes) is “ >nrnn” (or 0x20, 0x3E, 0x0D, 0x0A in hex); NACK
string is “ ?nrnn” (or 0x20, 0x3F, 0x0D, 0x0A in hex), first symbol is “space”.
If MoTex response ends with ACK string, it means that received bytes
were parsed successfully and device is ready to receive next command.
If response ends with NACK, it means that receive buffer had no valid
command, command was ignored and device is ready to receive next
command. Termination symbols “nrnn” are essential for users who literally
type commands in terminal window. These symbols are not visible, but
they format “received data” window text so it looks organized.
9
www.altechna.com
From computers perspective each command is ended by byte ‘nr’. “Enter”
key press usually sends this symbol in most of terminal programs. Command and command parameter is separated by space symbol (0x20). For
example, typing such string “zs 3000” in terminal application and pressing enter key on the keyboard will set MoTex zoom to 300.0%. Here “zs”
(0x7A, 0x73) is a command, space (0x20) is a separator, and “3000” (0x33,
0x30, 0x30, 0x30) is a command parameter that corresponds to 300.0%.
All sent bytes in hexadecimal will be (0x7A, 0x73, 0x20, 0x33, 0x30, 0x30,
0x30, 0x0D), including command end symbol ‘nr’, or “Enter” key press.
New command can be sent only after ACK or NACK received, otherwise
command misinterpretation can occur. See table below for more commands.
Command name:
Zoom set
zs x
Description:
Sets zoom value in range of 250.0% .. 1200.0%, in 0.1% steps.
Parameter x:
Integer number in range 2500 .. 12000. Last digit equals to 0.1%. This
command can be used in polling mode. Polling interval can be 30 ms
or more.
Return string:
;[1];[2];ACK
[1] – integer. MoTex internal command parser output for parameter x.
This value is a copy of parameter x, as MoTex understood it. For instance,
user can send erroneous command “zs nr”, that has no parameter at all,
only space. MoTex will parse such string as it was “zs 0nr”, in other words
no digit means “zero” to MoTex command parser. This return value must
always be the same as x parameter for correct operation.
[2] – integer. Error status. Error status value meaning:
0 – OK, no error. Zooming value will be set to value returned as [1];
1/2/3 – Integer. Hard stop error. This means that one of hardware limit
switch was activated. User must execute “Go Home” command (see section “setings TAB”). Zooming value will be set to value returned as [1];
4 – Already moving error. Previous “Zoom Set” or “Go Home” command is
not completed yet. Wait for it to complete (use “Zoom Get” command to
check device status). This command is ignored, MoTex continues movement;
5 – Out of range error. Value [1] is not in the range 2500..12000. This command is ignored, MoTex state did not changed; Usage example: send
Information is subject to change without notice. Copyright 2014
command “zs 6005nr” [0x7A, 0x73, 0x20, 0x36, 0x30, 0x30, 0x35, 0x0D]
to set zoom value to 600.5%. Terminal will receive string: “zs 6005;6005;0;
>nrnn” [0x7A, 0x73, 0x20, 0x36, 0x30, 0x30, 0x35, 0x3B, 0x36, 0x30, 0x30,
0x35, 0x3B, 0x30, 0x3B, 0x20, 0x3E, 0x0D, 0x0A].
Echoed back bytes are “zs 6005”. Response is “;6005;0;”. “6005” means that
zoom will be set to 600.5%, “0” means zoom changing has begun. If “4” will
appear instead of “0”, one must wait till previous operation completes. “2”
means that “Go Home” command must be sent for proper operation.
to “0”. These error flags are reset to “0” after issuing this command. Use
“Zoom Get” command to check if motion has finished.
Return string:
ACK
Usage example: send command “zpnr” [0x7A, 0x70, 0x0D]. Terminal will
receive string “zp > nrnn” [0x7A, 0x70, 0x 20, 0x3E, 0x0D, 0x0A]. Now keep
sending string “zgnr”, and wait until response to this command will become “0;x;x;”, which means motor is stopped.
Command name:
Zoom get
zg
Command name:
Show Name
pn
Description:
Get current zoom value. Can be used to update graphical user interface
(GUI) with zoom status at real time. Can also be used to check if previous
zooming operation has completed. This command can be used in polling mode. Polling interval can be 30 ms or more.
Return string:
[1];[2];[3];ACK
[1] – Integer. Possible values are “0” and “1”. “1” means that currently MoTex
is changing zoom value or homing and cannot accept “Zoom Set” command. Monitor this value in order to check if device is ready to execute
“Zoom set” command. “0”means that device is stopped and can execute
“Go home” or Zoom Set” commands.
[2] – Integer in range of 2500 .. 12000. Current zoom value. 2500 represents 250%, 12000 equals to 1200%. Monitor this value if application
requires refresh MoTex status.
[3] – Integer. Hard stop error status. One of hardware limit switch was
activated if this value is not equal to “0”. User must execute “Go Home”
command for proper future operation (see section “setings TAB”) [3] – Integer. Hard stop error status. One of hardware limit switch was activated
if this value is not equal to “0”. User must execute “Go Home” command
for proper future operation (see section “setings TAB”).
Usage example: send command “zg” [0x7A, 0x67, 0x0D]. Terminal will
receive string: “zg0;2500;0; > nr nn” [0x7A, 0x67, 0x30, 0x3B, 0x32, 0x35,
0x30, 0x30, 0x3B, 0x30, 0x3B, 0x20, 0x3E, 0x0D, 0x0A]. Echoed back
bytes are “zg”, response is “0;2500;0;”. First “0” means that MoTex motor is
stopped, “2500” represents current zoom (250.0%). Second “0” means that
no hardware errors occurred. If this value becomes “1”, “2” or “3”“Go Home”
command must be executed for normal operation.
Description:
Return MoTex name. Name can be up to 20 characters in length.
Return string:
[char array]ACK
[char array] – up to 20 bytes.
Usage example: send string “pn nr” [0x70, 0x6E, 0x0D]. Device will send
back string “pnMoTex > nrnn” [0x70, 0x6E, 0x4D, 0x6F, 0x54, 0x65, 0x78,
0x20, 0x3E, 0x0D, 0x0A]. In this case, beam expander name is “MoTex”. Use
“Save Name” command to rename the device.
Command name:
Stop
st
Description:
Show MoTex serial number. This string should be used to distinguish
between several devices atiached to the same computer. MoTex serial
number begins with “1MOT”. Rest of the symbols always differs.
Return string:
[char array]ACK
[char array] – up to 16 bytes.
Usage example: send string “pw nr” [0x70, 0x77, 0x0D]. Device will send
back string “pw1MOT101A > nrnn” [0x70, 0x77, 0x31, 0x4D, 0x4F, 0x54,
0x31, 0x30, 0x31, 0x41, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x3E, 0x0D, 0x0A]. In this case serial number is 1MOT101A.
Description:
Stop MoTex motion. This command will cancel current zooming operation, use “Zoom Get” command to check and wait for MoTex to stop.
Return string:
ACK
Usage example: send command “stnr” [0x73, 0x74, 0x0D]. Terminal will
receive string “st >nrnn” [0x73, 0x74, 0x20, 0x3E, 0x0D, 0x0A]. Now keep
sending string “zgnr”, and wait until response to this command will become “0;x;x;”, which means motor is stopped.
Command name:
Save Name
sn x
Description:
Set new name for MoTex. Name can be up to 20 characters in length.
Parameter x: char array, up to 20 characters.
Return string:
ACK
Usage example: send string “sn New Name nr” [0x73, 0x6E, 0x20, 0x4E,
0x65, 0x77, 0x20, 0x4E, 0x61, 0x6D, 0x65, 0x0D] to set MoTex name to
“New Name”. Device will send back string “sn New Name > nr nn” [0x73,
0x6E, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x4E, 0x61, 0x6D, 0x65, 0x20, 0x3E,
0x0D, 0x0A].
Command name:
Show serial number
pw
6.3.4. S o f t wa r e r eco m m en d ations
Command name:
Go home
zp
Description:
This command drives MoTex to factory calibrated 2.5x magnification position. This command must be sent if “Zoom Set” command returns error
code “1”, “2” or “3”, or if “Zoom Get” commands return value [3] is not equal
10
www.altechna.com
There are plenty of applications built for serial port communication.
Windows XP (and full installations of Windows 7 or Windows 8) has native “hypertrm.exe” terminal application that can be launched by typing
“hypertrm” in “Run” dialog (Winkey + R). Linux and OS X users can use
free “CuteCom” (http://cutecom.sourceforge.net) utility, see Figure 10 on
page 6. For Windows OS it is recommended to use free tool “terminal.
exe” from https://sites.google.com/site/terminalbpp.
Information is subject to change without notice. Copyright 2014
Configure “terminal.exe” as follows:
1. Select correct com port number (see Identifying serial port name on
page 8);
2. Select correct serial port configuration values (see Table 2 on page 9);
3. Set “Hex” checkbox if received characters should also be shown as
hexadecimal values;
4. Click “Connect” button;
5. Type in command and press “Enter” key on keyboard. Command string
“pnnr” is sent to device as shown in example picture. Look at the Table 3
on page 9 for available commands;
6. MoTex response is shown in middle pane. Hex representation of all
received bytes are shown on the right. MoTex name is set to “New Name”,
as shown in fig. 18.
7. F r e q u ent ly as k e d
q u estions
1. Q: Actual zoom level is not what I have set using terminal or “MoTex”
software. What should I do?
A: “Go Home” command should be sent MoTex either by issuing “zpnr”
command – see Table 3 on page 9, or by pressing “Move motor to
home limit switch” button in “MoTex” software “Setings” tab (see page 7).
2. Q: I see “Firmware upgrade” window. What should I do?
A: “MoTex” software always checks firmware version on device, and updates it if needed. This process will take up to one minute and requires
that user do not disturb update process. This process is not cancellable.
Do not disconnect USB and power supply cables, do not shutdown
computer. This window can appear after “MoTex” software is updated,
because latest firmware comes with latest MoTex installer file. Upgrading
process is indicated by “Firmware Upgrade” window. Confirmation message will appear after process is completed and program will continue
as usual.
8. T r o u b l es h ootin g
Firmware upgrade process was interrupted. I cannot communicate
with device anymore.
1. Close “MoTex” software window;
2. Disconnect power supply from MoTex by unplugging power supply
plug;
3. There is a 1 mm hole in the left of status LED. Firmware recovery button
is located under it. Use not metallic stick and press that button. Keep it
pressed and connect power supply;
Figure 18. “terminal.exe” window with “Show Name” command sent.
4. Release this button after plugged in power supply plug;
5. Start “MoTex” software, select device from the list and click “Connect”
button. Firmware upgrading process will popup, wait for it to finish. Program will continue as usual.
9. C u sto m e r s u p p o r t an d
.... wa r r ant y
Figure 19. Command string presets can be configured by clicking “Set Macros”
button in main “terminal.exe” window.
Presets can be configured for frequently used commands. Click “Set Macros” button, “Macro Setings” window will appear.
Type in string which should be sent, and name of this preset. Hexadecimal values can be entered with “$” prefix. For example command end
symbol “nr” [0x0D] should be entered as “$0D”. “Stop” command definition is shown in example. Click “Save” button to save your presets. “Stop”
button will appear in “Macros pane” of main window. Press it to stop MoTex motion.
11
www.altechna.com
All technical issues during the warranty period, arising from proper use
of the system should be solved by Altechna R&D. Any technical issue
should be discussed through Skype, phone or email and effort should
be made from both sides to solve the problem in a distance through
consultations. If remote solving of the problem fails, the nonworking device should be sent back to Altechna R&D through its delivery account. If
the device cannot be repaired a new working device will be sent to the
client as a replacement. After the warranty period expires, Altechna R&D
ensures fee based maintenance. The key components of the device bear
one year of warranty as a default. Extension of warranty is possible and
can be quoted on request. Optics shall be treated as consumables, therefore only warranty is valid for a period of one month after the installation.
If the any components are damaged by the user’s fault - warranty will be
invalidated and repair cost will be paid by the client.
Information is subject to change without notice. Copyright 2014
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement