background image

 

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

P652-E1-01 

 

OMRON Corporation 
Displacement Sensor 
(ZW-7000 series)

 

CJ Series 
General-purpose Serial 
Connection Guide 
(RS-232C) 
 

Summary of Contents for CJ2H-CPU64 -

Page 1: ...P652 E1 01 OMRON Corporation Displacement Sensor ZW 7000 series CJ Series General purpose Serial Connection Guide RS 232C...

Page 2: ...n shots reprinted with permission from Microsoft Corporation Windows is a registered trademark of Microsoft Corporation in the USA and other countries Company names and product names in this document...

Page 3: ...rial Communications Connection Procedure 10 7 1 Work Flow 10 7 2 Sensor Controller Setup 12 7 3 PLC Setup 20 7 4 Serial Communication Status Check 39 8 Initialization method 47 8 1 Initializing PLC 47...

Page 4: ...CJ2H CPU6 EIP CJ series CJ2 CPU Unit Software USER S MANUAL W336 CJ1W SCU 1 V1 CJ1W SCU 2 CJ Series Serial Communications Units OPERATION MANUAL W474 CJ2 CPU CJ Series Programmable Controllers INSTRU...

Page 5: ...ng the PMCR instruction in a program A sequence that is started by the instruction executes steps registered in its own sequence Step A unit to execute any one of the followings message send processin...

Page 6: ...2016 It is subject to change for improvement without notice The following notations are used in this document Indicates a potentially hazardous situation which if not avoided may result in minor or mo...

Page 7: ...RS 232C Sensor Controller Sending the command data Executing the command Receiving the response data and storing in memory Returning the response data Prepare latest project files of both CX Programm...

Page 8: ...licable devices to describe the procedures for connecting the devices and checking their connections You cannot use devices with versions lower than the versions listed in 5 2 To use the above devices...

Page 9: ...l project file Protocol macro data P652_CJ_PMCR232C_OMR ON_ZW 7000_EV100 psw Ver 1 00 Personal computer OS Windows 7 USB cable USB 2 0 type B connector OMRON RS 232C cable for PLC or programmable term...

Page 10: ...UAL Cat No W344 Additional Information For information on the serial cable RS 232C refer to 3 4 RS 232C and RS 422A 485 Wiring of the CJ Series Serial Communications Units OPERATION MANUAL Cat No W336...

Page 11: ...ions mode Protocol macro Data length bit 8 bits 8bit Default Stop bits length 1 bit 1bit Default Parity None OFF None Default Baud rate 38400 bps 38400 bps Default Protocol macro transmission method F...

Page 12: ...y 7 DR Data set ready Input 8 ER Data terminal ready Output 9 SG Signal ground Shell FG Shield Sensor Controller ZW 7000 applicable connector Square 17 pin female Usage Pin No Terminal name Function R...

Page 13: ...d others to Sensor Controller 7 2 2 Parameter Settings Set the parameters for Sensor Controller 7 3 PLC Setup Set up PLC 7 3 1 Hardware Settings Set the hardware switches on Serial Communications Unit...

Page 14: ...Starting the Trace Start tracing with CX Protocol 7 4 2 Executing the Communications Sequence Execute the communications sequence using CX Programmer 7 4 3 Checking the Trace Data Check with the trac...

Page 15: ...n you set up 1 Make sure that Sensor Controller is powered OFF If it is ON the settings described in the following steps and subsequent procedures may not be applicable 2 Check the position of connect...

Page 16: ...r 6 Connect 24 VDC power supply to 24 V input terminal block For details on specifications of 24 VDC power supply available for Sensor Controller refer to the Displacement Sensor ZW 7000 series Confoc...

Page 17: ...nsor Controller 3 The system enters the RUN mode after displaying INIT for a few seconds The RUN Indicator is lit in the RUN mode Press and hold the Mode Switching Key for two seconds 5000 THRESHOLD H...

Page 18: ...ndicator goes out in the FUNC mode Keep pressing the RIGHT or the LEFT Keys until SYSTEM is displayed Press the ZERO SET Key once THRESHOLD H L RUN 6 H CALIB is displayed on Main Display Keep pressing...

