SP1 Modem interface

The stepper controller has a universal modem friendly user programmable interface. To use it, you need a Phone line simulator and an external Hayes-compatible modem, hooked to one of controler serial port (Input). If necessary, standard adapters DB9-DB9, DB9-DB25 can be used. When power is switched on, the controller detects the modem and runs a sequence of user preprogrammed instructions, which initiate the modem. The modem initiates communication with a remote computer and gives control to it. Set of simple commands preprograms modem interface instructions, tests and traces them. The instructions are saved into nonvolatile flash memory and become default. This will cause the controller to automatically use the saved instructions if modem is detected after the controller reset or reboot (controller also reboots if modem communication is disconnected). If the modem is not detected, the controller initiates standard RS232 communication.

Long range remote control using an external Hayes-compatible modem

Warning: External modem and SP1 communication setup is supposed to be done by an experienced engineer or researcher, who is familial with electronics and programming, -  not just a beginner.

Up to 25 instructions can be preprogrammed to initialize the Modem communication.  Every instruction has several procedures and two branching cases. The instructions can be branched and circled. The algorithm of program flow through instructions is presented below.

Program flow through instructions, which are preprogrammed by the user

Each instruction has internal algorithm. The algorithm of program flow through procedures inside single instruction is presented below.

Program flow inside a single Instruction

Example: Table 1 shows a set of instructions, which is preprogrammed to create Stepper motor controller SP1 and Modem interface software. The set of instructions was tested with external Modem SupraExpress 288 PnP.

Table 1

Instruction number
Time delay, before the Instruction is performed,1 = 1/2 of second. Range 0…255

Command

(0,1,2)

String terminating character. <CR> = 0, <LF> = 1
String to be send to modem.Till 10 characters
Expected response String or none, if no response is expected
Next instruction, if modem response = expected response
Next instruction number, in case of Time-out
Time-out value 1= 1/2 of second. Range 0…255
0
1
1
0
ATZ
OK
1
0
14
1
2
1
0
ATV1
OK
3
2
14
2
2
1
0
AT
OK
3
0
14
3
2
1
0
ATH0
OK
4
4
14
4
2
1
0
ATM0
OK
6
5
14
5
2
1
0
AT
OK
6
6
14
6
2
1
0
ATX3&C1
OK
7
7
14
7
2
1
0
ATA
CONNECT
24
8
30
8
2
1
0
AT
OK
9
9
6
9
2
1
0
AT
OK
7
0
6
24
10
1
1
You are in
-
25
25
2

PI, TI, TR commands preprogram, test and trace the modem interface. The most convenient way is to use a computer in terminal mode through COM1…COM4 serial port to program it.  There are several programs for terminal communication from Win98, Win2000 and XP. For example, Hyper terminal program can be used. Before programming the instructions, the user should fill in, by himself, the instructions table, as presented in Table 1 for SupraExpress 288 PnP AT modem. The table context depends on external Hayes-compatible modem AT command set.
 
Final debugging can be performed in a standard computer – modem – modem – stepper controller configuration. See figure below. There is extra RS-232 null-modem cable, hooked to the controller output. The output is connected to one of the computer serial ports (Com1…COM4) or terminal. The computer can test all communication Modem-stepper controller initialization protocol (instruction set and modem response, if modem has enabled echo mode by default).

Computer - controller configuration for final debugging of instructions set

Note: you also have to initialize internal or external modem on your computer side. The initialization strings are specific for modem used. Example for our case: AT<Enter>, ATX3&C0<Enter>, ATD<Enter>. See your computer manual to find the information.