Chapter 16 PLC Function ApplicationsC2000 Plus
16-146
Step 2: Master memory correspondences
1. Enable WPL
2. Use keypad set PLC mode as Stop (PLC 2)
3. WPL read D1070 to D1099, D2000 to D2799
4. Set D2000=10, D2100=11
5. Set D2100, 2200, 2300, 2400, 2500, 2600, 2700=0
6. Download D2000 to D2799 settings
Step 3: Set the master's communications station number and communications speed
1. When setting the master's station number (Pr. 09-46, default is set as 100), make sure not to
use the same number as a slave station.
2. Set the CANopen communications speed as 1M (Pr. 09-37=0); regardless of whether the drive
is defined as a master or slave station, the communications speed is set via this parameter.
Step 4: Write program code
Real-time access: Can directly read/write to or from the corresponding D area.
Non real-time access:
Read command: Use the CANRX command for reading. M1066 will be 1 when reading
is complete; M1067 will be 1 if reading is successful, and M1067 will be 0 if an error has
occurred.
Write command: Use the CANTX command for writing. M1066 will be 1 when writing is
complete; M1067 will be 1 if writing is successful, and M1067 will be 0 if an error has
occurred.
Refresh command: Use CANFLS command to refresh (if there are RW attributes, the
master will write to the slave station; if there are RO attributes, the slave station will
return the read values to the master); M1066 will be 1 if refresh has been completed;
M1067 will be 1 if refresh is successful, and M1067 will be 0 if an error has occurred.
NOTE:
When using CANRX, CANTX or CANFLS, internal implementation commands will wait
until M1066 is completed before executing the next CANRX, CANTX or CANFLS.
Afterwards, download program to the drive (Please note that the PLC's default
communications format is ASCII 7N2 9600, and the station number is 2. The WPL must
therefore be modified, and the WPL setting pathway is settings > communications
settings)
Step 5: Set the slave stations' station numbers and communications speed
Slave station no. 1: 09-37 = 0(Speed 1M) 09-36=10(Node ID 10 )
Slave station no. 2: 09-37 = 0(Speed 1M) 09-36=10(Node ID 11 )