*****************************************************************
Introduction
AMS - Advanced Microstepping Controller - is a system for the control of the movements of small stepper motors (SM) since a maximum of 1.5 A for phase. 1 AMS can manage simoultanously 2 SM for the positioning as well as for the tracking
AMS implements the so called "opened ring" architecture, the quantization of the movement is given from the stepper motor of which is known the angular movement linked to an impulse.
The used technique in order to pilot the motors is called microstepping, Using this modality the angular step of the motor is setted via software, starting from the minimal value of 1/256 to ½ of the nominal step of the motor. Practically it is as to have a demoltiplier factor that can be setted electronically
The system moreover allows to vary the power engaged to the motors from a minimum of 30% (0.45A) to 100% (1.5A).
Other feature of this system is that one of being able to execute arbitrary tracking on both the axis.
At last one of the more interesting possibilities offered from this system is the possibility to connect in cascade unitl a maximum of 256 AMS, Since each AMS has an identity number ranging from 00 to FF, with only one serial port it should be possible to control a maximum of 512 motors.
Back to main
Back to AMS2 (Advanced Micro Stepping) Controller *****************************************************************
RS232 Connection and Transmission Protocol
AMS is controlled through one RS232 serial port with parameters: 19200, N, 8,1.
The transmission protocol employs only printable ASCII characters.
Each sent string is composed of:
- SOT - Start Of Text character = '$'
- EOF - End of Field character = '#'
- EOS - End Of String character = CR (13). Between EOF and CR there are 2 Hexadecimal digits that is the 8-bit CheckSum that is calculated from the SOT to the EOF (Excluded).
After the SOT there is always the address of the used AMS device (00-FF).
To any string sent to the AMS correspond a return string confirming the executed command. In case of normal command () the answer can be:
- ACK if the command is executed without errors
- NAK if the execution of the command encoutered some errors The answer can be also something different from ACK or NAK. It could be a requsted status (i.e 0 if the positioning is already performed and the SM is stopped or 1 if the positioning is still on going).
COMMAND FORMAT |
$ Addr Command # Cksm CR
|
ANSWER TYPE |
$ Addr ACK # Cksm CR |
If the field address does not contain a valid value no answers from the device have to be expected.
AMS answers after the execution of the command, the answer is received at the maximum after 20 mS.
The commands sent to the AMS present parameters for motor A and B; the first parameters are for motor A and the following for motor B
<CENTER>
Back to main
Back to AMS2 (Advanced Micro Stepping) Controller
*****************************************************************
AMS Hardware Architecture
The frequence F1, used for tracking, home and work is:
where n is a 32 bit value.
The frequence F2, used for the positioning is:
where k is the 8 bit value loaded in the multiplier.
<CENTER>
Back to main
Back to AMS2 (Advanced Micro Stepping) Controller
*****************************************************************
AMS Commands
<CENTER>
\e Back \e to \ref main\n
\e Back \e to \ref amsmainpage
</CENTER>
In the following table are listed all the commands that can be sent to the AMS.
For each command are shown:
- The Decimal Code (Dec. Code column)
- The relative ASCII character (ASCII Char column)
- The numbers of parameters toghether with the format and the motor target (A or B) (Param/Format/Target column)
- The values that the parameters can assume (Param Range column)
- The operation on the Stepper Motors or AMS (Action column)
- The implemented function in DAS
Format Legend
- U8 = unsigned char - 1 Byte - 8 bits - 2 Hex Digits
- U16 = unsigned long - 2 Bytes - 16 bits - 4 Hex Digits
- U32 = unsigned long - 4 Bytes - 32 bits - 8 Hex Digits
For the Italian Version of the command please go to AMS Comandi (IT)
# | Dec. Code | ASCII Char | Param/Format/Target | Param Range
(Hex) | Action | Implem.Function |
1 | 37 | "%" | None | None | Return the firmware revision | AMS_firmrev |
2 | 38 | "&" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - 4C
Default 19H (0.5A), bit weigth = 0.02A | Set the power for the motors | AMS_Power |
3 | 39 | "'" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - 0D | Set the AMS Steps/round for the stepper motors | AMS_Step |
4 | 40 | "(" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - FF
Default 20 | Set the value for the slope | AMS_Slope |
5 | 41 | ")" | PAR / U8 / AMS | 00 - FF
Default 0 | Set the new address for the AMS | AMS_assadd |
6 | 42 | "*" | PAR1 / U8 / H_A
PAR2 / U8 / W_A
PAR3 / U8 / H_B
PAR4 / U8 / W_B | 00 - 01
Default 0 | Set polarity for the HOME and WORK position | AMS_SetPolarity |
7 | 43 | "+" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - 01 | Search the HOME position for the specified motor (HOME Presetted Values) | AMS_Home |
8 | 60 | "<" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - 01 | Search the HOME position for the specified motor (hdefault) | AMS_HomeDefault |
9 | 71 | "G" | PAR1 / U8 /
A(0) or B(1)
| 00 - 01 | Verify the HOME position. Return 1 if HOME pos is reached. | AMS_TestHome |
10 | 44 | "," | PAR1 / U8 / A
PAR2 / U8 / B | 00 - 01 | Search the WORK position for the specified motor (wpreset) | |
11 | 61 | "=" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - 01 | Search the WORK position for the specified motor (wdefault) | |
12 | 72 | "H" | PAR1 / U8 /
A(0) or B(1)
| 00 - 01 | Verify the WORK position. Return 1 if HOME pos is reached. | AMS_TestWork |
13 | 45 | "-" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - 01
Default 0 | Invert Direction of the selected motor (1 invert) | AMS_dirfin |
14 | 46 | "." | PAR1 / U8 / A
PAR2 / U32 / A
PAR3 / U8 / B
PAR4 / U32 / B | PAR1, PAR3: 00-01
PAR2, PAR4: 00000000-FFFFFFFF | Send the directions and steps for steppers positioning | AMS_DoPos |
15 | 47 | "/" | None | None | Return the status of the Input Port | AMS_chkbitsts |
16 | 48 | "0" | PAR1 / U8 / A
PAR2 / U32 / A
PAR3 / U8 / B
PAR4 / U32 / B | PAR1,PAR3:00-01
PAR2, PAR4:
00000000-FFFFFFFF | Send the parameters for the tracking for motor A and B (trackex) | AMS_TrackOn |
17 | 49 | "1" | PAR1 / U8 /
A(0) or B(1)
| 00 - 01 | Read the steps performed from one motor. Return an U32 value | AMS_ReadStep |
18 | 50 | "2" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - 01
Default 1 | Set the status of the motors (0=OFF, 1=ON) | AMS_MotorOn_Off |
19 | 51 | "3" | PAR1 / U8 /
A(0) or B(1)
| 00 - 01 | Set to zero the number of steps for the selected motors | AMS_AzzeraCoord |
20 | 52 | "4" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - FF
Default 7 | Set the speed of positioning (posspeed) | AMS_Speed |
21 | 53 | "5" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - 02 | Activate (PAR = 1), Deactivate (PAR = 0) the Track on the selected Motor. PAR = 2, ignore command | AMS_TrackOff |
22 | 54 | "6" | PAR1 / U32 / AMS
PAR2 / U32 / AMS | PAR1, PAR2:
00000000-FFFFFFFF | Activate PWM output (pwmex) | AMS_PWM |
23 | 55 | "7" | None | None | Deactivate PWM | |
24 | 56 | "8" | PAR1 / U8 / A(0) or B(1) | 00 - 01 | Verify if the positioning on the selected motor has been completed (1) or not (0) | AMS_TestPos |
25 | 57 | "9" | PAR1 / U8 / OOP | 00 - FF | Write a value on the Output Port | AMS_wopto |
26 | 58 | ":" | PAR1 / U8 / AD_Conv | 00 - 07 | Read one channel of the AMS 10 bit ADConverter.
Return 4 hex digits | AMS_wopto |
27 | 59 | ";" | PAR1 / U8 / A
PAR2 / U8 / B | 00 - 01 | Enable (0) or disable (1) the acceleration/deceleration ramps in the positioning | AMS_ESlope |
28 | 62 | ">" | PAR1 / U32 / A
PAR2 / U32 / B | PAR1, PAR2:
00000000-FFFFFFFF | Set the frequncy F1 used for the tracking (divex) | AMS_Divisore |
29 | 63 | "?" | PAR1 / U8 / AMS
PAR2 / U16 / AMS | PAR1: 00-3F
PAR2:0000-FFFF | Write the AMS Internal EEPROM (weprex) | |
30 | 64 | "@" | PAR1 / U8 / AMS | PAR1: 00-3F | Read the AMS Internal EEPROM (reprex) | |
31 | 65 | "A" | None | None | Set the Default values for the AMS (defex) | AMS_Default |
32 | 66 | "B" | None | None | AMS Hardware revision (FPGA)-(fpgaex) | |
33 | 67 | "C" | None | None | Read the Joystick state (joysex) | |
34 | 69 | "E" | PAR1 / U8 / FPGA
PAR2 / U8 / FPGA | 00 - FF | Write a register of the FPGA.
PAR1 = reg address
PAR2 = writing value | |
35 | 70 | "F" | PAR1 / U8 / FPGA | 00 - FF | Read a register of the FPGA.
PAR1 = reg address | |
36 | 68 | "D" | PAR1 / U8 / AMS
PAR2 / U16 / AMS
PAR3 / U16 / AMS | PAR1:00-11
PAR2,PAR3:0001-FFFF | Manual Positioning Mode (manposex) | |
<CENTER>
Back to main
Back to AMS2 (Advanced Micro Stepping) Controller
*****************************************************************
AMS Connections
In the following the connections allowing for the AMS's operation through a PC COM port, will be presented and explained.
Starting from the AMS device, the AMS Serial Interface is connected to the Signal Cable that is linked to the COM port of the PC.
The COM Interface can be used as for the AMS control as well as for the Firmware Update, but in this last case the Programming Cable has to be utilized.
If 2 or more AMSs have to be used (to a max of 256!!), more than 1 COM port have to be used or the same COM can be employed following the AMS Cascade connections.
Anyway the Firmware Update has always to be done on a single device.
<CENTER>
Back to main
Back to AMS2 (Advanced Micro Stepping) Controller
*****************************************************************
AMS Cascade connections
\image html AMS_Cascade2.jpg
\image html AMS_Cascade3.jpg
Back to AMS Connections
Back to AMS2 (Advanced Micro Stepping) Controller *****************************************************************
AMS Serial Interface
\image html AMS_InterfaceCable.jpg
Back to AMS Connections
Back to AMS2 (Advanced Micro Stepping) Controller *****************************************************************
Signal Cable
\image html AMS_SignalCable.jpg
Back to AMS Connections
Back to AMS2 (Advanced Micro Stepping) Controller *****************************************************************
Programming Cable
\image html AMS_ProgCable.jpg
Back to AMS Connections
Back to AMS2 (Advanced Micro Stepping) Controller *****************************************************************
Firmware Update
This procedure allows for the upgrade of the software in the microcontroller of the AMS.
The Programming Cable has to be connected to the AMS (that has to be OFF!!!) replacing the Signal Cable.
In addition a Jumper has to be placed to short the J1 switch.
The AMS can be swithed-on and only 2 of the 4 leds on the AMS will be on.
Now the application "FLASHSTA.EXE" has to be launched.
The window below will be shown.
Now the COM port where is connected the AMS, has to be choosen.
This window will appear (if everything is OK)
Now the button "REFER" has to be pressed and the desired *mot file has to be selected.
The previpous panel will be shown like:
The button OK can be pressed and finally the programming window appears.
The button "E.P.R." has to be pressed in order to start the AMS programming.
Pressing "OK" the programmation starts. At the end the operation will be verified
.
At the end of the process the programming panel will be showed; pressing EXIT the program quits.
Now the Signal Cable can be installed and it will be possible to work with the new software release.
Back to main
Back to AMS2 (Advanced Micro Stepping) Controller *****************************************************************
Input/Output Port (Optically Decoupled)
\image html AMS_IOPort.JPG "General Porpuse Opto Decoupled I/O Port"
Pin | Port | Pin | Port | Pin | Port | Pin | Port | Pin | Port | Pin | Port | Pin | Port | Pin | Port | Pin | Port |
1 | OOP[0] | 2 | OOP[3] | 3 | OOP[6] | 4 | IOP[1] | 5 | IOP[4] | 6 | IOP[7] | 7 | GND | 8 | VCC | 9 | GND |
10 | OOP[1] | 11 | OOP[4] | 12 | OOP[7] | 13 | IOP[2] | 14 | IOP[5] | 15 | A/D_TMP | 16 | GND | 17 | T_AN | 18 | T_E |
19 | OOP[2] | 20 | OOP[5] | 21 | IOP[0] | 22 | IOP[3] | 23 | IOP[6] | 24 | A/D_PR | 25 | POW | 26 | GND | | |
- OOP[0:7]: Output Ports.
- IOP[0:7]: Input Ports.
- V_AN: Anode Voltage for the control of the IOPs (see figure AMS Anode).
- V_E: Emitter Voltage for the control of the OOPs(see figure AMS Emitter).
- A/D_TMP: Temperature sensor Input.
- A/D_PR: Pressure sensor Input.
- VCC: +5V 250mA MAX.
- POW: Supply voltage (250 mA MAX), It is the Power furnished to the AMS - Usually 12V
- GND: Ground.
For the different devices managed with the AMS Output port in the instruments managed by DAS, plese refers to page AMS OUTPUT Port Bits.
While for the Output ports all the 8 bits can be used, the Input ports has some bits that are employed for the HOME and WORK position of the Stepper Motors (se Table below)
Input Port | Pin | Function |
IOP[0] | 21 | Work Axis 1 |
IOP[1] | 4 | Home Axis 1 |
IOP[2] | 13 | Work Axis 0 |
IOP[3] | 22 | Home Axis 0 |
IOP[4] | 5 | Free |
IOP[5] | 14 | Free |
IOP[6] | 23 | Stop Axis 1 |
IOP[7] | 6 | Stop Axis 0 |
For the specific use of the input port in the different version of the instrument managed by DAS, please refers to pag AMS INPUT Port Bits
Back to main
Back to AMS2 (Advanced Micro Stepping) Controller *****************************************************************
AMS Steps/round
For a standard stepper motor,the nominal value of stepping is 200 step/round. With the microstepping technology, this value can be increased. For AMSII the possible values of fractioning are reported in the table below:
S Value | Frac | Step/Round |
0 | 1/2 | 400 |
1 | 1/4 | 800 |
2 | 1/5 | 1000 |
3 | 1/8 | 1600 |
4 | 1/10 | 2000 |
5 | 1/16 | 3200 |
6 | 1/25 | 5000 |
7 | 1/32 | 6400 |
8 | 1/50 | 10000 |
9 | 1/64 | 12800 |
10 | 1/125 | 25000 |
11 | 1/128 | 25600 |
12 | 1/250 | 50000 |
13 | 1/256 | 51200 |
Back to main
Back to AMS2 (Advanced Micro Stepping) Controller *****************************************************************
DAS AMS Functions
AMS INPUT Port Bits
LIS, SPATRAM, GASCODNG1
#########################################################################AMS1: Address = 0
Input Port | Function |
IOP[0] | SPARE |
IOP[1] | Home Grating |
IOP[2] | SPARE |
IOP[3] | Home Input Mirror |
IOP[4] | SPARE |
IOP[5] | SPARE |
IOP[6] | UV Switch Grating |
IOP[7] | Vis. Switch Grating |
AMS2: Address = 1
Input Port | Function |
IOP[0] | PWM |
IOP[1] | SPARE |
IOP[2] | SPARE |
IOP[3] | Home Filter Wheel |
IOP[4] | SPARE |
IOP[5] | SPARE |
IOP[6] | SPARE |
IOP[7] | SPARE |
Back to AMS INPUT Port Bits
Back to Input/Output Port (Optically Decoupled) #########################################################################
TROPOGAS, SPATRAMPLUS
AMS1: Address = 0
Input Port | Function |
IOP[0] | SPARE |
IOP[1] | Home Grating |
IOP[2] | SPARE |
IOP[3] | Home Input Mirror |
IOP[4] | SPARE |
IOP[5] | SPARE |
IOP[6] | UV Switch Grating |
IOP[7] | Vis. Switch Grating |
AMS2: Address = 1
Input Port | Function |
IOP[0] | PWM |
IOP[1] | SPARE |
IOP[2] | SPARE |
IOP[3] | Home Filter Wheel |
IOP[4] | SPARE |
IOP[5] | SPARE |
IOP[6] | SPARE |
IOP[7] | SPARE |
AMS3: Address = 2
Input Port | Function |
IOP[0] | SPARE |
IOP[1] | Home Azimuth |
IOP[2] | SPARE |
IOP[3] | Home Zenith |
IOP[4] | SPARE |
IOP[5] | SPARE |
IOP[6] | Switch Zenith L |
IOP[7] | Switch Zenith R |
Back to AMS INPUT Port Bits
Back to Input/Output Port (Optically Decoupled) #########################################################################
AMS OUTPUT Port Bits
LIS, SPATRAM, GASCODNG2, GASCODNG3
#########################################################################AMS1: Address = 0
Output Port | Managed Device |
OOP[0] | Peltier |
OOP[1] | Fan Peltier |
OOP[2] | HG Lamp |
OOP[3] | QJ Lamp |
OOP[4] | SPARE |
OOP[5] | SPARE |
OOP[6] | SPARE |
OOP[7] | SPARE |
The SPATRAM Instrument doesn't exist anymore. It is replaced with the SPATRAMPLUS spectrometer that has 3 AMS devices allowing for using the alt azimuth platform (MIGE - Multi Input Geometry Equipment),
Back to AMS OUTPUT Port Bits
Back to Input/Output Port (Optically Decoupled) #########################################################################
GASCODNG1
AMS1: Address = 0
Output Port | Managed Device |
OOP[0] | Peltier |
OOP[1] | Fan Peltier |
OOP[2] | HG Lamp |
OOP[3] | QJ Lamp |
OOP[4] | SPARE |
OOP[5] | SPARE |
OOP[6] | Ext. Shutter |
OOP[7] | Ext. Lamp |
Back to AMS OUTPUT Port Bits
Back to Input/Output Port (Optically Decoupled) #########################################################################
TROPOGAS
AMS1: Address = 0
Output Port | Managed Device |
OOP[0] | Peltier |
OOP[1] | Fan Peltier |
OOP[2] | HG Lamp |
OOP[3] | QJ Lamp |
OOP[4] | Peltier Power Supply |
OOP[5] | Hires Power Supply |
OOP[6] | Ext. Lamp |
OOP[7] | Ext. Shutter |
Back to AMS OUTPUT Port Bits
Back to Input/Output Port (Optically Decoupled) #########################################################################
SPATRAMPLUS
AMS1: Address = 0
Output Port | Managed Device |
OOP[0] | Peltier |
OOP[1] | Fan Peltier |
OOP[2] | HG Lamp |
OOP[3] | QJ Lamp |
OOP[4] | Peltier Power Supply |
OOP[5] | Hires Power Supply |
OOP[6] | SPARE |
OOP[7] | SPARE |
Back to AMS OUTPUT Port Bits
Back to Input/Output Port (Optically Decoupled) #########################################################################