Page 19: ...ey once The first menu shown in this step is displayed again Press the RIGHT Key once 8blt 9 PARITY is displayed on Main Display Press the ZERO SET Key once Check that the following set value is displ...

Page 20: ...first menu shown in this step is displayed again Press the RIGHT Key once 1blt 11 BAUD RT is displayed on Main Display Press the ZERO SET Key once Check that the following set value is displayed on Su...

Page 21: ...s different change the value by pressing the UP or the DOWN Keys 0ff 13 RS232C is displayed on Main Display Keep pressing the RIGHT or the LEFT Keys until DELIMI is displayed Press the ZERO SET Key on...

Page 22: ...15 OK CAN is displayed Press the ZERO SET Key once SAVE is displayed Press the ZERO SET Key once The RUN mode is displayed 0kzcan 0kzcan 5000 THRESHOLD H L RUN 16 Power cycle Sensor Controller The sav...

Page 23: ...sitions of the hardware switches and Port 2 on the front of Serial Communications Unit by referring to the figure on the right 3 Set Unit number switch to 0 The unit number is set to 0 as the factory...

Page 24: ...hand 1 Turn ON PLC and Sensor Controller 2 Start CX Programmer If the User Account Control Dialog Box is displayed at start make a selection to start CX Programmer 3 CX Programmer starts 4 Select Open...

Page 25: ...ialog Box is displayed From the pull down list of Device Type select the device type of PLC to use Click Settings CJ2M is selected in this document 9 The Device Type Settings Dialog Box is displayed F...

Page 26: ...list If you changed Device Type in step 8 or CPU Type in step 9 the dialog box on the right is displayed Confirm that there is no problem and click Yes Make sure that the program was normally converte...

Page 27: ...tings such as the connection type in steps 7 to 9 and try again For details refer to Connecting Directly to a CJ2 CPU Unit Using a USB Cable of the CX Programmer OPERATION MANUAL Cat No W446 Additiona...

Page 28: ...there is no problem and click Yes Refer to Additional Information on the previous page for the settings concerning the dialog display 3 Check that Stop Program Mode is displayed on the right of the PL...

Page 29: ...ayed Confirm that there is no problem and click Yes 4 The Transfer from PLC Dialog Box is displayed Select IO Table and SIO Unit Parameters Click Transfer When the transfer is completed the Transfer R...

Page 30: ...Double click 0000 Main Rack in the PLC IO Table Window to expand the tree 2 Right click 00 1500 CJ1W SCU42 and select Unit Setup 3 The View Parameters Dialog Box is displayed Select Port2 Protocol mac...

Page 31: ...values 5 Select User settings for Port 2 Port settings from the pull down list of Set Value 6 Set the following parameters in the same way as step 5 Serial communications mode Protocol macro Data len...

Page 32: ...e is no problem and click Yes Check that the transfer is completed as shown on the right Click Close 8 The dialog box on the right is displayed Check the contents and click Yes The Select Port Dialog...

Page 33: ...Compare in the View Parameters Dialog Box 11 Check that a message Compare successful is displayed in the dialog box on the right Click Close 12 Click OK in the View Parameters Dialog Box 13 Select Exi...

Page 34: ...Program index Click OK The I O table and Special Unit Setup are unnecessary to transfer here because they are already set in 7 3 3 Creating the I O Table and 7 3 4 Parameter Settings The Comments and...

Page 35: ...is displayed stating Download successful when the transfer is completed Click OK 5 Select Programs in the project workspace Select Transfer Compare with PLC from the PLC Menu 6 Select Program s and cl...

Page 36: ...t CX Protocol 2 Start CX Protocol The following panes are displayed in this window Top left Project Workspace Bottom left Output Window Right Project Window 3 Select Open from the File Menu 4 The Open...

Page 37: ..._OMRO N_ZW 7000_EV100 in the Project Workspace to display a tree 2 Select Edit PC PLC Comms Settings from the PLC Menu 3 The Change PLC Dialog Box is displayed From the pull down list of Device Type s...

Page 38: ...from Offline to Program It means that PLC is connected online If Monitor or Run is displayed change it to Program by following step 8 8 If the operating mode of PLC is Monitor or Run in step 7 select...

