X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-56
Wait for the Data Exchange (Use Mode 2)
!Set the data-exchange mode to 2.
3. CONTROL 11.
!
!Wait for an Incoming Call.
!An Incoming Call is received.
!A Call Accepted is sent.
!
!The remote device writes the data for the first packet for
!logical record A. The WRITE COUNT is equal to PACKETSIZE.
!The M bit is set to one.
!
!The first data packet (M=1) for logical record A
!is received.
4. READ a packet.
!
!The program waits for data from the remote device with a
!READ. The remote device has already sent the first packet
!for logical record A. The data from the data packet is
!transferred to the READ buffer.
!
!The READ completes successfully.
!
!The remote device writes the second and last packet for
!logical record A. The data is less than PACKETSIZE.
!The M bit is set to 0.
!
!The final data packet (M=0) for logical record A
!is received.
5. READ a packet.
!
!The program waits for data from the remote device with a
!READ. The remote device has already sent the final data
!packet for logical record B. The data is transferred to
!the READ buffer.
!The READ completes successfully.
!
!An RR packet is sent.
!
!An interrupt packet is sent.