Download MICRO3C Manual Book

Transcript
10: SAMPLE PROGRAM – MODEM COMMUNICATION
Allocation Numbers (Local Station)
Allocation Number
Q0
Q1
M0
M1
M2
M265
M287
M301
M317
D0
D1
D2
D3
D4
D5
D101
D492
D495
D499
T0
T2
Description
Goes on when receiving A indicating input I1 on at the remote station
Goes on when receiving B indicating input I1 off at the remote station
Receive completion output for receiving A to indicate input I1 on at the remote station
Receive completion output for receiving B to indicate input I1 off at the remote station
Transmit completion output for transmitting C to start disconnecting the telephone line
Start initialization string internal relay for the answer mode
Telephone line connection status internal relay (ON: Connected, OFF: Disconnected)
Initialize pulse special internal relay
In-operation output special internal relay
Receive status data register for RXD instruction to receive A
Receive data byte count data register for RXD instruction to receive A
Receive status data register for RXD instruction to receive B
Receive data byte count data register for RXD instruction to receive B
Transmit status data register for TXD instruction to send C
Transmit data byte count data register for TXD instruction to send C
Modify initialization string data register (0 specifies \Q3 for AIWA’s modems)
On-line mode protocol (1 specifies user protocol after telephone line is connected)
Modem mode selection (1 enables the modem mode)
Expansion control data register service selection (6 enables D486 through D495)
1-sec delay timer before transmitting the initialization string
5-sec delay timer before executing the RXD instructions after telephone line connection
Description of Operation
Remote Station
When the MICRO3C is powered up, the MOV instructions are executed by initialize pulse M301 to store values to data registers which enable the modem mode. The telephone number is also stored to data registers.
At 0 minutes and 0 seconds every hour, the MICRO3C at the remote station sends the initialization string to the modem and
dials the telephone number 234-5678.
If the modem initialization or ATZ fails, output Q0 is turned on to indicate an error.
When dialing fails, two more attempts will be made. When the retry fails, output Q0 is turned on to signal that the telephone line connection failed.
Ten seconds after the telephone line is connected, the status of input I1 is sent to the local station. When I1 is on, A CR is
sent. When I1 is off, B CR is sent.
The status of input I1 can also be sent any time by turning input I0 on.
When receiving C CR from the local station, the MICRO3C at the remote station disconnects the telephone line.
Local Station
When the MICRO3C is powered up, the MOV instructions are executed by initialize pulse M301 to store values to data registers which enable the modem mode.
One second later, the MICRO3C at the local station sends the initialization string to the modem.
Five seconds after the telephone line is connected, the RXD instructions are executed to wait for incoming communication.
When receiving A CR , output Q0 is turned on and output Q1 is turned off.
When receiving B CR , output Q0 is turned off and output Q1 is turned on.
When receiving is complete, the MICRO3C at the local station sends C CR to reply to the remote station.
USER’S MANUAL
10-3