Page 39: ...elect SCU 0 as shown on the right 11 Click New Protocol List in the Project Workspace and select Download Protocols from the Protocol Menu 12 The dialog box on the right is displayed Select Include So...

Page 40: ...firm that there is no problem and click OK 15 Check that 100 is displayed in the Downloaded Column as shown on the right Click Close 16 Click New Protocol List and select Compare Protocols from the Pr...

Page 41: ...is displayed in the Complied Column Check that the compiling is completed Click Compare 19 The dialog box on the right is displayed Check that Successful is displayed in the Result Column Click OK 20...

Page 42: ...power flow and present value status in the Ladder Section Window or in the Watch Window Precautions for Correct Use Check that the serial cable is connected before performing the following procedure I...

Page 43: ...ject Window Check that Trace 2 is highlighted as shown in the figure on the right Trace 2 corresponds to Port 2 on Serial Communications Unit 6 Select Start Trace One ShotTrace from the PLC Menu 7 Che...

Page 44: ...ammer 1 Expand the Programs tree in the project workspace of CX Programmer and double click Section1 The Ladder Section Window shows the Section1 ladder program 2 In the Ladder Section Window right cl...

Page 45: ...Check with the trace data in CX Protocol that the correct data are sent and received 1 Select Upload Trace from the PLC Menu in CX Protocol Once the trace data is stored Upload Trace becomes selectabl...

Page 46: ...2016 03 10 0D CR is received The mark above indicates a space The response data and the parameter as shown on the right are given as information For details refer to 5 No protocol Connection of the Di...

Page 47: ...to the I O memory of PLC using CX Programmer 1 Select Edit Memory from the PLC Menu in CX Programmer 2 Double click CIO on the Memory Tab of the PLC Memory Window 3 Enter 5500 in the Start Address Fi...

Page 48: ...57 2D37 3030 3020 2020 2020 2020 2020 2056 6572 322E 3032 3020 3230 3136 2F30 332F 3130 These values can be expressed as a string ZW 7000 Ver2 020 2016 03 10 which is the same as the trace data descri...

Page 49: ...ay Keep pressing the RiGHT or the LEFT Keys until C INFO is displayed on Main Display Press the ZERO SET Key once 8 VER is displayed on Main Display Press the ZERO SET Key once Check the Sensor Contro...

Page 50: ...Serial Communications Unit and CPU Unit Change the operating mode of PLC to PROGRAM mode before the initialization 8 1 1 Serial Communications Unit To initialize the settings of Serial Communications...

Page 51: ...lize in the Confirm All Memory Area Clear Dialog Box and click OK 8 1 Initializing Sensor Controller For information on how to initialize Sensor Controller refer to Initializing Settings in 8 11 Setti...

Page 52: ...A normal end of the send receive processing means a normal end of the communications sequence An error end means an error end of the communications sequence and an error of Destination Device detected...

Page 53: ...the command by receiving the command data from PLC and returns response data to PLC 4 The PLC receives the response data from Sensor Controller according to the receive messages defined by the communi...

Page 54: ...erations to execute the PMCR instruction and to send and receive messages Additional Information For details refer to Serial Communications Instructions PMCR in SECTION 3 Instructions of the CJ Series...

Page 55: ...0 to 999 0000 to 03E7 0 15 Bit S First send word send area specification The first word of the words n required to send the data is set to S Including the S word Between 0000 and 00FA n 0 and 250 wor...

Page 56: ...and send messages SCU Destination Device Send message CPU SCU Send area S 0 word 1 word 2 words n 1 words 0 15 0 15 0 15 0 15 Bit No of send area words CR LF Terminator Data Relation between receive m...

Page 57: ...sion information acquisition are shown below Control word C1 setting C1 CIO 5010 CH Description data type Data description C1 Communications port No 1 digit hex 7210 Communications port No 7 Serial po...

Page 58: ...receive data format of version information that is acquired from Destination Device using the version information acquisition command The information below is stored in order from D 1 D CIO 5500 Item...

Page 59: ...as communications errors An error can be detected with error code 1519 10 of the sequence abort completion in the CIO area allocated to the SCU 3 Errors in Destination Device Destination Device error...

