CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 38
Текст из файла (страница 38)
When AR 0806 (the Reception Completed Flag) turns ON, 256 bytes of received data are read and written to DM 0200 from leftmost bytes to rightmost bytes.00100DIFU(13)No-protocol communications start0010100101AR 0805@TXD(48)DM 0100#0000#0010First word holding send data.Use the RS-232C port; transmitdata from leftmost bytes to rightmost bytes.Transmit 10 bytes.AR 0806RXD(47)DM 0200#0000#0256First word to store received data.Use the RS-232C port; store transmitted data from leftmost bytes torightmost bytes.Receive 256 bytes.234SectionCPM2A/CPM2C Communications Functions4-34-3-3 One-to-one NT Link CommunicationsThe NT Link allows a CPM2A/CPM2C PC to be connected directly to an OMRON Programmable Terminal.
There is no need for a communications programon the PC. The NT Link can be used with an RS-232C port.CPM2A ConnectionCPM2A CPU UnitRS-232C cableOMRON ProgrammableTerminalRS-232C portCPM2C 1:1 NT Link ConnectionConnecting CableRS-232C port(D-sub 9-pin)CPM2C CPU UnitRS-232CportXW2Z-200T (2 m)XW2Z-500T (5 m)RS-232C connectionOMRONProgrammableTerminalCPM2C-CN111 (0.15 m)CS1W-CN118 (0.1 m)RS-232C ← peripheral portRS-422 connectionRS-232C portCPM2C-CIF01RS-422 ← peripheral portNT-AL001RS-232C AdapterRS-232C portXW2Z-070T-1 (0.7 m)XW2Z-200T-1 (2 m)CPM2C-CIF11Note The Programmable Terminal cannot be connected using a peripheral port connection when communicating via a 1:1 NT Link.235SectionCPM2A/CPM2C Communications Functions4-3Application ProcedureSetting communications.Connecting the cablesCommunications SwitchSettingUse the settings in the PC Setup (DM6645 to DM 6649) forRS-232C communications.(Turn OFF the Communications switch on the CPM2A’s CPUUnit or pin 1 of the DIP Switch on the CPM2C’s CPU Unit.)Connect to a Programmable Terminal.The CPM2A’s communications are controlled by the communications switch onthe front of the CPU Unit and the CPM2C’s communications are controlled bythe DIP switch on the front of the CPU Unit.CPM2A Communications Switch SettingTurn OFF the communications switch when using 1:1 NT Link communications.One-to-one NT Link communications will not be possible if the communicationsswitch is ON.Communications switchONOFFRS-232C port236SectionCPM2A/CPM2C Communications Functions4-3CPM2C DIP Switch SettingsTurn OFF pin 1 of the DIP switch when using 1:1 NT Link communications so thatcommunications through the RS-232C port are governed by the settings in thePC Setup (DM 6645 to DM 6649).DIP SwitchPin settingsPin 2OFFONONONOFFONProgramming Console protocolGoverned by the PC Setup(DM 6650 to DM 6654)Programming Console protocolGoverned by standard settingsRS-232C portcommunicationsGoverned by the PC Setup(DM 6645 to DM 6649)Governed by standard settingsWhen using an NT Link with a CPM2A/CPM2C PC, the following settings mustbe made to the PC Setup (DM 6645) using a Programming Device.PC SetupWordDM 6645Pin 1OFFOFFPeripheral portcommunicationsBit00 to 03FunctionPort settings0: Standard (1 start bit, 7-bit data, 2 stop bits, even parity, 9,600 bps; Host Linkunit number: 0)SettingAny1: Settings in DM 664604 to 0708 to 1112 to 15(Other settings will cause a non-fatal error, the default setting (00) will be used, andAR 1302 will turn ON.)CTS control settingsAny0: Disable1: SetLink area for 1:1 PC Link0: LR 00 to LR 15(Other settings: Disabled)Communications mode0: Host Link; 1: No-protocol; 2: 1:1 PC Link Slave; 3: 1:1 PC Link Master;4: 1:1 NT LinkAny4(Other settings will cause a non-fatal error, the Host Link setting will be used, andAR 1302 will turn ON.)For information on the 1:1 NT Link settings of an OMRON Programmable Terminal, refer to that PT’s Operation Manual.Connecting the CablesThis section describes RS-232C connections.The RS-232C port on the Programmable Terminal and the RS-232C port on theCPM2A/CPM2C or CPM1-CIF01 RS-232C Adapter are connected as shown inthe following diagram when there is no CTS control on the RS-232C port.
With237SectionCPM2A/CPM2C Communications Functions4-3the CPM2C, the CPM2C-CN111 and CS1W-CN118 connecting cables areused.OMRON PTSignalRS-232C portPin No.SignalPin No.Recommended cables:XW2Z-200T:2mXW2Z-500T:5mHoodHood4-3-4 One-to-one PC Link CommunicationsA 1:1 PC Link of up to 256 bits (LR0000 to LR1515) can be created with the dataarea of another CPM2A/CPM2C, CQM1, CPM1, CPM1A, SRM1(-V2), or aC200HX/HG/HE PC, where one serves as the Master, the other as a Slave.There is no need for a communications program on the PC.The 1:1 PC Link can be used with an RS-232C port.One-to-one PC LinkCPM2A CPU UnitRS-232C portOMRON PC (CQM1, CPM1, CPM1A, CPM2C,SRM1(-V2), C200HS, or C200HX/HG/HE)238CPM2A CPU UnitRS-232C portOMRON PC (CQM1, CPM1, CPM1A, CPM2C,SRM1(-V2), C200HS, or C200HX/HG/HE)SectionCPM2A/CPM2C Communications FunctionsRS-232C port (D-sub 9-pin)1:1 Link MasterCPM2C CPU Unit1:1 Link SlaveCPM2C CPU UnitRS-232C port (D-sub 9-pin)CPM2C-CN111(0.1 m)4-3CPM2C-CN111 (0.1 m)Connecting CableXW2Z-200T (2 m)XW2Z-500T (5 m)CS1W-CN118(0.1 m)CS1W-CN118 (0.1 m)CPM2C-CIF01CPM2C-CIF01CPM2C-CIF11CPM2C-CIF11OMRON PC (CQM1, CPM1, CPM1A, CPM2A,SRM1(-V2), C200HS, or C200HX/HG/HE)MasterLink bitsOMRON PC (CQM1, CPM1, CPM1A, CPM2A,SRM1(-V2), C200HS, or C200HX/HG/HE)SlaveLink bitsLR00LR00WriteLR07LR08ReadLR15WriteareaReadareaReadareaWriteareaReadLR07LR08WriteLR15Note Even though the peripheral port on the CPM2C-CIF01 can output RS-232C, this port cannot be used forone-to-one link communications.239SectionCPM2A/CPM2C Communications FunctionsPC Links with Other PCs4-3The link relay area on CPM2A/CPM2C PCs is only 16 words, LR00 to LR15.When performing a 1:1 PC Link with a CPM2A/CPM2C PC and a CQM1,C200HS, or C200HX/HE/HG use the corresponding 16 words, LR00 to LR15 onthe CQM1, C200HS, or C200HX/HE/HG PC.
A 1:1 PC Link with a CPM2A/CPM2C PC cannot be formed using LR16 to LR 63.Application ProcedureSetting communications.Connecting the cablesCommunications SwitchSettingUse the settings in the PC Setup (DM6645 to DM 6649) forRS-232C communications.(Turn OFF the Communications switch on the CPM2A’s CPUUnit or pin 1 of the DIP Switch on the CPM2C’s CPU Unit.)Connect a 1:1 PC Link with another PC.The CPM2A’s communications are controlled by the communications switch onthe front of the CPU Unit and the CPM2C’s communications are controlled bythe DIP switch on the front of the CPU Unit.CPM2A Communications Switch SettingTurn OFF the Communications switch when using 1:1 PC Link communications.One-to-one PC Link communications will not be possible if the communicationsswitch is ON.Communications switchONOFFRS-232C port240SectionCPM2A/CPM2C Communications Functions4-3CPM2C DIP Switch SettingsTurn OFF pin 1 of the DIP switch when using 1:1 PC Link communications sothat communications through the RS-232C port are governed by the settings inthe PC Setup (DM 6645 to DM 6649).DIP SwitchPin settingsDM 6645Pin 2OFFONONONOFFONPeripheral portcommunicationsProgramming Console protocolGoverned by the PC Setup(DM 6650 to DM 6654)Programming Console protocolGoverned by standard settingsRS-232C portcommunicationsGoverned by the PC Setup(DM 6645 to DM 6649)Governed by standard settingsWhen creating a 1:1 PC Link with a CPM2A/CPM2C PC, use a ProgrammingDevice to make the following settings to the PC Setup (DM 6645) in the Masterand Slave.PC SetupWordPin 1OFFOFFBit00 to 0304 to0708 to 1112 to 15FunctionPort settings00: Standard (1 start bit, 7-bit data, 2 stop bits, even parity, 9,600 bps)01: Settings in DM 6646(Other settings will cause a non-fatal error, the default setting (00) will beused, and AR 1302 will turn ON.)CTS control settings0: Disable1: SetLink area for 1:1 PC Link0: LR 00 to LR 15(Other settings: Disabled)Communications mode0: Host Link; 1: No-protocol; 2: 1:1 PC Link Slave;3: 1:1 PC Link Master; 4: 1:1 NT LinkMasterSettingAnySlaveSettingAny000032(Other settings will cause a non-fatal error, the Host Link setting will beused, and AR 1302 will turn ON.)For information on the 1:1 PC Link settings of another OMRON PC, refer to thatPC’s Operation Manual.Connecting the CablesThis section describes the RS-232C connection.The RS-232C cable used for 1:1 PC Links is a cross connection cable.
Whenthere is no CTS control on the RS-232C port, the connection is made as shown241SectionSRM1(-V2) Communications Functions4-4in the following diagram. With the CPM2C, the CPM2C-CN111 and CS1WCN118 connecting cables are used.RS-232C portRS-232C portSignal Pin No.Signal Pin No.Recommended cablesXW2Z-200T:2mXW2Z-500T:5mHood4-4SRM1(-V2) Communications Functions4-4-1 Host Link CommunicationsHost Link communications were developed by OMRON for the purpose of connecting PCs and one or more host computers by RS-232C cable, and controllingPC communications from a host computer. Normally the host computer issues acommand to a PC, and the PC automatically sends back a response. Thus thecommunications are carried out without the PCs being actively involved.
ThePCs also have the ability to initiate data transmissions when direct involvementis necessary.In general, there are two means for implementing Host Link communications.One is based on C-mode commands, and the other on FINS (CV-mode) commands. The SRM1(-V2) supports C-mode commands only. For details on HostLink communications, refer to 4-5 Host Link Commands.PC Setup SettingsWordThe SRM1(-V2)’s peripheral port and RS-232C port settings must be set properly in order to use the Host Link communications, as shown in the following table.BitFunctionSettingPeripheral Port SettingsThe following settings are effective after transfer to the PC.DM 665000 to 03 Port settings0: Standard (1 start bit, 7-bit data, 2 stop bits, even parity, 9,600 bps)1: Settings in DM 6651To matchhost parameters(Other settings will cause a non-fatal error, the default setting (0) will be used, andAR 1302 will turn ON.)04 to 0708 to 1112 to 15Not used.Not used.Communications mode0: Host Link; 1: No-protocol(Other settings will cause a non-fatal error, the default setting (0) will be used, andAR 1302 will turn ON.)242000: HostLinkSectionSRM1(-V2) Communications FunctionsWordDM 6651BitFunction00 to 07Baud rate00: 1.2K, 01: 2.4K, 02: 4.8K, 03: 9.6K, 04: 19.2K08 to 15Frame formatStart00:1 bit01:1 bit02:1 bit03:1 bit04:1 bit05:1 bit06:1 bit07:1 bit08:1 bit09:1 bit10:1 bit11:1 bitLength7 bits7 bits7 bits7 bits7 bits7 bits8 bits8 bits8 bits8 bits8 bits8 bitsStop1 bit1 bit1 bit2 bit2 bit2 bit1 bit1 bit1 bit2 bit2 bit2 bit4-4SettingTo matchhost parametersParityEvenOddNoneEvenOddNoneEvenOddNoneEvenOddNoneTo matchhost parameters(Other settings will cause a non-fatal error, the default setting (00) will be used, andAR 1302 will turn ON.)DM 665200 to 15Transmission delay (Host Link)0000 to 9999 (BCD): Set in units of 10 ms.(Other settings will cause a non-fatal error, the default setting (0000) will be used,and AR 1302 will turn ON.)DM 665300 to 0708 to 11DM 6654Node number (Host Link)00 to 31 (BCD)To matchhost parameters00 to 31(Other settings will cause a non-fatal error, the default setting (0000) will be used,and AR 1302 will turn ON.)Start code enable (RS-232C, effective when bits 12 to 15 of DM 6650 are set to 1.)0: Disable1: SetAny12 to 15End code enable (RS-232C, effective when bits 12 to 15 of DM 6650 are set to 1.)0: Disable (number of bytes received)1: Set (specified end code)2: CR, LFAny00 to 07Start code (effective when bits 08 to 11 of DM6650 are set to 1.)00: 256 bytes01 to FF: 1 to 255 bytesAny08 to 15End code (no-protocol)AnyWhen bits 12 to 15 of DM6653 are set to 0:00: 256 bytes01 to FF: 1 to 255 bytesWhen bits 12 to 15 of DM6653 are set to 1:Setting: 00 to FF (Hex)Note If an out-of-range value is set, the following communications conditions will result.