Line 43: Line 43:
!Response
!Response
|-
|-
|from RetrieveDataAlphaDelta_Internal, get step values for PEC
|rowspan="8"|from RetrieveData<br/>AlphaDelta_Internal, get step values for PEC
|'r', 0, 0, 0, 0
|rowspan="8"|'r', 0, 0, 0, 0
|(10 bytes): current speed steps per second = 625000 / {3} / 10 + {2} + 256 * {1} ; index PecC = {4} ; Pec step = 256*{5} + {6} ; another step value? 256*{7}+2*{8} ; Panel info pec = {9} & 0F ; Pec state 1 = {9} ; Pec state 2 = {10}
|10 bytes, containing as follows:
|-
|-
|from RetrieveDataAlphaDelta_Internal, update current speed (or stop moving)
|current speed steps per second = 625000 / {3} / 10 + {2} + 256 * {1}
|-
|index PecC = {4}
|-
|Pec step = 256*{5} + {6}
|-
|another step value? 256*{7}+2*{8}
|-
|Panel info pec = {9} & 0F
|-
|Pec state 1 = {9}
|-
|Pec state 2 = {10}, boolean value indicating if parked
|-
|from RetrieveData<br/>AlphaDelta_Internal, update current speed (or stop moving)
|'R', {3 bytes (same format than 3 first bytes of 'r' reply)}
|'R', {3 bytes (same format than 3 first bytes of 'r' reply)}
|none
|none
|-
|-
|from RetrieveDataAlphaDelta_Internal, activate PEC
|from RetrieveData<br/>AlphaDelta_Internal, activate PEC
|'L', 2F, activate?1:0, 0, 0
|'L', 2F, activate?1:0, 0, 0
|none
|none
|-
|-
|from RetrieveDataAlphaDelta_Internal, erase PEC
|from RetrieveData<br/>AlphaDelta_Internal, erase PEC
|'e', 0, 0, 0, 0
|'e', 0, 0, 0, 0
|none
|none
|-
|-
|from RetrieveDataAlphaDelta_Internal, save PEC
|from RetrieveData<br/>AlphaDelta_Internal, save PEC
|'E', 0, 0, 0, 0
|'E', 0, 0, 0, 0
|none
|none

Revision as of 01:51, 30 August 2012

MCMTII

Link to official webpage (in French).

Recent versions (2011) of the MCMTII, which have undergone a few evolutions since MCMTII has been described on the website, only work with the non-free PRISM software (for windows) in versions 7 or 8 or the Ascom driver.

The current source available from the download page is quite old. Here is a local copy of this file, version 1.2.3.8. A newer version will be requested soon as well as protocol documentation. It is developed by Alcor System, so does PRISM. The code in Delphi language for Windows.

RS232 protocol

The protocol for the serial link is quite simple, based on request-response exchanges. The windows DLL opens and closes the serial port for each write and read operation.

Three types of messages exist, as explained in the following table. axis_id is `E0' for alpha axis (right ascension), `E1' for delta axis (declination). In the fields request and response of the table, values or identifiers represent bytes, and they are separated by commas. Comments are between parentheses.

Command Request Response
device ready axis_id, FF 01 (success value)
read encoder axis_id, F1 + byte number [0..3] the requested byte from the int32 value
special command axis_id, {7 bytes maximum for the command} 06, {data} (if response data is available)

Most commands then fall into the special command category. Data is mostly ascii text, and commands start with an identifier, which is the ascii value of a letter. We will now see the list of special commands, separated in two: the list of setup commands, and the list of runtime command.

Bytes from the response buffer are referenced as {i} where i is the ith byte. PEC is periodic error correction. KING is a method for refraction compensation by offsetting the telescope pointing.

Special commands for telescope operation mode

Command Request Response
from RetrieveData
AlphaDelta_Internal, get step values for PEC
'r', 0, 0, 0, 0 10 bytes, containing as follows:
current speed steps per second = 625000 / {3} / 10 + {2} + 256 * {1}
index PecC = {4}
Pec step = 256*{5} + {6}
another step value? 256*{7}+2*{8}
Panel info pec = {9} & 0F
Pec state 1 = {9}
Pec state 2 = {10}, boolean value indicating if parked
from RetrieveData
AlphaDelta_Internal, update current speed (or stop moving)
'R', {3 bytes (same format than 3 first bytes of 'r' reply)} none
from RetrieveData
AlphaDelta_Internal, activate PEC
'L', 2F, activate?1:0, 0, 0 none
from RetrieveData
AlphaDelta_Internal, erase PEC
'e', 0, 0, 0, 0 none
from RetrieveData
AlphaDelta_Internal, save PEC
'E', 0, 0, 0, 0 none
from TelescopeMoveAxe, move number of steps 'p', {4 bytes of int32 number of steps} none
from MoveTelescope, north or west move max speed 'X', 0, 0, 0, 0 none
from MoveTelescope, north or west move medium speed 'G', 0, 0, 0, 0 none
from MoveTelescope, north or west move min speed 'D', 0, 0, 0, 0 none
from MoveTelescope, south or east move max speed 'W', 0, 0, 0, 0 none
from MoveTelescope, south or east move medium speed 'F', 0, 0, 0, 0 none
from MoveTelescope, south or east move min speed 'Q', 0, 0, 0, 0 none
from Stop_Telescope, stop moving, resume sideral speed 'S', 0, 0, 0, 0 none
from STOP_ALL_Telescope, move to parking position 'P', 0, 0, 0, 0 none
from ReturnToSideralSpeed, no park mode 'N', 0, 0, 0, 0 none

Special commands for telescope setup mode

Command Request Response