Page 60: ...riable name Description 5000 02 BOOL Output_NormalEnd Turns ON when the send receive processing ends normally 5000 03 BOOL Output_ErrorEnd Turns ON when one or more of the following errors occur 1 PMC...

Page 61: ...06 BOOL Local_DestinationDevice Error Turns ON when a Destination Device error occurs 5000 07 BOOL Local_PMCRErrorCode Turns ON when a PMCR instruction error either of the following three errors occur...

Page 62: ...IO area allocated to SCU refer to 2 3 2 CIO Area of the CJ Series Serial Communications Units OPERATION MANUAL Cat No W336 Related auxiliary area They are the fixed addresses determined by the communi...

Page 63: ...nstruction execution management 2 1 PMCR instruction executing 2 2 PMCR instruction execution processing 2 3 Normal error detection processing The communications sequence registered in SCU is identifi...

Page 64: ...nt is shown below 1 Initialization processing No Outline Description 1 1 Response code clear Clears the error code storage area to 0 1 2 Operand setting for PMCR instruction Sets execution parameters...

Page 65: ...conditions Communications port No 7 can be used CMND instruction is not being executed Point on safety Thoroughly check the overall program before specifying the area to store the receive data of the...

Page 66: ...as a normal end when all the following conditions are satisfied 1 Normal end of PMCR instruction No PMCR instruction error 2 Normal end of communications sequence No communications error 3 Normal mes...

Page 67: ...n 3 1 Normal end processing Turns ON the normal end flag if it is detected in 2 3 Normal error detection processing that the send receive processing ends normally 3 2 Response code setting Sets respon...

Page 68: ...cted in 2 3 Normal error detection processing that the send receive processing ends in an error 4 2 Response code setting Sets the response code corresponding to the error in the response code storage...

Page 69: ...ssage formats in the reception matrix case numbers 00 to 14 In the case number 15 Other is automatically stored Sequence No 900 Step No 00 Send message 00 Receive matrix Case No 00 Receive message 00...

Page 70: ...wn below 1 Step No 00 Issuing send message SD_VR 2 When step No 00 ends normally When step No 00 ends in error 3 Next Process Receive matrix Error Process Abort Executes the case No 00 01 15 and termi...

Page 71: ...on Explanation Timer Tr Receive wait monitoring time Monitors the time from when the receive command of the step in the sequence is recognized until the first byte header is received This timer is set...

Page 72: ...an error occurs If the error still remains after the designated number of retry repetitions the system goes to the error process The retry count can be set only for the step in which Send Receive comm...

Page 73: ...rmally If a communications error occurs the process set in the Error Column is executed Screenshot of step settings Setting Step No Next process Error process 00 Matrix Abort Process list Process Desc...

Page 74: ...ssage settings SD_VR send message setting Setting VR t 1 2 No Code Description 1 VR Constant ASCII Version information acquisition command 2 t Terminator Type Code Data CR Send message command format...

Page 75: ...mal and error message identification In the protocol macro data the normal and error messages are identified using the receive message data Error message Receive messages with 2 characters beginning w...

Page 76: ...Error message Setting E W 1 1 t 1 2 3 No Code Description 1 E Constant ASCII E is fixed when receiving the response 2 W 2 2 W 1 1 Stores 1 byte of data in the first receive word 1 word that is specif...

Page 77: ...e set for the Mat_VR receive matrix Mat_VR receive matrix setting The following shows that three case numbers 00 01 and 15 are set Screenshot of case number setting Setting The table below shows the c...

Page 78: ...0 Output_DestinationDevice ErrorCode H402 0000 0000 Normal response Normal response Error end Local_PMCRExecuting 5000 01 Receive data storage area From 5501 Output_NormalEnd 5000 02 Input_Start 5000...

Page 79: ...annot be executed occurs while the protocol macro is being executed Example A header occurs after a terminator 000F Transmission error 2 Communications error Communications cannot perform due to an er...

Page 80: ...10 Revision History 77 10 Revision History Revision code Date of revision Description of revision 01 June 2 2016 First edition...

Page 81: ...78...

Page 82: ...2016 0616 P652 E1 01...

Reviews: