Download CPM2C OPERATION MANUAL
Transcript
DM Settings and Component Communications Section 7-5 EEPROM when this selection is made, and if it is made each scan, the service live of the EEPROM will be affected. 7-5 DM Settings and Component Communications This section explains the basic procedures required to communicate with connected components. Refer to 7-4 Data Memory (DM) Allocation for details on DM settings and setting procedures. Write the following program sections in the user program to establish communications with the connected components. 7-5-1 DM Settings Verify that the components that you want to connect are supported by the CPM2C-CIF21. Determine whether the components will communicate by SYSWAY or CompoWay/F communications. Write the following program sections at the beginning of the user program so that the DM settings are made when the CPM2C is turned ON. 1, 2, 3... 1. Parameter Settings in the Control Data Area • Set the number of connected components (32 max.) • When using SYSWAY, set each component’s segment information. • When using SYSWAY, select and set a command group that contains the values that you want to read or write. • Set the communications protocol. • When using SYSWAY, set the starting addresses of each component’s read/write areas. • When using CompoWay/F, set the starting addresses of each component’s read/write variable type areas. 2. When using CompoWay/F, set the variable type and variable address of each variable that you want to read or write. (Set this information in the read/ write variable type area.) 3. When writing data, set the data that you want to write in the write data area. 7-5-2 Starting Communications with the Components Use the following procedure to start communications with the components. 1, 2, 3... 1. Set the rightmost digit of the “Simple Communications Unit control” word in the Control Data Area (the RUN/Stop digit) to 1 (RUN). 2. Turn ON the Read Command Bit or Write Command Bit of the desired component. (These bits are in the Control Data Area with word offsets +3, +4, +5, and +6. See Communications Control Bits on page 237.) Changes to the following values are recognized only when the Simple Communications Unit control word’s RUN/Stop digit is switched from Stop to RUN. When one of these values has been changed, switch the Simple Communications Unit from RUN to Stop and then back to RUN again. • Segment information • Command group • Communications protocol • Starting addresses of read/write data areas • Starting addresses of read/write variable type areas Note 250 Refer to Simple Communications Unit Control on page 235 for details on the RUN/Stop Digit.