7 Use DVP-PM As Slave 7.1.2 Example of Master-Slave Data Exchange ‹ Set up: design the data exchange programs in Master and Slave respectively. z Slave DVP-PM: Move the data to be accessed by Master into the data exchange area through MOV instruction Master: Plan the CRs (on Slave) for Master to access. ‹ Example 1 z Control Purpose: DVP-EH2 applies FROM/TO instructions to access special registers D1500 ~ D1699 in Slave DVP-PM and executes manual mode position control on X/Y axis. (For relative registers see 3.12.3) z Table for CRs in the Master and corresponding special registers in the Slave: 1.
If you need to use other functions of Slave DVP-PM, please refer to Chapter 3 and fill the relative the example program, so that the desired motion control functions can be performed. special registers into the “Planned by user” column. After this you can add the relative registers to 2. D1500 ~ D1699 are the special registers planned internally in the Slave, among which D1500 is the read-only register for storing the model code of DVP-PM (H’6260). Therefore, D1501 ~ D1699 are the applicable registers. Program in Master DVP-EH2 Ladder diagram: Operation: M1002 When Master DVP-EH2 is in RUN, read out CR#0 of Slave, corresponding to D1500 in Slave.
Write in CR#1 of Slave, corresponding to D1501 in Slave, to STOP X axis in Slave. M1000 Read out CR#2 of Slave, corresponding to D1502 ~ D1503 in Slave. Read out CR#4 of Slave, corresponding to D1504 ~ D1505 in Slave. Read out CR#6 of Slave, corresponding to D1506 ~ D1507. Read out CR#8 of Slave, corresponding to D1508 ~ D1509.
DVP-PM Application Manual 7-2 Slave Master Content Planned internally Planned by user CR#0 D1500 Set up by the system Model code of Slave DVP-PM CR#1 D1501 D1846 Operation commands for X axis CR#2 ~ 3 D1502 ~ D1503 D1848 ~ D1849 Current position of X axis CP (Pulse) CR#4 ~ 5 D1504 ~ D1505 D1850 ~ D1851 Current speed of X axis (PPS) CR#6 ~ 7 D1506 ~ D1507 D1860 ~ D1861 MPG input frequency on X axis CR#8 ~ 9 D1508 ~ D1509 D1862 ~ D1863 Accumulated number of MPG input pulses at X axis FROM K0 K0 D0 K1 TO K0 K1 H1 K1 DFROM K0 K2 D2 K1 DFROM K0 K4 D4 K1 DFROM K0 K6 D6 K1 DFROM K0 K8 D8 K1