X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-45
Wait for the Data Exchange (Use Mode 0)
Wait for the Data Exchange (Use Mode 0)
The program waits for a data exchange to begin, which requires reading a logical
record. After the initial READ, READs and WRITEs can be in any order, depending on
the program logic and the response expected from the remote device.
1. OPEN the subdevice.
!
!The remote device has sent logical record A that is smaller
!than PACKETSIZE. The logical record will fit into 1
!packet.
!
!The data packet (M=0) for logical record A is received.
2. READ a logical record.
!
!The program waits for data from the remote device with a
!READ.
!
!Logical record A is transferred to the READ buffer.
!The READ completes successfully.
3. READ a logical record
!
!The program waits for data from the remote device with a
!READ.
!
!The remote device sends logical record B that is less than
!PACKETSIZE. The logical record will fit into 1 packet.
!
!The data packet (M=0) for logical record B is received.
!Logical record B is transferred to the READ buffer.
!The READ completes successfully.
!
!An RR packet is sent.
4. WRITE logical record C.
!
!The WRITE has a WRITE COUNT that is less than PACKETSIZE.
!The logical record will fit into 1 packet.
!
!A data packet (M=0) for logical record C is sent.
!The WRITE completes successfully.
!