Home
"user manual"
Contents
1. 2 3 1 Start the CX Protocol Start the CX Protocol and open the protocol macro data CX Protocol Select Open from the File Menu 7 CX Protocol System P Fie View Hep New Ctrl M i Open cro i Print Setup On the Open Dialog Box select OMRON_V500 R2_PMCR_EV1 00 psw and click the Open Button Obtain the protocol macro data from OMRON The project workspace andthe Project Window display the ES protocol macro data that was _ as I read LARA 29 7 Connection Procedure 7 3 7 Connecting Online and Transferring the Protocol Macro Data Connect online with the CX Protocol and transfer the protocol macro data to the Serial Communications Unit 4 Double click the OMRON_V500 R2_PMCR_EV1 00 on the project workspace to display a tree z al OMRON V500 R2 PMCR_EV100 322 New Protocol List BA Trace List m e NewPLC1 Offline NJ501 1500 D Select Edit PC PLC Comms i Tools Window Help Settings from the PLC Menu Connect to PLE Operating Mode Edit PC PLC Comms Settings 3 The Change PLC Dialog Box is displayed Select a device type to use from the pull down list of the Device Type and click the Settings Button NJ501 is used in this document 4 The Device Type Settings Dialog Box is displayed Select the CPU type to use from the pull down list and click the OK Button 1500 is used in this document Rea
2. 7 3 3 Checking the Parameters and Building Check the parameters that are set execute the program check on the project data and build the Controller 4 Double click CPU Expansion y Configurations and Setup Racks under Configurations and Setup in the Multiview Explorer ea EtherCAT Y gt CPU Expansion Racks p m CPU Rack VO Map PA Controller Setup P 1 Motion Control Setup ff Cam Data Settings Event Settings ME Task Settings Er Data Trace Settings The CPU Expansion Racks Tab lt is displayed in the Edit Pane eime vane Select the Serial Communications Unit icon as shown on the right Confirm that CJU1W SCU42 is displayed the Device name is J01 and the Unit No is 0 Model name CJ1W SCU42 Product name Serial Communication UNIT Version 2 0 Specifications RS 232C x 1 RS 422 485 x 1 Rack No 0 Slot No n Unit No 0 settinc lt SS Edit Special Unit Settings If the settings are different change the values Click Edit Special Unit Settings A 3 The 0 Unit 0 Tab is displayed CPU Expansion Racks Select Port2 Protocol macro A T Parameter group to show All Parameters All Parameters Settings from the pull down list of Parameter group to show Parameter nam Port Settings Portl Port Settings Port settings Portl Portl Portl Data length Portl Portl Portl Portl Portl Portl Portl Portl Portl 1 Serial communicatio Port o Stop
3. Protocol macro Data length 8 bits Default Stop bit 1 bit Default Parity None Default Transmission rate Baud rate 9 600 bps Default 9 600 bps Default Protocol macro transmissions Header EN None Default Footer EN lt CR gt Default Number of digit output EN None Default RS CS control o None no protocol system CO a P Precautions for Correct Use This document describes the setting procedure of the CJ1W SCU42 Serial Communications Unit with unit number 0 communications connection port 2 and device name J01 To connect devices under different conditions change the variable names and setting values used in the program by referring to 9 Program 6 Serial Communications Settings i 6 2 Cable Wiring Diagram For details on the cable wiring refer to Section 3 Installation and Wiring of the CJ series Serial Communications Units Operation Manual for NJ series CPU Unit Cat No W494 Check the connector configuration and pin assignment before wiring You do not need to make a cable when you use the special cable V509 W011 Connector configuration and pin assignment lt CJ1W SCU42 gt Applicable connector D sub 9 pin kaak fa oo do amp ii Sv roy E a z peon pasen CT e je magoa o C E TA lt V500 R2CF gt Applicable connector DIN 8 pin Fin No Signal name Function A o msna Pz so nesses aaa as i y i 5 e nc noom Wf ua Connector part DIN 8P plug
4. Byte from the pull down lists After changing the values click the Apply Button Cancel Apply 5 Double click I O Map under A PU Expansion Racks 7 Configurations and Setup on Pos Port Descrip KERN w Configurations and Setup w Y CPU Expansion Racks the Multiview Explorer 75 EtherCAT CF v CPU Rack 0 The O M ap Tab IS displayed Y CPU Expansion Racks ol v CJIW SCU42 Serial Communic i gt m CPU Rack Com UnitSta Serial Comm and then the parameters for the e e Com_UnitLogMemErr Error Log EEP i i P 2 Controller setup Com_UnitPmrDatErr Protocol Data U nit are listed i gt 1 Motion Control Setup l v P1_PortCfg Porti Port Se 6 Confirm that data In the Variable y Port 1 Vanatde Variabie Comment Vanabie Type 1 Y CPU Expansion Rack Columns start with JO1 and the PA A A Genal Communic Global Variable IS set In each as i senal Communication U R SOL Com Unitsta SG al Variables Com _UntLogMembErr Error Log EEPROM Error R PASO Com UnitlogMemin AS obal Variable Variable Type Column e ner pressed Data Error R BOOL ps A Y P1 PortCig E A Le IO PL PortCls O Kslobal Variables pt SerSetCfg Porti User specified Set RW ROOL FORENES o Global variables 1 Startsitch orti Start Bats Sse MOL PL Startls lt 0 1 1 Global Vanables If the settings are different from Abe seer sor SR ee re 11 aH E e RR Stopite Porti Stop Bits i OL PL Stopi gt n the above right click on pi pacers porti Pany RW POOL ERECTA BE
5. Do you wish to continue ERE New Protocol List 5 New Protocol ms Trace List H D MewPLC1 Program NJ501 1500 a 31 11 12 13 14 The Project Window on the right is displayed Confirm that SCU 0 is entered in the Target Column If SCU O is not entered select SCU O as shown on the right figure Select New Protocol List and select Download Protocols from the Protocol Menu The dialog box on the right is displayed Select the Include Source Information Check Box and click the Compile Button When 100 is displayed in the Complied Column the compiling operation is completed After confirming that the compiling operation is completed click the Download Button File a OMRON V GI New Protocol rotocattame siart sequnce en Seavenee type Target SAA f New Protocol Els a Fr FFH H A Ne ca WEE Manap Protocol Compile Download Edit View Protocol Djela 4 7 Connection Procedure USER PLC Tools Window F Create Upload Protocol List Upload Protocols Download Protocols Compare Protocols Ol Protocol password protection Password I Include Source Information S scup 000 Protocol password protection Password I Include Source Information Compile Stop Compiler rl SCU 0 32 7 Connection Procedur
6. Programd Qutput_PmrErroril Program QOutput_PmrerroriDex Program Output_PmrstaErrCode 7 i ProgramO Output TransErrCode If the program ended in an error the error code corresponding to the error is stored Troubleshoot the error by referring to 9 8 Error Process Zz Error end Programd Qutput_PmrErroriD a Frogram0 Output_PmrErrorIDEx OoOo O Programd Output_PmrstaErrcode A Program0 Output_TransErrCode oc 3 Check the received data code that was read in the Watch ai del ES E E Window of the Sysmac Studio ud Program0 Output_RecvData 0 249 Output_RecvData 0 eee In the example on the right the Eos este El AE data stored in Output_RecvData 2 A Output_RecvMessage is Output_RecvData 3 ai 4912345678904 It is the same Output RecvData 4 A as the data in step 3 of Section Output_RecvData 5 ns 1 4 3 Output_RecvData 6 IN Output RecvData 7 Ea The number of words used to Output RecvData 8 PAE store the receive data 0008 in AAA hexadecimal is stored in Output_RecvDataf 0 The bar Receive data Hex code data that were read are Output_RecvData 0 0008 Number of words used to store stored from the receive data Output_RecvData 1 to 7 The Eight words from 0 to 7 Output_RecvData 1 3439 number of used words is 8 Output_RecvData 2 3132 including Outout_RecvData 0 Output_RecvData 3 3334 Values of Bar Code String Output_RecvData 4 3536 Out
7. Check Error 0 Normal 6 1 Command Error 0 Normal 5 1 Timeout 0 Normal 4 1 Overrun error 0 Normal 3 1 Framing error 0 Normal 2 1 Parity error 0 Normal O and 1 Not used Additional Information For details on the transmission error status TransErrCode refer to 4 2 5 Device Variables for CJ series Unit for Status of the CJ series Serial Communications Units Operation Manual for NJ series CPU Unit Cat No W494 66 10 Revision History 10 Revision History Revision Date of revision Revision reason and revision page code 01 Aug 2 2013 First edition 6 68 Authorized Distributor
8. Communication Unit Start the CX Protocol and open the protocol macro data Connect online with the CX Protocol and transfer the protocol macro data to the Serial Communications Unit Execute the program and confirm that serial communications are normally performed Start tracing with the CX Protocol Execute the program with the Sysmac Studio 7 4 3 Checking the Trace Data I 7 4 2 Checking the Receive Data 7 Connection Procedure Confirm that the correct data is sent and received by checking the trace data of the CX Protocol Confirm that the correct data are written to the variables of the Controller with the Sysmac Studio 7 Connection Procedure j 7 2 Setting UP the Bar Code Reader Set up the Bar Code Reader 7 2 1 Cable Connection 1 l Connect a cable to the Bar Code Reader Connect the special cable V509 W011 to the Bar Code lt SpBar Code Reader Reader CO V500 R2CF Special cable Connect the 5 VDC power V509 W011 supply to the special cable and Sua turn ON the power supply SP sor ET 5 VDC power supply Precautions for Correct Use This document explains the procedures for setting up the Bar Code Reader from the factory default setting If the Bar Code Reader was changed from the factory default setting make sure to initialize by referring to Section 8 2 Initializing the Bar Code Reader Additional Information For details on the factory default setting o
9. Communications Unit hereinafter referred to as the Serial Communications Unit This program and protocol macro data use the protocol macro function of the Serial Communications Unit to send receive the Reading Trigger command to from the destination device and to detect whether the operation ends normally or ends in an error A normal end of this program means a normal end of the communications sequence of the protocol macro An error end means an error end of the communications sequence of the protocol macro In this section the prefix 10 possible to omit is added to decimal data and the prefix 16 to hexadecimal data when it is necessary to distinguish between decimal and hexadecimal data e g 1000 or 10 1000 for decimal data and 16 03E8 for hexadecimal data etc Also to specify a specific data type the prefix lt data type gt is added e g WORD 16 03E8 Additional Information OMRON has confirmed that normal communications can be performed using this program and protocol macro data under the OMRON evaluation conditions including the test system configuration version and product lot number of each device which was used for evaluation OMRON does not guarantee the normal operation under the disturbance such as electrical noise or the performance variation of the device 43 9 Program 9 1 1 Communications Data Flow The following figure shows the data flow from when the Controller Serial Communication
10. LOW ta Sea te te oh tsa a ERE REE ERNE ES EDR DS PEN DER 14 7 2 Setting UP the Bar Code Reader occccccccccnccoccccnncccoconncononenocononeninnnos 16 7 3 Seting UD he Controlar sara tds 17 7 4 Checking the Serial Communications cccccooccnnccconcnnccnonennnononeninonos 35 S INIIaliZzation METIO ici ias 41 8 1 Initializing the Controler ases a a eaaa 41 8 2 Initializing the Bar Code Reader c ooccccoocccncccccccnccconccnnononccnncnancnnnonaness 42 Y Program sipia a a a 43 9 1 A O 43 9 2 COMMUNICATIONS SOQUenNCe sssrin a e a 47 9 3 Error Detection Processing cococccoocnccccnococonoonnconnnconnnnonnnnonannnnanoss 48 9 4 Wala DIOS isis N a e cee eh een sadee 49 9 5 ST POMO 52 9 6 Protocol Macro Dala ori da 57 9 7 A IA SE SER ENE SER EDER SE 64 9 8 Error POCOS S enni nsona raser near irer ae ja 65 103 REVISOR MISTO scoreann a AA aE 67 1 Related Manuals 1 Related Manuals The table below lists the manuals related to this document To ensure system safety make sure to always read and heed the information provided in all Safety Precautions Precautions for Safe Use and Precaution for Correct Use of manuals for each device which is used in the system Cat No Manual name W500 NJ501 1110 NJ series CPU Unit Hardware User s Manual NJ301 1 1 11 W501 NJ501 10000 NJ series CPU Unit Software User s Manual NJ301 1111 11 W494 CJ1W SCUl 2 CJ series Serial Communications Units Operation Manual for NJ series C
11. List 5 0 ay Blaa Ear IF lt Settings gt Item Description Explanation Receive wait monitoring time Receive finished Monitors the time from the receive wait status to the reception of the first data header in the step of the sequence This timer is set to 3 seconds in this protocol macro data Timer Tr Monitors the time from the reception of the first data to the completion of the reception in the step of the sequence This timer is set to 3 seconds in this protocol macro data Timer Tfr monitoring time Send finished monitoring time Monitors the time from the sending of the header to the sending of the last data This timer is set to 3 seconds in this protocol macro data Timer Tfs Additional Information Refer to Section 4 5 Calculation Method of Monitoring Time of the CX Protocol Operation Manual Cat No W344 for the calculation method of monitoring time 99 9 Program 9 6 4 Step Settings This section describes the step settings for communications sequence No 900 The settings include retry count send receive messages message names next process and error process The sequence of this protocol macro data includes Step No 00 only EN Additional Information Refer to 3 3 Step Attributes of the CX Protocol Operation Manual Cat No W344 for details on step settings eRetry count setting This section describes the retry count setting for the step The step is retried for the specified n
12. New release C Copyright OMRON Corporation 013 All Rights Reserved 1 Communications processing Communications start switch Input Start Communications processing status flags Local_Status lt STRUCT gt Busy Communications in progress Done Communications normal end Error Communications error end State processing number Local State 10 Initialization processing 11 CompoWay F communications processing 1 1 Starting the communications processing Start communications processing when the communications start switch changes to ON when communications processing status flags have been cleared IF Input_Start AND NOT Local _Status Busy OR Local_Status Done OR Local_Status Error THEN Local_Status Busy TRUE Local State 10 10 Initialization processing END TF 1 2 Clearing the communications processing status flags Clear the communications processing status flags when the communications start switch changes to OFF while communications processing is not in progress IF NOT Input Start AND NOT Local_5tatus Busy THEN Local Status Done FALSE Local Status Error FALSE END IF 1 3 Entering the communications in progress status and shitting to each state processing IF Local_Status Busy THEN CASE Local State OF 93 9 Program 2 Initialization processing To change the input values such as the unit number of the Serial Communications Unit the port number to be used protocol macro sequence num
13. S GND AAA Made by Hosiden Corporation N TCP1394 715267 TypeA ICAA IO E AS 11 6 Serial Communications Settings Cable Pin assignment CJ1W SCU42 Serial Fixed Laser Type Barcode Reader V500 R2CF Communications Unit name Fa m t 2 soo j CS 5 interface D SUB 9 pin Cable connector type Male DIN 8 pin Cable connector type Female External trigger 5V OV The external trigger is not used in this document Insulate it from other cables Connect 5V and OV to the external power supply Recommended parts for the connector When you make a connection cable use the following connectors to connect it to the connector of the Bar Code Reader Recommended parts for the connector Usage Bar Code Reader de ott as AS al CJIW SCU42 For panel installation 2 Hosiden Corporation Connection cable ny iy M A IN AN Connector part DIN 8P plug Made by Hosiden Corporation TCP1394 715267 TypeA E m power supply mSpecial cable The special cable V509 W011 is used in this document it i Special cable V509 W011 an NJ501 1500 EN A RI CJ1W SCU42 a dd Bar Code Reader Brown 5V E V500 R2CF The external trigger is not used in this document Insulate it from other cables Connect 5V and OV to the external power supply 12 6 Serial Communications Settings i 6 3 Example of Connection Check This document shows an
14. TRIG instance J01 P2 PmrExecSta Local EndExecPMCR IF Local_EndExecPMCR THEN IF NOT JO1_P2 PmrSegEndSta THEN Error end of protocol macro Output TransErrCode J01 P2 TransErrSta Local Status Error TRUE ELSE Normal end processing Output_TransErrCode WORD 1670000 Local_Status Done TRUE Convert the receive data from BYTE array to STRING Local_RecvWordSize WORD_TO_UINT Output_RecvData 0 1 MemCopy Output_RecvData 1 Local_RecvWordData 0 Local_RecvyWordSize ToAryByte Local_RecvWordData _eBYTE_ORDER _HIGH_LOW Local_RecvByteData 0 Local_RecvByteSize Local_RecvWordSize Output_RecvMessage AryToString Local_RecvByteData 0 Local_RecvByteSize END IF Local EndExecPMCR FALSE Local_Status Busy FALSE Local_ExecFlg FALSE Local_5tate 0 To 0 Communications not in progress status 3 1 2 Error detection processing during protocol macro execution ELSIF ExecPMCR_instance Error THEN ExecPMCR instruction error Output_PmrErrorlD ExecPMCR_instance ErrorlD Output_PmrErrorlDEx ExecPMCR_instance ErrorlDEx MoveDigit01_P2_PmrSta USINT 0 Local_PmrStaCode USINT 0 USINT 1 Output_PmrStaErrCode Local_PmrStaCode Output_TransErrCode J01_P2 TransErrs5ta Local_Status Busy FALSE Local Status Error TRUE Local_ExecFlg FALSE Local_5tate 0 To 0 Communications not in progress status 3 1 3 Setting the communications instruction execution flag ELSIF Port_isAvailable AND NOT JO1_P2 PmrExecsta AND NOT ExecP
15. Transfer to Controller Transter from Controller Compare OK Cancel Apply uo AAA a 41 8 Initialization Method 8 1 2 CPU Unit To initialize the settings of the Controller select Clear All Memory from the Controller Menu of the Sysmac Studio The Clear All Memory Dialog Box is displayed Click the OK Button oar All haman lcal All METI Clear All Memory This function mnitializes the target area of destination Controller Confirm the area to initialize first and press the OK button CPU Unit Name new Controller 0 Model NJ501 1500 Area User Program User defined Valiables Controller Configurations and Setup secunty Information settings of Operation Authornty initialization at the next online H Clear event log Cancel i 8 2 Initializing the Bar Code Reader For the initialization of the Bar Code Reader refer to Return to the factory default setting in Menu Sheet Command List in Section 4 Setting Method of the V500 R2 Series Fixed Laser Type Barcode Reader V500 R2 Series User s Manual Cat No Z334 42 9 Program 9 Program This section describes the details on the program and the protocol macro data used in this document i 9 1 Overview This section explains the specifications and functions of the program and the protocol macro data that are used to check the connection between the Bar Code Reader hereinafter referred to as the destination device and the Controller Serial
16. brts Panty Baud rate Send delay Send delay user spe Port2 CTS control L N 1 1 protocol sett Port Host Link compatible Port2 Host Link unit numb Port2 Portl Portl Portl Portl Portl Host Link Settings rtl NT Link Settings No Protocol Settings Protocol macro Settings seral Gateway Settings Loopback test Settings MODBUS RTU Slave Settings Host Link Settings Port2 NT Link Settings No Protocol Settings Senal Gateway Settings Loopback test Settings MODBUS RTU Slave Settings No Protocol Start co Porte 19 7 Connection Procedure Parameter group to show Fortz 4 Parameter group to show is set to Port2 Protocol macro Settings Parameter name Parameter value Unit f f imeter nm eT Y The setting items of the Port 2 Ford Port settings EEE Protocol macro Settings are Port2 Serial communications mode Protocol macro shown Port2 Data length E bits Confirm that the Port2 Port EERE LS 1 bit Settings is set to User settings ita g g Port Baud rate Default 9600bps and other settings are the same Port2 Serial Gateway Response timeoutm M ms as those listed in Section 6 1 ON Port2 Protocol macro Transmission metho Full duplex T Fort Clearing holding the contents of the Clear T If the settings are different from Port2 Link word specification data excham On request O refreshing the above change the values Port2 Maamum number of bytes in proto Sas
17. data storage area 500 bytes WORD Input_SendData Send data storage area 500 bytes WORD Output_RecvData An area that stores DstDat of the ExecPMCR instruction An area that stores the receive data after converted in to a Output_RecvMessage STRING 498 string 498 characters An area that stores an error code of the ExecPMCR Output_PmrErrorlD instruction Normal end 16 0000 An area that stores an expansion error code of the Output_PmrErrorlIDEx ExecPMCR instruction Normal end 16 00000000 OF WORD An area that stores a protocol macro error code Output_PmrStaErrCode Normal end 16 0000 wom An area that stores the transmission error status flag Output_TransErrCode WORD Storage area of JO1_P2_TransErrSta Normal end 16 0000 You need to use an AT specification for the area that stores DstDat of the ExecPMCR instruction to specify an address in the memory used for CJ series Units 49 9 Program Device variables for CJ series Unit Serial Communications Unit Variable name Data type Explanation Protocol macro operation status A OA WORD Bits 03 to 00 Protocol macro error code J01 P2 PmrExecSta BOOL Protocol Macro Execution Flag J01 P2 PmrSegEndSta BOOL Sequence End Completion Flag J01 P2 PmrSegAbtSta BOOL Sequence Abort Completion Flag J01 P2 TransErrSta WORD Transmission error status Additional Information For details on the variables of the Serial Communications Unit refer to 2 3 De
18. format of the message that is sent from the Serial Communications Unit to the destination device according to the settings of SD RDCODE Command Number Remarks of bytes Header Fixed lt ESC gt 1641 B Z Fixed Z 16 5A Reading Trigger destination device command Terminator Fixed lt CR gt 16 0D 62 9 Program 9 6 6 Receive Message Settings This section describes the settings of the receive message Additional Information Refer to 3 4 Communication Message Attributes of the CX Protocol Operation Manual Cat No W344 for details on receive message settings Receive message setting screen Tat Receive message SEERE OMRON_V500 R2_PMCR_EV100 kar RV_RDCODE 33 New Protocol List 8 New Protocol New Sequence Send Message List wal Arm int a eSetting of receive message RV_RDCODE lt Settings gt W 1 lt t gt Code Description 1 2 1 W 1 Message data Variable All variable length data are read and stored from array variable n which is specified with DstDat of the ExecPMCR instruction 1 With this program data is stored from Output_RecvDataf1 2 inator lt t gt Terminator Message data Constant hex Type Code Data CR The header lt h gt is set to None lt Response format of receive message gt This is the response format of the receive message which is received by the Serial Communications Unit from the des
19. i 9 8 Error Process The following tables list the errors that are generated by executing this program 9 8 1 ExecPMCR Instruction Errors The error codes generated when the ExecPMCR instruction ends in an error are given below eOutput_PmrErrorlD After the ExecPMCR is executed the content of ExecPMCR_instance ErrorID is set Code 1640000 1640400 1640406 1640407 Description Normal end An input parameter for an instruction exceeded the valid range for an input variable The memory address or data size of the data specified in the instruction is incorrect The results of instruction processing exceeded the data area range of the output parameter 1640800 An error occurred when a FINS command was sent or received 160801 The FINS port is being used Additional Information For details on ErrorlD and error codes not listed in the table above refer to A 2 Error Code Descriptions and A 3 Error Code Details in Appendices of the NJ series Instructions Reference Manual Cat No W502 eOutput_PmrErrorlIDEx The content of ExecPMCR_instance ErrorIDEx is set when the value of FExecPMCR_instance ErrorlD is 16 0800 Code 16 00000000 16 00001106 16 00002201 16 00002202 16 00002401 Description Normal end A communications sequence number that is not registered was specified The operation was not possible because a protocol macro is already in execution The operating mode is wrong A checksum error occurred in
20. of a communications sequence protocol data registered in a Serial Communications Unit eExecPMCR instruction argument data EEC AN ExecPMCR Protocol Macro ExecPMCR_ instance ExecPMGR ST expression ExecPMCR_instance Execute Port SegNo SrcDat DstDat Done Busy Error ErrorlD ErrorlDEx Execute Done Variables name weaning vO beserpion Valarangs Uni bota Port Destination Destination port port SeqNo Communic Communications sequence ations number sequence number SrcDat send data Send data array array array DsitDai Recelve In out Receive data array array data array If you omit the input parameter the default value is not applied A building error will occur Data type en of destination port Port UnitNo Unit number Unit number of Serial Communications Unit PhysicPortNo Serial port Serial port number on number Serial Communications Unit 45 9 Program eSend Receive messages Overview of send receive messages Destination device Send message Controller Data Terminator Receive message Data Terminator Relationship between the SrcDat send data array and the send message ScrDat 0 ScrDat 1 ScrDat 2 ScrDat n 1 Bit p 1 0 1 0 1 0 1 0 CPU Communications Unit som D a oa 2 3 Send data array ScrDail 7 No of words of send data Communications Unit E Send message A NT Data Terminator Relationship betwee
21. prepared Sysmac Studio project file and understand the setting method and key points to connect the devices via serial communications The user program in the Sysmac Studio project file and the protocol macro data in the CX Protocol project file are used to check the serial connection by executing the Reading trigger command on the Bar Code Reader Prepare the latest Sysmac Studio project file and the CX Protocol project file beforehand To obtain the files contact your OMRON representative Name File name Version Sysmac Studio project file OMRON_V500 R2_PMCR232C_EV100 smc Ver 1 00 CX Protocol project file OMRON_V500 R2_PMCR_EV100 psw Ver 1 00 Hereinafter the Sysmac Studio project file is referred to as the project file The user program in the project file is referred to as the program The CX Protocol project file is called the Protocol macro data A Caution This document aims to explain the wiring method and communications settings necessary to connect the corresponding devices and provide the setting procedure The program used in this document is designed to check if the connection was properly established and is not designed to be constantly used at a site Therefore functionality and performances are not sufficiently taken into consideration When you construct an actual system please use the wiring method communications settings and setting procedure described in this document as a reference and design a new pro
22. the protocol macro data or the data transfer is not yet completed Additional Information For details on ErrorIDEx and error codes not listed in the table above refer to Serial Communications instructions ExecPMCR in Section 2 Instruction Descriptions of the NJ series Instructions Reference Manual Cat No W502 65 9 Program 9 8 2 Protocol Macro Error Codes The protocol macro error codes generated when a protocol macro related error occurs are given below These codes are set in Output_PmrStaErrCode eOutput_PmrStaErrCode The contents of the lower 4 bit of J01 P2_PmrSta are set Code Description 1640000 There are no errors 1640002 Sequence No error 1640003 Symbol specification area exceeded error 1640004 Protocol macro syntax error Additional Information For details on the protocol macro error codes PmrStaErrCode refer to 4 2 6 Protocol Status of the CJ series Serial Communications Units Operation Manual for NJ series CPU Unit Cat No W494 9 8 3 Transmission error status The error flags used when a transmission error occurs are shown below They are set in Outout_TransErrCode eOutput_TransErrCode The content of JO7_P2_TransErrSta is set Bit Description 15 1 Transmission error 0 No transmission error 14 1 Send Finished Monitoring Time Exceeded 0 Normal 13 1 Receive Finished Monitoring Time Exceeded 0 Normal 12 1 Receive Wait Monitoring Time Exceeded 0 Normal 8 to 11 Retry count 7 1 FCS
23. via serial communications This document explains the procedures for setting up the Controller and the Bar Code Reader from the factory default setting For the initialization refer to Section 8 Initialization Method i 7 1 Work Flow Take the following steps to connect the Bar Code Reader to the Controller via serial communications 7 2 Setting Up the Bar Code Reader I 7 2 1 Cable Connection 7 3 Setting Up the Controller y 7 3 1 Hardware Settings y 7 3 2 Starting the Sysmac Studio and Importing the Project File l 7 3 3 Checking the Parameters and Building I 7 3 4 Connecting Online and Transferring the Project Data i 7 3 5 Transferring the Unit Settings y 7 3 6 Starting the CX Protocol and Opening the Protocol Macro Data 7 3 7 Connecting Online and Transferring the Protocol Macro Data Jl 7 4 Checking the Serial Communications 7 4 1 Starting the Trace 7 4 2 Executing the Program y Set up the Bar Code Reader Connect a cable to the Bar Code Reader Set up the Controller Set the hardware switches on the Serial Communications Unit Start the Sysmac Studio and import the project file Check the parameters that are set execute the program check on the project data and build the Controller Connect online with the Sysmac Studio and transfer the project data to the Controller Transfer the setting data of the Serial
24. 5 9 6 1 Composition of Protocol Macro Data In this protocol macro data there is only 1 type of receive message SD_RDCODE for the send message SD_RDCODE Therefore the following composition is used without using the matrix Refer to 9 6 6 Receive Message Settings for details Sequence No 900 Step No 00 SD_RDCODE RV_RDCODE 57 9 Program 9 6 2 Protocol Macro Processing Procedure This section describes the processing procedure of the protocol macro Step No 00 Issuing send message SD_RDCODE When step No 00 ends normally When step No 00 ends in an error Next Process Terminates the Error Process Interrupts the step as an communications sequence as an Abort and terminates the communications End sequence i End End 98 9 Program 9 6 3 Sequence Settings This protocol macro data performs Reading Trigger read bar code by using communications sequence No 900 Set the timeout periods for the communications sequence Additional Information Refer to 3 2 Sequence Attributes Common to All Steps of the CX Protocol Operation Manual Cat No W344 for details on sequence settings e Timeout period setting The following is the settings of the timeout periods Timer Tr Tfr and Tfs which are set for the sequence Communications sequence setting screen xi FE Communication Sequence Link Word Control OMRON _V500 R2_ PMCR_EV100 ca 900 New Sequence Set 33 New Protocol
25. Gateway Response timeout monitoring time Port2 Serial Gateway send start timeout monitoring time Port2 Protocol macro Transmission method Full duplex Port2 Clearing holding the contents of the reception buffer in fullduplex mode Clear v Port2 Link word specification data exchange timing On request I O refreshing Y Port2 Maximum number of bytes in protocol macro send receive data Byte i Return to default Transfer to Controller Transfer from Controller Compare OK Cancel E a 10 Confirm that mismatch is Parameter name Parameter value compare results Unit i Port2 Port settings User settings l ser settings n ot S h own l n th e red fram e O n Port2 Serial communications mode Protocol macro F rotocol mac th e ri ht Port2 Data length 8 bits bits g 5 Port2 Stop bits 1 bit 1 bit Port2 Parity None M one Port2 Baud rate Default 9600bps efault 9600 Port2 Serial Gateway Response timeout monitoring time kr mene C Port2 Serial Gateway send start timeout monitoring time C Port2 Protocol macro Transmission method Full duplex v F ali duplex Port2 Clearing holding the contents of the reception buffer in fullduplex mode Clear v Clear Port2 Link word specification data exchange timing On request I O refreshing n request I Port2 Maximum number of bytes in protocol macro send receive data 28 7 Connection Procedure 7 3 6 Starting the CX Protocol and Opening the Protocol Macro Data
26. Input Start The online value of Input Start changes to True The program operates serial communications are performed with the Bar Code Reader and then the bar code is read If READ OK LED that is on the back of the Bar Code Reader is lit green and a buzzer sounds then the read operation succeeds If the bar code shown in the document cannot be read read a bar code shown in Corresponding Bar Code List in Section 6 Appendix of the V500 R2 Series Fixed Laser Type Barcode Reader V500 R2 Series User s Manual Cat No 2334 When reading change nput_Start to False and then change nput_Start to True again by using the same 7 Connection Procedure Online value Modify Program0O Input_Star TRUE FALSE lOnline value Modity ProgramQ Input Start FALSE A buzzer sounds if the read operation succeeds READ OK LED Illuminates when read correctly rocedure as this step 38 7 Connection Procedure 7 4 3 Checking the Trace Data Confirm that the correct data is sent and received by checking the trace data of the CX Protocol 4 Select Upload Trace from the PLC Menu from the CX Protocol A dialog box on the right is displayed Check the contents and click the Yes Button Tools Window Help Disconnect from PLE Operating Mode Edit PC PLC Commis Settings Edit Communications Port Settings Upload Communications Port Settings Download Communications Port Settin
27. MCR_instance Busy THEN Local_ExecFlg TRUE END IF 3 2 Executing the communications instruction ExecPMCR_instancel Execute Local_ExecFlg Port Local_InPort SeqNo Local_SeqNo SrcDat Input_SendData 0 DstDat Output_RecvData 0 55 4 Processing number error process 4 Processing number error process Error process for nonexistent processing number 99 Output_TransErrCode WORD 16 0010 Local_Status Busy FALSE Local _Status Error TRUE Local _5tate 0 0 Communications not in progress status ELSE Local State 99 To 99 Processing number error process END_CASE END IF 96 9 Program j 9 6 Protocol Macro Data Protocol macro data consists of sequence step send receive message and matrix lts composition is described as follows eWhen there is only one receive message format for a step send receive once Set one send message and one receive message for the step Sequence No 900 Step No 00 Send message 00 Receive message 00 Step No yy Send message yy Receive message yy Xxx 999 max yy 15 max eWhen there are several types of receive message formats for a step Send receive once Set the send message and matrix for the step Set several types of cases receive messages for the matrix Sequence No 900 Receive message Case No 00 F 00 Step No yy Receive message yy 15 max zz 14 max Case No zz ZZ xxx 999 max Case No 15 is automatically set Case No 1
28. N 7 3 5 Transferring the Unit Settings 7 Connection Procedure Transfer the setting data of the Serial Communication Unit 1 Select Mode PROGRAM Mode from the Controller Menu Offline synchronization A confirmation dialog box is sau fs displayed Confirm that there is no problem and click the Yes Cirl Shift W Cirl M Button Make sure a Controller stop will cause no problem Do you 3 PROGRAM mode is displayed Controller Status on the Controller Status Pane _ ONLNE ERR i ALM 4 Double click CPU Expansion want to change to PROGRAM Mode Y N Racks under Configurations _ and Setup in the Multiview _ AS Model name CHWS Explore r a oF rae Rais dl hair Ed omemuncabon Len Select the Serial ds siii ci ee de a AS Sint Ho 0 Communications Unit icon al Unit No fe n n n E Tack Setani Specal Und Settings Edd Specie Url Selina Click Edit Special Unit a i SAS TASTE Settings 5 The 0 Unit 0 Tab is displayed Click the Transfer To e li Sn i Parameter name Porti Port settings Port1 Serial communications mode Portl Data length i Portl Stop bits li Porti Parity Portl Baud rate Portl Send delay Portl Send delay user specified Portl CTS control Porti 1 N 1 1 protocol setting Portl Host Link compatible device mode i Portl Host Link unit number Portl No Protocol Start code He
29. N ESTATE z arityBtct ort Party EvenfOdd R JOOL g 1 PantyBnCtog Obal Variables ar CJ1 W SCU42 and select ICA te te fi e os see ye o ve Create Device Variable Com _UnitSta Com_UnitLogMeme Com_UnitPmrDatEr Y P1_PortCfg P1 SerSetCig P1_StartBitCfg P1_DatBrtCtg Copy search e Expand Collapse All P1_5topBrtCtg P1_ParityYNCfg P1 Pa rityBiiCig Create Device Variable P1_BaudrateCtg 7 Double click Task Settings gt Event Settings under Configurations and Setup IA Task Settings oo in the Multiview Explorer F Data Trace Settings 20 10 11 12 7 Connection Procedure The Task Settings Tab is z displayed in the Edit Pane Click ASenfourations and Setup the Program Assignment CEM EAP ARSE RAGES Settings Button and confirm that Program0O is set under Primary Task Y Be PrimaryTask 1 Programo Select Check All Programs from the Project Menu Check Selected Programs Shift F Build Controller FE Rebuild Controller Confirm that 0 Errors and 0 Warnings are displayed in the Build Tab Page under the Edit Desrric0n Program Location Pane Select Rebuild Controller from TADO NEP the Project Menu All SEERE F7 Check Selected Programs Shiit F Controller F A confirmation dialog box is displayed Check the contents When you execute the Rebuild operation all programs will be rebuilt and click the Yes Button It may take time to complete the op
30. OMRON Machine Automation Controller NJ series General purpose Serial Connection Guide RS 232C OMRON Corporation Fixed Laser Type Barcode Reader V500 R2 Series Network Connection Guide SYS E always in control About Intellectual Property Rights and Trademarks Microsoft product screen shots reprinted with permission from Microsoft Corporation Windows is a registered trademark of Microsoft Corporation in the USA and other countries EtherCAT is registered trademark and patented technology licensed by Beckhoff Automation GmbH Germany Sysmac is a trademark or registered trademark of OMRON Corporation in Japan and other countries for OMRON factory automation products Company names and product names in this document are the trademarks or registered trademarks of their respective companies Table of Contents Ie Related MantlalS usina aiii 1 25 Terms ana Def Altos rinitis 2 3 Remarks DE aa 3 Aan O AAA e aaa Kaai 6 5 Applicable Devices and Device Configuration sst 7 531 Applicable DEVICES oa renere ia 7 5 2 Device COnNfiguratiON oooncccccconcncccconnnncnnnnnnnononnnncononnnnnnnonennnnnnncnnnnnn 8 6 Serial Communications Settings css ELLE 10 6 1 Serial Communications Settings ooocccccccocncocononnnnccnnnnoncnonanennnnnos 10 6 2 Cable Winng Diagrames aN 11 6 3 Example of Connection ChecCk cccccconccncccccccnccconcnnnonancnnconannnnnnnanonoos 13 Ts GONNECHON POCO UFO iii A 14 Lal WOT
31. PU Unit W504 SYSMAC SE2 Sysmac Studio Version 1 Operation Manual W344 CXONE ALI C V4 CX Protocol Operation Manual W502 NJ series Instructions Reference Manual NJ301 11111 Z334 V500 R2 Series Fixed Laser Type Barcode Reader V500 R2 Series User s Manual 2 Terms and Definitions 2 Terms and Definitions Term Protocol macro Protocol Sequence Step Send message Receive message Matrix Case AT AT specification Explanation and Definition A protocol macro is a function that stores a data send receive procedure protocols in a Serial Communications Board or Serial Communications Unit to exchange data with general purpose external devices by executing the ExecPMCR instruction on the CPU Unit unit of independent communication processing with a specific general purpose device A protocol includes a data send receive procedure A protocol consists of multiple sequences A unit of the independent communication processing which can be started by executing the ExecPMCR instruction of a program A sequence that is started will execute steps registered in its own sequence A unit to execute any one of the followings message send processing message receive processing message send receive processing clear receive buffer or step wait Up to 15 steps can be set per sequence A communication frame command sent to the external general purpose device A send message is read from the step in the sequence and sen
32. Port Settings Not Tracing Download Communications Port Settings Start Trace Continuous Trace One Shot Trace CI E Stop Trace 36 7 4 2 Executing the Program Execute the program with the Sysmac Studio 1 Select Watch Tab Page from the View Menu of the Sysmac 7 Connection Procedure View Insert Project Controller Simulatio Studio Output Tab Page Alt 3 Cross Reference Tab Page Alt 5 Build Tab Page Alt 6 The Watch1 Tab Page is displayed in the lower section of MANE WEA the Edit Pane Confirm that the variables shown Tae on the right are displayed in the Online value Modify Datatype 1 nt isplay format Name Cons ProgramoO Input_Start Start Input ud Programd Local_Status To add a variable click Input Busy Program Name Done execution status if E is displayed to the left of EN the variable instead of KA click 3 and open the configuration Program0 Output_PmrErroriDEx of the structure variable Program Output_PmrstaErrCode Program0 of the Name is Program0 Output_TransErrCode omitted from the following Program0 Output_RecvMessage descriptions Program0 Output_RecvData 0 249 Read the bar code shown on the Error codes Receive data after converted into a string Receive data storage area right as an example Position the Bar Code Reader so that it can read the bar code shown on the right 4 912345 678904 37 5 Click TRUE on the Modify Column of
33. Reader to the Serial Communications Unit Connect the personal computer to the Controller with a USB cable Controller Serial Communications Unit USB cable End Cover hn Power Supply Unit Special cable 7 Connection Procedure 7 3 2 Starting the Sysmac Studio and Importing the Project File Start the Sysmac Studio and import the project file Install the Sysmac Studio and USB driver in the personal computer beforehand 4 Confirm that the personal computer and the Controller are connected with the USB cable and turn ON the power supply to the Controller E7 Offline al New Project Start the Sysmac Studio Click the Import Button If a confirmation dialog for an access right is displayed at start select to start The Import File Dialog Box is E Import fle oom displayed Select es OMRON_V500 R2_PMCR232C ii el EV100 smc and click the Open PEEN a Button de Downloads E Recent Places HE Desktop Obtain the project file from OM RON i Al Libraries ES Documents a Music Pictures 3 The OMRON_V500 R2_PMCR232C _EV100 project is displayed The left pane is called Multiview Explorer the right pane is called Toolbox and the middle pane is called Edit Pane If an error message is displayed stating Failed to Load Descendants change the version of the Sysmac Studio to the version specified in 5 2 Device Configuration or higher version 7 Connection Procedure
34. Starting Tracing Start tracing with the CX Protocol 1 Select Operating Mode Run from the PLC Menu of the ii ri iai CX Protocol Disconnect from PLC Eal E E5 Ej Edit PC PLC Comms Settings Monitor Operating Mode t Y Program Run Edit Communications Port Settings The dialog box on the right is displayed Confirm that there is no problem and click the Yes Button This command will affect the state of the connected PLC Do you wish to continue CX Protocol No 35 Confirm that the operating mode was changed to the Run mode and double click NewPLC1 The tree under NewPLC 1 expands Select the Serial Communications Unit SCU O is selected in the right figure Select the Trace 2 Icon dis on the Project Window Confirm that Trace 2 is highlighted as shown in the right figure Trace 2 corresponds to port 2 of the Serial Communications Unit Select Start Trace One Shot Trace from the PLC Menu Confirm that the status of Trace 2 in the Project Window was changed to One shot Trace Running 7 Connection Procedure Gi New Protocol EEN Trace List 4 0 NewPL Run 5 333 New Protocol List J501 1500 jor race LIST Fm ssl je NJ501 1500 x Tools Window Help Disconnect from PLC Operating Mode b Edit PC PLC Comms Settings status Edit Communications Port Settings Not Tracing Upload Communications
35. al computer NJ501 1500 da Sysmac Studio CJ1W SCU42 installed i Wine Special cable RS 232C F OS Windows 7 OSNON es USB cable 5 VDC power supply OMRON Serial Communications Unit CJ1W SCU42 Ver 2 0 OMRON NJ series CPU Unit NJ501 1500 Ver 1 05 OMRON Power Supply Unit NJ PA3001 TT OMRON Ver 1 06 OMRON CX Protocol Included in Sysmac Ver 1 97 Studio R232C _ EV100 smc R_ EV100 psw Personal computer OS Windows7 l 00 TT keen A USB 2 0 type B connector OMRON Fixed Laser Type Barcode Reader___ V500 R2CF OMRON Special cable RS 232C V509 WOTT i 5 VDC power supply I P Precautions for Correct Use Prepare the latest project file and protocol macro data in advance To obtain the file contact your OMRON representative P Precautions for Correct Use Update the Sysmac Studio and CX Protocol to the versions specified in this section or higher versions using the auto update function If a version not specified in this section is used the procedures described in Section 7 and subsequent sections may not be applicable In that case use the equivalent procedures described in the Sysmac Studio Version 1 Operation Manual Cat No W504 and the CX Protocol Operation Manual Cat No W344 5 Applicable Devices and Device Configuration Additional Information It may not be possible to reproduce the same operation with different devices or versions Check th
36. ayed if no change was made 22 7 Connection Procedure 4 Select Communications Setup Controller Simulation Tools Help al EE Change Device Online Ctrl W 5 The Communications Setup h mme Dialog Box is displayed aa EKS Select the Direct connection via SEES USB Option for Connection o corr Select one method from these options at every online connection Ty pe H Direct connection via USB H Direct connection via Ethernet H Remote connection via USB H Ethernet connection via a hub Click the OK Button v Remote IP Address Select a method to connect with the Controller to use every time you go online USB Communications Test Ethernet Communications Test Y Options E Confirm the serial ID when going online ka Check forced refreshing when going offline Y Response Monitor Time Set the Response Monitor Time in the communications with the Controller E UL OK 6 Select Online from the indic Controller Menu FUE Communications Setup Change Device If the dialog on the right is Example of confirmation dialog box displayed the model or version Fsysmac Studio of the Controller does not match that of the project file Controller model not matched i Project NJ501 1300 Review the Controller model SRE version and device settings of the project file and then repeat Slopes a Hr asl oe i ae h d f t 1 i Check the controller to connect connection method in the com
37. ber and send data size change the code indicated by a red frame 2 Initialization processing Perform initialization for the whole communications and set the parameters Set the send data and initialize the receive data storage areas 10 2 1 Initializing the communications instruction ExecPMCR_instance Execute FALSE srcDat Input_SendData 0 DstDat Output_RecvData 0 4 2 Initializing the communications instruction execution flag Local_ExecFlg FALSE E 2 3 Initializing the error code storage areas Clear Qutput_PmreErrorlD Clear Output_PmrErrorlDEx Clear Output_PmrstaErrCode Clear Output_TransErrCode 2 4 Setting the ExecPMCR instruction control data Local InPort UnitNo eUnitNo CBU_No00 Local_InPort PhysicPortNo USINT 2 Local_SeqNo UINT 900 Input_SendData 0 WORD 0 2 5 Initializing the receive data storage areas Clear Output_RecvData Clear Local_RecvWordData Clear Local_RecvByteData Clear Output_RecviMessage 2 6 Initialization setting end processing Local_State 11 11 PMCR communications processing 94 9 Program 3 PMCR communications processing 3 PMCR communications processing Execute the communications processing from the specified serial port 11 3 1 Determining the communications processing status and setting the execution flag 3 1 1 Normal Error detection processing when protocol macro execution ends F
38. cattered radiation reflected by a mirror surface AN Laser beam emitted from a laser has high power density and may become blind when the beam is directed into eyes Do not disassemble this bar code reader Laser beam may be scattered around when it is disassembled eCaution display CAUTION Caution Use of controls or adjustments or performance of procedures other than those specifies herein may result in hazardous radiation exposure This Bar Code Reader uses a laser as the light source Lasers are classified on IEC standard IEC 60825 1 PS ES Labeling on Laser Use This Bar Code Reader has the following WARNING Label This Bar Code Reader is compliant with IEC 60825 and the U S FDA Food and Drug Administration laser regulations CLASS 2 LASER PRIDLACT IEC EN 409251 200F LASER RADIATII DO NOT STARE INTO BEAM Maximum ouhout Gen CESANTE ETZE FIA LAA Be JE C63502 2005 Complies wilh 21 CFR 1040 10 cana IIA aaceot for deviation uot ho Loser Hot Ho 50 dated June 24 2007 4 Overview 4 Overview This document describes the procedure for connecting OMRON Corporation s Fixed Laser Type Barcode Reader V500 R2 series hereinafter referred to as the Bar Code Reader with NJ series Machine Automation Controller hereinafter referred to as the Controller via serial communications and describes the procedure for checking their connection Refer to the serial communications settings of the
39. creen gt Command Send Wait Send Message Response Next Error OMRON_V500 R2_PMCR_EV100 E 00 RSET 001 Send amp Receive 3 SD RDCODE BY RDCODE End Abort 7532 New Protocol List GI New Protocol Rie New Sequence T cend Messane ist lt Settings gt 00 End Abort lt Process list gt Process Description End Ends the communications sequence Next Moves to the next step No Abort Interrupts the step and ends the communications sequence Goto Moves to the specified step number Matrix Uses the settings of the matrix 61 9 Program 9 6 5 Send Message Settings This section explains the settings of the send message Additional Information Refer to 3 4 Communication Message Attributes of the CX Protocol Operation Manual Cat No W344 for details on send message settings lt Send message setting screen gt saad Header lt gt Terminator lt gt check code lt gt Length lt gt a ESE ER OMRON_V500 R2_PMCR_EV100 332 New Protocol List Gil New Protocol New Sequence Dennis Adnan 1 eSettings of SD RDCODE send message lt Settings gt lt h gt Z lt t gt 1 2 3 W lt h gt Header Type Code Data ESC a Constant ASCI 3 lt t gt Terminator Type Code Data CR The footer for the destination device is the terminator for the protocol macro data Hereinafter the term terminator is used lt Send message command format gt This is the command
40. d no p ro bl e m and cl ick th e Yes TE Seg mode will be changed to PROGRAM mode Then EtherCAT slaves will be reset and forced refreshing will B u tto n Do you want to continue Y N A screen stating Synchronizing oe IS displayed 21 A confirmation dialog boxis o displayed Confirm that there is i no problem and click the No Button The operating mode will be changed to RUN mode Do you want to continue N Confirm that there is no problem if the controller operation is started Click the No Button to operate in PROGRAM mode in the following steps A 12 Confirm that the synchronized data is displayed with the color a Cunpui pate DaController Update Da Controller Data Name Compare 19 6 2013 15 38 57 specified by Synchronized and that a message is displayed stating The synchronization process successfully finished lf there is no problem click the Close Button Legend Synchronized M Clear the present values of variables with Retain attribute Valid for Transfer to Controller A messa e stati n The MH Do not transfer the program source Valid for Transfer to Controller All data will be re transferred when this option is changed g g Do not transfer the following All items are not transferred CJ senes Special Unit parameters and Ethe slave backu rameters CJ series Special Unit p d EtherCAT slave backup pa syn ch ro n Zat O n process Te
41. d Only Read Only None FT Read Only Timer Clock IY Installed Make Default 30 5 10 Confirm that the Network Type is set to USB on the Change PLC Dialog Box and click the OK Button If the Network Type is not set to USB select USB from the pull down list Select Connect to PLC from the PLC Menu The PLC icon on the project workspace changes from Offline to Program It means that the Controller is connected online If Run is displayed change it to Program by following steps 8 and 9 If the operating mode of the Controller is Run select Operating Mode Program from the PLC Menu The dialog box on the right is displayed Confirm that there is no problem and click the Yes Button Confirm that the operating mode was changed to Program mode as shown in step 7 Double click the New Protocol List on the project workspace to display a tree 7 Connection Procedure Change PLC INewP Le Device Type NJ501 Settings Network Type Device Name Settings Connect to PLC Operating Mode H wa Mew Protocol List 4D NewPL PLC Tools Window Help Disconnect from PLE Operating Mode Program Edit PC PLC Commis Settings Monitor Y Run Edit Communications Port Settings This command will affect the state of the connected PLC
42. e 15 The dialog box on the right is CX Protocol displayed Confirm that there is no problem and click the OK Button 16 Check that 100 is displayed in the Downloaded Column in the right figure and click the Close Button Protocol password protection Password Confirm I Include Source Information Download Stop DL Compiled Compile S SCU 0 100 Stop E ompiler Target Downloaded PEC Tonk Wim t 17 Select New Protocol List and select Compare Protocols from the Protocol Menu Alel 4 File Edit View Protocol Create Upload Protocol List 4 OMBON Y El UERN Upload Protocols ieee New Pr EE Gi Ne Download Protocols bx Trace Compare Protocols 18 The dialog box on the right is displayed Select the Include Source Information Check Box Protocol password protection and click the Compile Button A PT Password Er PL da 33 19 20 21 When 100 is displayed in the Complied Column the compiling operation is completed Confirming that the compiling operation is completed and click the Compare Button The dialog box on the right is displayed Confirm that Successful is displayed in the Result Column and click the OK Button Confirm that 100 is displayed in the Compared Column in the right figure and click the Close Button 7 Connection Procedur
43. e Protocol password protection Password iv Include Source Information Target 3 scu 0 Successful Protocol password protection Password Contin 4 Include Source Information Compile E Compiled Compared 100 34 7 Connection Procedure 7 4 Checking the Serial Communications Execute the program and confirm that serial communications are normally performed WARNING Avoid eye exposure to direct or scattered radiation reflected by a mirror surface Laser beam emitted from a laser has high power density and may become blind when the beam is directed into eyes A Caution Sufficiently confirm safety before you change the values of variables on a Watch Tab Page when the Sysmac Studio is online with the CPU Unit Incorrect operation may cause the devices that are connected to Output Units to operate regardless of the operating mode of the Controller la Precautions for Correct Use This document explains the procedures for setting up the Bar Code Reader from the factory default setting If the Bar Code Reader was changed from the factory default setting make sure to initialize by referring to Section 8 2 Initializing the Bar Code Reader P Precautions for Correct Use Confirm that the serial cable is connected before proceeding to the following procedure If it is not connected turn OFF the power supply to each device and then connect the serial cable 7 4 1
44. e configuration model and version If they are different from your configuration contact your OMRON representative Additional Information For information on the special cable V509 W011 refer to Cable for programmable controller connection made by OMRON V509 W011 in External Dimension in Section 6 Appendix of the V500 R2 Series Fixed Laser Type Barcode Reader V500 R2 Series User s Manual Cat No Z334 Additional Information The system configuration in this document uses USB for the connection to the Controller For information on how to install a USB driver refer to A 1 Driver Installation for Direct USB Cable Connection of the Sysmac Studio Version 1 Operation Manual Cat No W504 6 Serial Communications Settings 6 Serial Communications Settings This section describes the specifications such as communication parameters and wiring that are set in this document EN Additional Information To perform communications without using the settings described in this section you need to modify the program For information on the program refer to Section 9 Program i 6 1 Serial Communications Settings The serial communications settings are shown below Setting item Serial Communications Unit Bar Code Reader Device name J01 Communications Port 2 RS 232C connection port Serial communications mode Protocol macro Default Not limited Default Not limited Default CS waiting time ACK NAK waiting time
45. efer to Sequence Input Instructions F_TRIG in Section 2 Instruction Descriptions of the NJ series Instructions Reference Manual Cat No W502 50 9 Program elnternal variables Variable name Data type Explanation Communications processing status flags Datatype Local_Status This variable is defined as sStatus structure Local State Status processing number Local ExecFlgs Communications instruction execution flag Local EndExecPMCR Protocol macro execution end detection flag Local_InPort Used port Local SeqNo Communications sequence number Local PmrStaCode Protocol macro error code edit area lesa Be NS ODS An area that extracts and stores the data to be converted OF WORD into a string from the receive data 498 bytes Local_RecvWordSize A size of data to be converted into a string unit WORD Vocal ResvBnieData An area that stores data in a byte array which will be ER OF BYTE converted into a string 498 bytes Local_RecvByteSize A size of data to be converted into a string unit BYTE 51 9 Program j 9 5 ST Program 9 5 1 Functional Components of the Program This program is written in the ST language The functional components are as follows Major A E Minor classification classification 1 Communications 1 1 Starting the communications processing processing Clearing the communications processing status flags Entering in the communications in progress status and shifting to each state p
46. eration Do you wish to continue A screen is displayed indicating the conversion is being performed Cancel Confirm that 0 Errors and 0 Warnings are displayed in the 3 Build Tab Page ae Maccriycion Program Location 21 7 Connection Procedure 7 3 4 Connecting Online and Transferring the Project Data Connect online with the Sysmac Studio and transfer the project data to the Controller Always confirm safety at the destination node before you transfer a user program configuration data setup data device variables or values in memory used for CJ series Units from the Sysmac Studio The devices or machines may perform unexpected operation regardless of the operating mode of the CPU Unit Caution Always confirm safety before you reset the Controller or any components Select Change Device from the Controller Simulation Tools E 1 Controller Menu re am Communications Setup Online Ctri W The Change Device Dialog Box is displayed Confirm that the Device and Version are set as shown on the aR Select Device right and click the OK Button Category Controller If the settings are not correct select the setting items from the Device NJ501 8 1500 pull down list Mah 3 05 3 If the settings were changed in step 2 the Build Dialog Box is displayed Check the contents and click the Yes Button j Ff m Do you want to execute the build This dialog box is not displ
47. eter is required for the command DstDat array Receive data array WORD ee Setting Is SeqNo SrcDat array Send data array WORD 47 9 Program 9 3 Error Detection Processing This program detects and handles the errors 1 to 3 below For information on error codes refer to 9 8 Error Process Controller Destination device Serial cable 112 3 1 Errors when executing the ExecPMCR instruction ExecPMCR instruction error Errors occurred during an execution of the ExecPMCR instruction such as a unit error and communications error are detected as ExecPMCR instruction errors An error is detected with the error code ErrorlD and the expansion error code ErrorlIDEx of the ExecPMCR instruction 2 Errors at an execution of the protocol macro protocol macro error When an operation ends in an error during an execution of a protocol macro for some reason it is detected as a protocol macro error An error is detected with the Sequence Abort Completion Flag J01 P2 PmrSeqAbtsta 3 Errors in the destination device Destination device errors Destination device errors include a command error a parameter error data error and an execution failure in the destination device An error is detected with the response data which is returned from the destination device With this program the destination device does not send a response when an error occurs Therefore this error is detected as a timeout e
48. example of an ST structured text program and protocol macro data in which the Controller sends receives the message to from the Bar Code Reader The Controller and the Bar Code Reader send and receive the message of Reading Trigger sequence No 900 The following figure outlines the sequence operation eQverview of sequence operation 1 The ST program executes the protocol macro instruction ExecPMCR instruction for which sequence No 900 of protocol macro data is specified 2 The Reading Trigger command sequence No 900 is selected from the protocol macro data and it is sent to the Bar Code Reader 3 The Bar Code Reader executes the command according to the send data from the Controller 4 The Controller receives the result of the command executed by the Bar Code Reader and then stores in the specified variable Controller CPU Unit Serial Communications Unit Project file RS 232C Bar Code Reader ST Program Protocol macro 1 Executing the protocol macro instruction Specifying sequence No 900 2 Reading Trigger Sequence No 900 Send data 3 Executing the command Receive data Output_RecvData Receive data 4 Receiving the storage area execution result of the command and storing it in the specified variable 7 Connection Procedure 7 Connection Procedure This section describes the procedure for connecting the Bar Code Reader to the Controller
49. f the Bar Code Reader refer to Factory default setting in Return to the factory default setting in Menu Sheet Command List in Section 4 Setting Method of the V500 R2 Series Fixed Laser Type Barcode Reader V500 R2 Series User s Manual Cat No 2334 7 Connection Procedure j 7 3 Setting Up the Controller Set up the Controller 7 3 1 Hardware Settings Set the hardware switches on the Serial Communications Unit P Precautions for Correct Use Make sure that the power supply is OFF when you perform the setting up 1 Make sure that the power supply cjiw scu42 to the Controller is OFF i UN RC SDi RDi TERI If the power supply is turned See 8 Indicators RDY ERH SD2 RD2 y ON settings may not be applicable as described in the following procedure Terminating resistance switch Unit number switch 2 wire 4 wire switch Check the hardware switches located on the front panel of the Serial Communications Unit by referring to the right figure Port 1 RS 422A 485 terminal block connector Check the connector for Port 2 RS 232C by referring to the right figure Port 2 RS 232C This setting is required to use Port 2 of the Serial Communications Unit D Set the Unit No Switch to 0 The unit number is set to 0 as the factory default setting 3 Connect the Serial Communications Unit to the Personal Controller as shown on the right Connect the special cable for the Bar Code
50. gram according to your application needs O 5 Applicable Devices and Device Configuration Applicable Devices and Device Configuration i 5 1 Applicable Devices The applicable devices are as follows Manufacturer Model OMRON Nu series CPU Unit eee OMRON Serial Communications Unit CJ1W SCU 2 OMRON Fixed Laser Type Barcode Reader V500 R2CF P Precautions for Correct Use As applicable devices above the devices with the models and versions listed in Section 5 2 are actually used in this document to describe the procedure for connecting devices and checking the connection You cannot use devices with versions lower than the versions listed in Section 5 2 To use the above devices with versions not listed in Section 5 2 or versions higher than those listed in Section 5 2 check the differences in the specifications by referring to the manuals before operating the devices Additional Information This document describes the procedure to establish the network connection Except for the connection procedure it does not provide information on operation installation or wiring method lt also does not describe the functionality or operation of the devices Refer to the manuals or contact your OMRON representative 5 Applicable Devices and Device Configuration 5 2 Device Configuration The hardware components to reproduce the connection procedure of this document are as s mm ee ee ee follows Person
51. gs Start Trace Stop Trace Upload Trace _CX Protocol A Communications Trace is in progress on this port FP Do you wish to stop the Trace and proceed to upload the buffer 3 Check the send receive A message on the trace data file 0 shown in the right figure mekse 2 2 2 2 2 222222222222 la A Fa i HEX 1B 5A OD In the example on the right the Reading Trigger command is lt lt AAA sent from the Controller and the RTS bar code data that are shown in se step 4 of Section 7 4 2 are val received Comm Error mSend message Hex 1B 5A 0D String ESC Z CR mReceive message Hex 34 39 31 32 33 34 35 36 37 38 39 30 34 0D String 4912345678904 CR 39 7 Connection Procedure 7 4 4 Checking the Receive Data Confirm that the correct data are written to the variables of the Controller by using the Sysmac Studio 4 Confirm that the online value of Normal end Local _Status Done which Online value Modify indicates the program execution Program0 Input_Start FALSE status was changed to True Y Busy TRUE FALSE This means the program ended RE TRUE FALSI normally Error TRUE FALSE In the case of an error end Local_Status Error changes to True Troubleshoot the error by referring to step 2 EE Online value Modify Program0O Input_Start FALSE Busy TRUE FALSE Done TRUE FALSE Error TRUE FALSE If the program ended normally Normal end confirm that each error code is 0
52. ion 5 Online Connections to a Controller of the Sysmac Studio Version 1 Operation Manual Cat No W504 8 When an online connection is established a yellow bar is displayed on the top of the Edit Pane 9 Select Synchronization from the Controller Menu 4 Configurations and Setup Offline Ctri Shitt 44 24 7 Connection Procedure 10 The Synchronization Dialog Box iz iS d isplayed E Computer Data Name Computer Update DaController Update Dd Controller Data Name Compare Confirm that the data to transfer NJ501 in the right dialog is selected Then click the Transfer To Controller Button After executing the Transfer to Legend Synchronized Co ntro e r th e Sys m ac St u d O MH Clear the present values of variables with Retain attribute Valid for Transfer to Controller H Do not transfer the program source Valid for Transfer to Controller All data will be re transferred when this option is changed project d ata IS tran sfe rred to the E Do not transfer the following All items are not transferred CJ series Special Unit parameters and EtherCAT slave backup parameters Co ntrol ler and th e d ala are Slave Terminal Unit operation settings and NX Unit application data Transfer To Controller um Close 11 A confirmation dialog box is Sysmac Studio d Sp ayed Co nfi FM th at the re IS Confirm that there is no problem if the controller operation is stoppe
53. ission of OMRON Corporation 5 The information contained in this document is current as of August 2013 It is subject to change without notice for improvement 3 Remarks The following notation is used in this document Indicates a potentially hazardous situation which if not avoided WARNING will result in minor or moderate injury or may result in serious injury or death Additionally there may be significant property damage A C ti Indicates a potentially hazardous situation which if not avoided caution may result in minor or moderate injury or in property damage Precautions for Safe Use Precautions on what to do and what not to do to ensure safe usage of the product P Precautions for Correct Use Precautions on what to do and what not to do to ensure proper operation and performance Additional Information Additional information to read as required This information is provided to increase understanding or make operation easier Symbol AN A Indicates the possibility of laser radiation Indicates prohibition when there is a risk of minor injury from electrical shock or other source if the product is disassembled The filled circle symbol ndicales operabons that you must do The speci e operabon is shown im the cicis and explamed in text This example shows a general precaution for something that you must do 3 Remarks eWarning display Avoid eye exposure to direct or s
54. lp 2 Parameter value Unit Defaults Host Link default 7 bits 2 bits Even Default 9600bps Default 0 ms No x 1 N protocol v Default Mode A v Return to default Transfer to Controller Transfer from Controller Compare Cancel 27 7 Connection Procedure 6 A confirmation dialog box is displayed Check the contents and click the Yes Button Do you want to execute the transfer to the Controller hea ace ens RER indicating transferring is being You need to restart the Unit to make the transferred settings valid Do you want to restart the Unit performed and a confirmation dialog box is displayed Check I Yes No the contents and click the Yes Button 7 The Port Selection Dialog Box is p a displayed Ei P ection h em Select Al ports and click the OK Select the ports to restart from the following list Suton Hostlimk1 HostLink2 Cancel 8 A confirmation dialog box is displayed Check the contents and click the OK Button 9 Select Port2 Protocol macro A Configurations and Setup Settings from the pull down list ee lt arameter group to show Protocol macro Settings h of Parameter group to show ne Parameter name Parameter value Unit Cl ick th e Com pa re B utto n 5 ah Eur Re mode Port2 Data length 8 bits Port2 Stop bits 1 bit Port2 Parity None Port2 Baud rate Default 9600bps Port2 Serial
55. munications settings the procedure trom step I IN Is the controller model set in the project matched with the target controller model this section Close the dialog box by clicking the OK Button The model and version displayed on the confirmation dialog box differ depending on the Controller used and the device setting of the project file A e Wersion of the connected Controller 1 01 The device version set in the project is newer than the version of the connected Controller Check the device version set in the project 23 7 Connection Procedure 7 A confirmation dialog box is displayed as shown on the right Check the contents and click the Se SOR Yes Button i Do you want to write the project name new Controller 0 to the CPU Unit name Y N The displayed dialog depends on the status of the Controller used Check the contents and Serial ID not matched click the Yes Button to proceed mete with the processing Name new _Controller_0 Senal ID R01 07x11 0552 The displayed serial ID differs e Controller depending on the device Name new_Controller_0 Senal ID RO1 07 11 0554 Do you want to continue the connection processing WN Do you want to change the Serial ID in the project to the controller s Serial ID N it will be used at the ID check of next online connection EN Additional Information For details on online connections to a Controller refer to Sect
56. n the DstDat receive data array and the receive message Destination device Communications Unit Receive message No of words of receive data Bit Communications Unit CPU Receive data array DstDat 46 9 Program j 9 2 Communications sequence This section explains the communications sequence protocol macro data that can be used for the ExecPMCR instruction of this program 9 2 1 Communications sequence No A communications sequence protocol macro data that is registered in the Serial Communications Unit is identified by a communications sequence number The Controller executes the corresponding command on the destination device by specifying a communications sequence number in the ExecPMCR instruction This protocol macro data includes the following communications sequence 900 Reading Trigger Issues the reading trigger for a bar code 9 2 2 ExecPMCR instruction input variables The ExecPMCR instruction input variables for communication sequence No 900 Reading Trigger are set as follows Variable Name data format Data Description Destination port specification Por sPROT i _eUnitNo CBU No00 UnitNo Unit number _eUnitNo Specifies the unit number for the serial Communications Unit PhysicPortNo Serial port number USINT os No 2 Communications sequence UINT 10 900 number UINT Specifies Reading Trigger WORD 16 0000 The number of words of send data is 0 Specifies that no param
57. put_RecvMessage Output_RecvData 5 3738 4912345678904 Output_RecvData 6 3930 Output_RecvData 7 3400 40 8 Initialization Method Initialization Method This document explains the setting procedure from the factory default setting Some settings may not be applicable as described in this document unless you use the devices with the factory default setting 8 1 Initializing the Controller To initialize the Controller it is necessary to initialize the Serial Communications Unit and the CPU Unit Place in PROGRAM Mode before the initialization 8 1 1 Serial Communications Unit To initialize the settings of the Serial Communications Unit select Edit Special Unit Settings of CJ1W SCU42 in CPU Expansion Racks from the Sysmac Studio Item name Value Device name J01 Model name CJ1W SCUA42 Product name Serial Communication Unit Version 2 0 Specifications RS 232C x 1 RS 422 485 x 1 Rack No 0 Slot No Unit No 0 Settings ee ES Edit Special Unit Settings Click the Return to default Button and click the Apply Button Then click the Transfer to Controller Button Parameter group to show All Parameters Parameter name Parameter value Portl Port settings Defaults Portl Senal communications mode Host Link default Portl Data length bits Portl Stop brts 2 bits Portl Panty Even Portl Baud rate Default 9600bps Portl Send delav Default 0 ms Return to default Help
58. rminal Unit operation settings and NX she application data x 3 mi The Synchronization process successfully finished successfully finished is displayed if the Sysmac Studio Recompare project data if the data in the Controller match If the synchronization fails check the wiring and repeat the procedure in this section 25 13 14 15 Select Reset Controller from the Controller Menu When Mode is set to RUN Mode Reset Controller cannot be selected In this case select Mode PROGRAM Mode from the Controller Menu to change to PROGRAM mode and perform the procedure in this step A confirmation dialog box is displayed several times Check the contents and click the Yes Button The Controller is reset and the Sysmac Studio goes offline Then the yellow bar on the top of the Edit Pane disappears Go online again by following steps 6 to 8 7 Connection Procedure Offline Ctri Shitt W synchronization Ctri M Mode i Stop Monitoring set Reset Forced Refreshing MC Test Run b MC Monitor Table SD Memory Card Controller Clock Release Access Right Update CPU Unit Name security b Clear All Memory This operation resets the Controller Make sure resetting will cause no problems for load outputs and access to SD Memory Card It goes offline after resetting Go online again after starting up the Controller Do you want to reset Y N Are you sure you wish to reset
59. rocessing 2 Initialization 1 Initializing the communications processing instruction Initializing the communications instruction execution flag Initializing the error code storage areas Setting the input variable of the ExecPMCR instruction Initializing the receive data storage areas Initialization setting end processing 3 PMCR 1 Determining the communications communications processing status and setting the processing execution flag Executing the communications instruction 4 Processing number error process Description The communications processing starts The parameter setting of the communications instruction ExecPMCR instruction and the receive data storage areas are cleared The ExecPMCR instruction is executed A normal end or an error end of the execution is detected The error processing is executed when a non existent status processing number is detected 92 9 Program 9 5 2 Program List The program is shown below eProgram Program0 General purpose serial communications connection check program 1 Communications processing Name NJ senes general purpose serial R5 232C communications connection check program Protocol macro Applicable device Manufacturer OMRON Corporation Device Fixed Laser Type Barcode Reader Senes Model V500 R2 Series Serial Unit CJIW 5CU42 Protocol macro Unit number 0 Serial port number 2 Version information V1 00 Feburary 6 4013
60. rror described in 2 The causes of errors 1 and 2 may be related to each other Therefore all of the following error codes are stored when either error occurs eError code of ExecPMCR instruction ErrorlD eExpansion error code of ExecPMCR instruction ErrorlDEx Protocol macro error code lower four bits of J01_P2_PmrSta Transmission error status J01_P2_TransErrSta 48 9 Program j 9 4 Variables The variables used in this program are listed below 9 4 1 List of user defined variables The following tables list the data type external variables user defined global variables device variable for CJ series Unit system defined variable and internal variables that are used in this program e Data type Structure Communications processing status flags Name Data type Explanation sStatus STRUCT Structure of communications processing status flags Communications processing in progress flag Busy BOOL TRUE Processing is in progress FALSE Processing is not in progress Communications processing normal end flag Bone BOOL TRUE Normal end FALSE Other than normal end Communications processing error end flag emor BOOL TRUE Error end FALSE Other than error end e External Variables User defined global variables Variable name Data type Explanation Communication start switch Input_Start BOOL The program starts when this flag changes from FALSE to TRUE ARRAY 0 249 OF WORD ARRAY 0 249 Receive
61. s Unit issues the serial communications command to the destination device until when the Controller receives the response data from the destination device Executing the The CPU Unit executes the protocol macro instruction communications sequence Instruction ExecrPMCR with the sequence number specified in the program and loads the communications sequence protocol macro data registered in the Serial Communications Unit Sending a command The Serial Communications Unit issues the send message command data to the destination device based on the sequence number specified in step 1 Response receive The Serial Communications Unit receives the message processing response data from the destination device and stores it in the specified internal memory of the CPU Unit 44 9 Program 9 1 2 Function Block for Executing Protocol Macro and Send Receive Messages This section describes the function block for executing the protocol macro hereinafter referred to as ExecPMCR instruction and outlines the general operation of the send receive messages EN Additional Information Refer to Serial Communications Instructions ExecPMCR in 2 Instruction Descriptions of the NJ series Instructions Reference Manual Cat No W502 for details eExecPMCR instruction This program uses the following standard instruction to perform serial communications Name Function block Explanation Bredt macro ExecPMCR Requests execution
62. t to the external general purpose device A communication frame response sent from the external general purpose device A receive message is read from the step in the sequence and is compared with data received from the general purpose external device A matrix is used when a general purpose external device sends multiple types of communications frames responses More than one communication frame can be registered in one matrix A unit to register multiple communication frames response to a matrix One communication frame is registered as one case Up to 15 types of cases can be registered per matrix This attribute allows the user to specify an address assigned to a variable An I O port or an address in memory used for CJ series Units can be specified 3 Remarks 3 Remarks 1 Understand the specifications of devices which are used in the system Allow some margin for ratings and performance Provide safety measures such as installing safety circuit in order to ensure safety and minimize risks of abnormal occurrence 2 To ensure system safety always read and heed the information provided in all Safety Precautions Precautions for Safe Use and Precaution for Correct Use of manuals for each device used in the system 3 The user is encouraged to confirm the standards and regulations that the system must conform to 4 It is prohibited to copy to reproduce and to distribute a part or the whole of this document without the perm
63. tination device according to the settings of RV_RDCODE Read bar code value Command Number of bytes Remarks Data Variable length Variable Read bar code value Terminator Fixed lt CR gt 16 0D 63 9 Program j 9 7 Timing Charts The timing charts of the program are shown below The definitions of the timing chart patterns are as follows Error end 1 Error end 2 Pattern Normal end ExecPMCR instruction Protocol macro error error Command Normal Error Error Destination i Normal Normal or error Normal or error device Response None None eNormal end Input Start iS gt Local_Status Busy Output_RecvData XNormal respons X Normal response Local Status Done gt Output for 1 period Local Status Error Output_PmrErrorlD 160000 Output_PmrErrorlIDEx 16 00000000 Output_PmrStaErrCode 16 0000 Output_TransErrorCode 16 0000 eError end 1 2 Input Start Local Status Busy Output_RecvData Local Status Done Local_Status Error t 6864 DO y gt Output for 1 period gt gt Toor Output PmrErrorlD 16 0000 ppp NO amp 164 Output PmrErrorIDEx 16 00000000 ce 16400000 X ppp Output _PmrStaErrCode 16 00 mr X 164 16 jap Output_TransErrorCode 16 0000 If Input Start changes from TRUE to FALSE during an execution Busy TRUE a normal end or an error end is output for one period after the processing is completed Busy FALSE 64 9 Program
64. umber of times 0 to 9 times when an error occurs If an error occurs after retries the step moves to the error process The retry count is enabled for the Send amp Receive command only lt Step setting screen gt 131 step Repeat Command Retry send wai send Message Recv Message Response nert error OMRON_V500 R2_PMCR_EV100 9 00 RSET O01 Send amp Receive 3 s SD RDCODE RV_RDCODE YES End Abort 38 New Protocol List f New Protocol i TE cend Messane ist lt Settings gt Step No Retry count 00 3 eSend Receive message massage name settings This section describes the settings for the send receive messages of the step Here a registered send message name and message name are selected lt Step setting screen gt 121 step Repeat Commana Rey sena waf send Message Recv Message Response ne error OMRON V500 R2 PMCR_EV100 co 00 RSET 001 Send 4 Receive 3 5D_RDCODE RY RDCODE YES End Abort ane New Protocol List Gi New Protocol Rie New Sequence T cend Messane ist lt Settings gt Step No Receive message 00 SD_RDCODE RV_RDCODE 60 9 Program eNext process and error process settings This section describes the settings for the next process and error process of the step The process set in the Next Column is executed when the step execution ends normally If a communications error occurs the process set in the Error Column is executed lt Step setting s
65. vice Variable for CJ series Unit in the CJ series Serial Communications Units Operation Manual for NJ series CPU Unit Cat No W494 System defined variable Variable name Data type Explanation Communications Port Enabled Flag _Port_isAvailable BOOL TRUE A port is available FALSE A port is not available Additional Information For information on the system defined variables when the ExecPMCR instruction is used refer to Related System defined Variables in Serial Communications Instructions ExecPMCR in Section 2 Instruction Descriptions of the NJ series Instructions Reference Manual Cat No W502 elnternal variables Instance variables The following tables list the internal variables used to execute the function blocks in the program An internal variable is called an instance The name of the function block to use is specified as the data type of the variable Variable name Data type Explanation Requests execution of a communications sequence EXEC MCR instance EXE PMGR protocol data registered in a Serial Communications Unit F TRIG instance F TRIG Outputs TRUE for one task period only when the input signal changes to FALSE Additional Information For information on the ExecPMCR instruction refer to Serial Communications Instructions ExecPMCR in Section 2 Instruction Descriptions of the NJ series Instructions Reference Manual Cat No W502 Additional Information For information on the F_TRIG instruction r
Download Pdf Manuals
Related Search
Related Contents
Operators Manual - Marmon POWER LITE PUMP TOILET WITH TWIN-TOUCH FLUSH MobIR®M4 - Oropeza Ingenieros ARDF DF3010/DF3070 Machine Code: B802/D630 Field Service “'0 Installation manual Model: SCODA Roomster Skid plate for 78-BP-QS Rev A.fm Untitled - Lemon Mobiles Copyright © All rights reserved.
Failed to retrieve file