X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-57
Start the Data Exchange (Use Mode 3)
6. READ Reset packet.
!
7. WRITEREAD an Invitation to Clear.
!
!The Invitation To Clear packet (M=0) is sent.
!
!A Clear Request packet is received.
!The Clear Request packet is transferred to the
!WRITEREAD buffer.
!The WRITEREAD completes successfully.
!
8. CLOSE the subdevice.
!
!Nothing is sent or received.
Start the Data Exchange (Use Mode 3)
The program makes the call with a CONTROL 17. It starts the data exchange by
writing data for a data block. READ and WRITE can be in any order, depending on the
program logic and the response expected from the remote device. The program ends
the call with a CONTROL 12. This example also shows P(R) and P(S) to demonstrate
packet sequencing.
In the following example, L3WINDOW is 2.
1. OPEN the subdevice.
!
!Nothing is sent or received.
2. SETMODE 31,3,0.
!
!Set the data-exchange mode to 3.
3. CONTROL 17.
!
!A Call Request is sent.
!A Call Connected is received.
!
!The CONTROL completes.
4. WRITE the data for a data block that is also an entire
logical record. Set the M bit to 0. The data will
fill ten packets.
!
!Packet 1 is sent [P(S)=0,P(R)=0,M=1].