Home
V400-R2 Series NJ-Series
Contents
1. Send Message List i wea RA oie eSetting of receive message RV RDCODE Settings W 1 lt t gt 1 2 Z e Code Description 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 RecvData 1 2 t Terminator Message data Constant hex Type Code Data CR The header h is set to None Response format of receive message This is the response format of the receive message which is received by the Serial Communications Unit from the destination device according to the settings of RV RDCODE Head code value Command Remarks bytes Data Variable Variable Read code value length Terminator Fixed CR 16 0D 62 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 4 Local Status Busy Output RecvData XNormal response X Normal response Local Status Done i Output for 1 period Local Status Error Output PmrErrorlD 16440000 Output PmrErroriDEx 16 00000000
2. 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 SOMOS CDU y pi Output for 1 period P gt gt EE Output PmrErrorlD 16 0000 19i M 1g Output PmrErrorlDEx 16500000000 tore 68000000 16 Output PmrStaErrCode 16 0000 1g vim X 1g 16g 16g Output TransErrorCode 1640000 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 63 9 Program I 9 8 Error processing 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 ExecPMCH instance ErrorlD 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 163220800 An error occurred when a FINS command was sent or received 16220801 The FINS port is being used Additional Information For
3. A confirmation dialog box is Sysmac Studio displayed several times Check the contents and click the Yes B utto n Go online again after starting up the Controller This operation resets the Controller Make sure resetting will cause no problems for load outputs and access to SD Memory Card Do you want to reset Y N Are you sure you wish to reset Y N 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 Configurations and Setup 25 7 3 5 Transferring the Unit Settings T Connection Procedure Transfer the setting data of the Serial Communication Unit 1 Select Mode PROGRAM Mode from the Controller Menu Offline Synchronization 2 A confirmation dialog box is displayed Confirm that there is no problem and click the Yes Sysn mac Studi Ctri Shift W Ctrl M Button Make sure a Controller stop will cause no problem Do you want to change to PROGRAM Mode Y N 3 PROGRAM mode is displayed Controller Status on the Controller Status Pane gt ONLINE ERR ALM 4 Double click CPU Expansion Racks under Configurations new Controller 0 Li i and Setup in the Multiview cin NET Model name a TF Explore r a oF rae Rais dl hair uide Communication Uri Select the Serial Aem PN Specifications RS 232 x1 RS 422 485 x 1
4. After confirming that the compiling operation is completed click the Download Button f New Protocol GI New Protocol rotocattame sr sequence Ena sequence Type Je Ter S T Connection Procedure USER File Edit View PLC Tools Window E JE E A OMRON V E 38 New Pr Gi Ne nu EE Maul Protocol Compile Download Create Upload Protocol List Upload Protocols Download Protocols Compare Protocols Ol Protocol password protection Password Confirm v Include Source Information iE ID poe T E COMPE Target Compiled Downloaded scu 0 000 000 Protocol password protection Password Confirm v Include Source Information Stop Compiler Download SCU 0 31 7 Connection Procedure 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 10096 is displayed in the Downloaded Column in the right figure and click the Close Button Protocol password protection Password Confirm v Include Source Information Download Stop DL Compiled 5i Compile S SCU 0 100 Stop E ompiler Target Downloaded Pie Fonkc Window t 17 Select New Protocol List and s
5. 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 42 9 Program 9 1 1 Communications Data Flow The following figure shows the data flow from when the Controller Serial Communications Unit issues command data via serial communications to the destination device until when it receives the response data from the destination device Executing the communications sequence Sending a command i Response receive processing The CPU Unit executes the protocol macro instruction Instruction ExecPMCR with the sequence number specified in the program and loads the communications sequence protocol macro data registered in the Serial Communications Unit The Serial Communications Unit issues the send message command data to the destination device based on the sequence number specified in step 1 The Serial Communications Unit receives the message response data from the destination device and stores itin the specified internal memory of the CPU Unit 43 9 Program 9 1 2 Function Block for Executing Protocol Macro and Send Receive Messages This section describes
6. Program 9 6 3 Sequence Settings This protocol macro data performs Reading Trigger read 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 imeout 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 Response Timer Tr Timer Tfs ce 900 New Sequence OMRON V500 R2 PMCR_EV100 Set Hr New Protocol List 0 al Mos Er iras lt Settings gt Item Description Explanation Monitors the time from the receive wait status to the reception Timer Receive wait i Tr monitoring time of the first data header in the step of the sequence This timer is set to 3 seconds in this protocol macro data Receive Monitors the time from the reception of the first data to the Timer ae un finished completion of the reception in the step of the sequence Tfr arene ut b monitoring time This timer is set to 3 seconds in this protocol macro data Finer Send iiniched Monitors the time from the sending of the header to the sending Tfs monitoring time S the last data This timer is set to 3 seconds in this protocol macro data Addition
7. um Communications Setup Change Device Example of confirmation dialog box T If the dialog on the right is displayed the model or version of the Controller does not Controller model not matched 1 i Project NJ501 1300 match that of the project file Hair ve bager Review the Controller model version and device settings of EE estt du a2 Check the controller to connect connection methad in the communications settings the project fi le and then repeat Is the controller model set in the project matched with the target controller model the procedure from step 1 in 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 version set in the project 1 05 Version of the connected Controller 1 01 device setting of the project file The device version set in the project is newer than the version of the connected Controller Check the device version set in the project 22 T Connection Procedure 7 A confirmation dialog box is displayed as shown on the right Check the contents and click the n MI Yes Button 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 Du wit
8. 8 bits bits Port2 Stop bits 1 bit 1 bit Port2 Parity Port2 Baud rate Parameter name one efault 9600 lt ee Full duplex v Port2 Clearing holding the contents of the reception buffer in fullduplex mode Clear M Clear Port2 Link word specification data exchange timing On request I O refreshing v n request I Port2 Maximum number of bytes in protocol macro send receive data C None Default 9600bps Port2 Serial Gateway Response timeout monitoring time Port2 Serial Gateway send start timeout monitoring time Port2 Protocol macro Transmission method F all duplex compare results Unit 27 7T Connection Procedure 7 3 6 Starting the CX Protocol and Opening the Protocol Macro Data otart the CX Protocol and open the protocol macro data 1 Start the CX Protocol CX Protocol Select Open from the File Menu XX tocol Syst m D File View Help New Ctrl N i pen CtleO stoc Print Setup D 3 On the Open Dialog Box select OMRON V400 R2 PMCR_EV1 E gt 00 psw and click the Open okin E TSUNA e rr Fr Button Obtain the protocol macro data from OMRON 4 The project workspace and the MESS WRORCRRERE PACK EVI Project Window display the fi a Ven tt Ri Toe vinden Hep protocol macro data that was read 28 T Connection Procedure 7 3 7 Connecting Online and Transferring the Protocol Macro Data Connect online with the CX Protocol and tran
9. CJ1W SCU42 gt Applicable connector D sub 9 pin bm Abbreviation Smanme i Shed agag il amp 20d i u A see pesen mu 8 e magoa Had FG sed lt V400 R2CF65 gt Applicable connector DIN 8 pin Pin No Signal name Function so Transmission data GI Recelved data 1 p SR Pin alignment I l SN TAE i Wi c Bl Y I 5 l Fr I 6 NC Not connected Connector part DIN 8P plug Made by Hosiden Corporation i Ls we p 9 99 00 10 6 Serial Communications Settings mCable Pin assignment CJ1W SCU42 Serial Ultra Small Multi code Reader V400 R2CF65 Communications Unit name Fa ERE CE 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 msRecommended parts for the connector When you make a connection cable use the following connectors to connect it to the connector of the Code Reader Recommended parts for the connector Usage Code Reader here eine ene CJIW SCU42 For panel installation 2 Hosiden Corporation Connection Cable M nt Wy T A AA Connector part DIN BP plug Made by Hosiden Corporation TCP1394 715267 Ty
10. Confirm that 0 Errors and 0 Warnings are displayed in the Build Tab Page under the Edit MN pue Pane select Rebuild Controller from nm the Project Menu Check All Programs F7 Check Selected Programs Shiit F Build Controller FE A confirmation dialog box is When you execute the Rebuild operation all programs will be rebuilt displayed Check the contents It may take time to complete the operation Do you wish to continue and click the Yes Button A screen is displayed indicating the conversion is being performed Cancel Confirm that 0 Errors and O Warnings are displayed in the F3 Build Tab Page MES ps De czpuon Program Location 20 T 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 m n Communications Setup Online Citrl W The Change Device Dialog Box is d
11. 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 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 1 Double click CPU Expansion y Configurations and Setup Racks under Configurations and Setup in the Multiview Explorer amp g EtherCAT Y gt CPU Expansion Racks p m CPU Rack VO Map PA Controller Setup b 1 Motion Control Setup amp Cam Data Settings Event Settings ME Task Settings Er Data Trace Settings The CPU Expansion Racks Tab lt is displayed in the Edit Pane memmme Ve Select the Serial Communications Unit icon as shown on the right Confirm that CJ1W SCUA is displayed the Device name is J01 and the Unit No is O Model name CJIW SCU42 Product name Serial Communication unit Version 2 0 Specifications RS 232C x 1 RS 422 485 x1 Rack No 0 Slot No n Unit No 0 settinc 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
12. 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 Code Reader to the Controller via serial communications This document explains the procedures for setting up the Controller and the 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 Code Reader to the Controller via serial communications 7 2 Setting Up the Code Reader i 7 2 1 Cable Connection Y 7 3 Setting Up the Controller i 7 3 1 Hardware Settings i 7 3 2 Starting the Sysmac Studio and Importing the Project File i 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 i 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 th
13. R2CF65 0509 WOT1 V509 W011 5 VDC power supply P Precautions for Correct Use This document explains the procedures for setting up the Code Reader from the factory default setting If the Code Reader was changed from the factory default setting make sure to initialize by referring to Section 8 2 Initializing the Code Reader Additional Information For details on the factory default setting of the 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 Ultra Small Multi code Reader V400 R2 Series User s Manual Cat No Z333 7T Connection Procedure 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 1 Make sure that the power supply is OFF when you perform the setting up Make sure that the power supply cJ4w scua2 to the PLC is OFF i UN RC SDi RDi TERI If the power supply is turned See 5 Indicators RDY ERH SD2 RD2 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 co
14. Senda Sona Message Rev Message Response Wei eror OMRON V500 R2 PMCR_EV100 Q 00 RSET 001 Send amp Receive 3 SD RDCODE RV RDCODE YES End Abort ane New Protocol List f New Protocol E H cand Messane ist lt Settings gt Step No Receive message 00 SD RDCODE RV RDCODE 99 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 Step setting screen Command Send Wait Send Message Response Next Error OMRON_V500 R2_PMCR_EV100 E 00 RSET 001 Send amp Receive 3 SD RDCODE RV RDCODE End Abort 7532 New Protocol List GI Mew Protocol Rie New Sequence Ht Gand 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 60 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 Send
15. and other documents whether electronic or in writing relating to the sale of products or services collectively the Products by Omron Electronics LLC and its subsidiary companies Omron Omron objects to any terms or conditions proposed in Buyer s purchase order or other documents which are inconsistent with or in addition to these Terms Prices Payment Terms All prices stated are current subject to change with out notice by Omron Omron reserves the right to increase or decrease prices on any unshipped portions of outstanding orders Payments for Products are due net 30 days unless otherwise stated in the invoice Discounts Cash discounts if any will apply only on the net amount of invoices sent to Buyer after deducting transportation charges taxes and duties and will be allowed only if i the invoice is paid according to Omron s payment terms and ii Buyer has no past due amounts Interest Omron at its option may charge Buyer 1 1 2 interest per month or the maximum legal rate whichever is less on any balance not paid within the stated terms Orders Omron will accept no order less than 200 net billing Governmental Approvals Buyer shall be responsible for and shall bear all costs involved in obtaining any government approvals required for the impor tation or sale of the Products Taxes All taxes duties and other governmental charges other than general real property and income taxes including any interest
16. error end of the execution is detected The error processing is executed when a non existent status processing number is detected 51 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 Ultra Small Multi code Reader Senes Model VAOO R2 Series Serial Unit CJTW SCUA2 Protocol macro Unit number 0 Serial port number 2 Version information V1 00 Feburary 8 2013 New release C Copyright OMRON Corporation 2013 All Rights Reserved 1 Communications processing Communications start switch Input Start Communications processing status flags Local Status 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 5tart AND NOT Local 5tatus Busy OK Local Status Done OR Local Status Error THEN Local Status Busy z TRUE Local State 10 10 Initialization processing END I
17. 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 iiis 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 O 249 OF WORD ARRAY 0 249 Receive 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 into a Output_RecvMessage STRING 498 string 498 characters An area that stores an error code of the ExecPMCHR Output PmrErrorID instruction Normal end 1620000 An area that stores an expansion error code of the Output PmrErrorlDEx ExecPMCR instruction Normal end 16200000000 OF WORD An area that stores a protocol macro error code Output PmrStaErrCode Normal end 1640000 woo An area that stores the transmission error status flag Output TransErrCode WORD Storage area of J01 P2 TransErrSta Normal end 1620000 You need to use an AT
18. intellectual property rights of another party Property Confidentiality Any intellectual property in the Products is the exclu sive property of Omron Companies and Buyer shall not attempt to duplicate it in any way without the written permission of Omron Notwithstanding any charges to Buyer for engineering or tooling all engineering and tooling shall remain the exclusive property of Omron All information and materials supplied by Omron to Buyer relating to the Products are confidential and proprietary and Buyer shall limit distribution thereof to its trusted employees and strictly prevent disclosure to any third party Export Controls Buyer shall comply with all applicable laws regulations and licenses regarding i export of products or information iii sale of products to forbidden or other proscribed persons and ii disclosure to non citizens of regulated technology or information Miscellaneous a Waiver No failure or delay by Omron in exercising any right and no course of dealing between Buyer and Omron shall operate as a waiver of rights by Omron b Assignment Buyer may not assign its rights hereunder without Omron s written consent c Law These Terms are governed by the law of the jurisdiction of the home office of the Omron company from which Buyer is purchasing the Products without regard to conflict of law princi ples d Amendment These Terms constitute the entire agreement between Buyer and Omron relating to th
19. message setting screen xi send message tender Terminator gt Check sode c Length Adaress lt gt j OMRON_V500 R2_PMCR_EV100 kar SD_RDCODE m New Protocol List Gil Mew Protocol New Sequence r Man di Dennis Adnan 1 eSettings of SD RDCODE send message Settings lt h gt Z lt t gt 1 2 8 No Description 1 Type Code Data ESC 2 Constant ASCII 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 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 16 1B js 1 Fixed Z 16 5A Reading Trigger destination device command Terminator Fixed CR 16 0D 61 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 Tal Recoive Message Header to Terminator ct 4 OMRON_V500 R2_PMCR_EV100 ka RV_RDCODE j 3 New Protocol List amp New Protocol New Sequence
20. specification for the area that stores DstDat of the ExecPMCR instruction to specify an address in the memory used for CJ series Units 48 9 Program Device variables for CJ series Unit Serial Communications Unit Variable name Data type Explanation Protocol macro operation status SES cmo 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 Device 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 Helated 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
21. 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 Section 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 blocks Explanation PIOrSedim sero ExecPMCR Requests execution of a communications sequence protocol data registered in a Serial Communications Unit eExecPMCR instruction argument data m me AN ExecPMCR Protocol Macro ExecPMCR instance ExecPMCR ST expression ExecPMCR instance Execute Port SeqNo SrcDat DstDat Done Busy Error ErroriD ErrorlDEx Execute Done Variables Name Meaning vO beserpion Warang Umt vetu Port Destination Destination port port SeqNo Communic Communications sequence ations number sequence number SrcDat Send data Send data array array array DstDat Receive 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 Sedi i of destination pem Port UnitNo Unit number Unit number of Serial Communications Unit PhysicPortNo Serial port Serial port number on number Serial Communicat
22. 00bps 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 Port2 Clearing holding the contents of the Clear T If the settings are different from Port2 Link word specification data excham On request I O refreshing the above change the values Port2 Maximum number of bytes in proto Sas Byte from the pull down lists After changing the values click the Apply Button Cancel Apply 5 Double click I O Map under ey PU Expansion Racks Configurations and Setup on Rok Pos Port Descrip dan wv Configurations and Setup w Y CPU Expansion Racks the Multiview Explorer pee CF w CPU Rack 0 The Q Map Tab IS displ ayed Y CPU Expansion Racks ol v CJ1W SCUA2 Serial Communic gt m CPU Rack v Com_UnitSta Serial Comm and then the parameters for the e Com UnitLogMemErr Error Log EEP i 1 P 2 Controller setup Com_UnitPmrDatErr Protocol Data U nit are listed i gt i Motion Control Setup Y P1 PortCfg Porti Port Se 6 Confirm that data in the Variable y Port L Vanatide Variable Comment Vanable Type v E CPU Expansion Rack Columns start with JO1 and the Y CURAD 1 1 1 Yv CHW SCUM2 Senal Communic Global Variable IS set In each v Com UnitSta Serial Communication U R eo comunista Global Variables A Com UnitLogMemErr Error Log EEPROM Error R Is 2201 Com UnitLogMemrr Global Vanabies I Variable Var
23. 1 ka ace ns HB dile Run NJ501 1500 E Mot Fitted SCU 0 expands Select the Serial Communications Unit SCU O is selected in the right figure Select the Trace 2 Icon de 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 6 Select Start Trace One Shot ee Trace from the PLC Menu A Operating Mode j Edit PC PLC Comms Settings status Edit Communications Port Settings Nat Tracing Upload Communications Port Settings Not Tracing Download Communications Port Settings Start Trace Continuous Trace Stop Trace One Shot Trace 2 in the Project Window was changed to One shot Trace Running 35 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 T Connection Procedure View Insert Project Controller Simulatio Studio Qutput 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 BIER Wah poe the Edit Pane Confirm that the variables shown on the right are displayed in the Online value Modify Datatype 1 Mame ar cosplay format Name Columns Program Q Input Start Start input Program Local Status To add a variable click Input Busy Program Name Done execution status If is dis
24. Data 0 2485 Output RecvData 0 Output RecvData 1 Output RecvData 2 Cutput_RecvData 3 Output RecvData 4 Output RecvData 5 Output RecvData 6 Output RecvData Output RecvData 8 Receive data Hex e Output RecvData 0 0008 e Output RecvData 1 3439 e Output RecvData 2 3132 e Output RecvData 3 3334 e Output RecvData 4 3536 e Output RecvData 5 3738 e Output RecvData 6 3930 e Output RecvData 7 3400 IOnline valuel Modify FALSE TRUE FALSE TRUE FALSE TRUE FALSE Online value Modify FALSE TRUE FALSE TRUE FALSE TRUE FALSE TTT Number of words used to store the receive data Eight words from 0 to 7 Values of Bar Code String Output_RecvMessage 4912345678904 39 8 Initialization Method 8 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 click Edit Special Unit Settings of CJ1W SCU42 in CPU Expansion Racks from the Sysmac Studio Item name Value Model name CJAAW SCUA2 Product name Serial Communicat
25. E Pa EUR Slot Na a Communications Unit icon al Unit No ie 1 n m m E Tack Seitan Specal Und Settings Ed Special Url Settings Click Edit Special Unit a i SAS TASTE Settings 5 The 0 Unit 0 Tab is displayed Click the Transfer To e SON EONO E NN B Parameter name Porti Port settings Porti Serial communications mode Porti Data length Portl Stop bits Porti Parity Porti Baud rate Porti Send delay Portl Send delay user specified Portl CTS control Porti 1 N 1 1 protocol setting Portl Host Link compatible device mode Porti Host Link unit number Port1 No Protocol Start code Help 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 Y Return to default Transfer to Controller Transfer from Controller Compare Cancel 26 6 A confirmation dialog box is displayed Check the contents and click the Yes Button A dialog box is displayed indicating transferring is being performed and a confirmation dialog box is displayed Check the contents and click the Yes Button 7 The Port Selection Dialog Box is displayed Select A ports and click the OK Button 8 A confirmation dialog box is displayed Check the contents and click the OK Button 9 Select Port2 Protocol macro Settings from the pull down list of Paramete
26. 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 bits Panty Baud rate Send delay Send delay user spe Port 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 rt1 NT Link Settings No Protocol Settings Protocol macra Settings Serial 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 18 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 1 imeter n eT Y The setting items of the Port 2 Port Port settings EEE Protocol macro Settings are Port2 Serial communications mode Protocol macro shown Port2 Data length E bits Confirm that the Port2 Port AE ibt Settings is set to User settings iE g g Port2 Baud rate Default 96
27. F 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 Status Busy THEN Local Status Done FALSE Local Status Error FALSE END IF 1 3 Entering the communications in progress status and shifting to each state processing IF Local Status Busy THEN CASE Local State OF 92 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 number 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 O y 2 2 Initializing the communications instruction execution flag Local ExecFlg FALSE 2 3 Initializing the error code storage areas Clear Output PmrErrarIDy Clear Output PmrErrarIDEx Clear Output PmrStaErrCodey Clear Output_TransErrCode 2 4 Setting the ExecPMCR instruction control data Local InPort UnitMo eUnitNo CBU_No00 Local_InPort PhysicPortNo USINT 2
28. Issues the reading trigger for a 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 explanation Destination port specification Por sPROT i eUnitNoZ CBU No00 UnitNo Unit number eUnitNo Specifies the unit number for the Serial Communications Unit PhysicPortNo Serial port number USINT A A No 2 SeaNo Communications sequence UINT 10 900 q number UINT Specifies Reading Trigger WORD 16 0000 The number of words of send data is 0 Specifies that no parameter is required for the command DstDat array Receive data array WORD A Setting is orcDat array Send data array WORD 46 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 NA e o NM Nie lt gt SE i lt gt Ss Serial cable Ss ee a J S s E A 1 2 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 ErrorlDEx of the ExecPMCR instruction 2 Errors at an execution of t
29. 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 93 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 TRIG instance J01 P2 PmrExecSta Local EndExecPM CR IF Local EndExecPMCR THEM IF NOT JO1 P2 PmrSegEndSta THEN Error end of protocol macro Output TIransErrCode 2J01 P2 TransErrSta Local Status Error TRUE ELSE Mormal end processing Output_TransErrCode WORD 1670000 Local_Status Done TRUE Convert the receive data from BYTE array to STRING Local RecvWordSize zZ WORD TO UINT Output RecvData 0 1 MemcCopy Output RecvData 1 Local RecvWordData 0 Local RecvWordSize ToAryByte Local RecvWordData eBYTE ORDER HIGH LOW Laocal RecvByteData O Local RecvByteSize Local RecvWordsSize 2 Qutput RecvMessage AryToString Lacal RecvByteData O Local RecvByteSize END IF Local EndExecPMCR FALSE Local Status Busy FALSE Local ExecFlg FALSE Local_5tate 0 To 0 Communic
30. NJ series CPU Unit Software User s Manual NJ301 EETL W494 CJ1W SCU 2 CJ series Serial Communications Units ee 1 Operation Manual for NJ series CPU Unit W504 Sysmac Studio Version 1 Operation Manual W344 CXONE AL C V4 CX Protocol Operation Manual W502 NJ series Instructions Reference Manual NJ301 11111 Z333 V400 R2 Series Ultra Small Multi code Reader V400 R2 Series User s Manual 2 Terms and Definitions 2 Terms and Definitions Term Protocol macro Protocol Sequence otep 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 A 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 communicat
31. OMRON Machine Automation Controller NJ series General purpose Serial Connection Guide RS 232C OMRON Corporation Ultra Small Multi Code Reader V400 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 a is registered trademark and patented technology licensed by Beckhoff Automation GmbH Germany oysmac 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 1 Related Manuals iii ai oie 1 2 TERMS ANG Pr I erc ii 2 3 Remarks Rd 3 4 O AAA ia SaNa 5 5 Applicable Devices and Device Configuration 6 9 1 Applicable DEVICES aiat ipei ot mo E Idi tss digi 6 5 2 Device Configuration eeeeessseeesseseeeeen nennen nennen nnns 7 6 Serial Communications Settings EET 9 6 1 Serial Communications Settings coocccccccoccnncononcnnconononncnnancnnnnnanons 9 6 2 Gable Winng Diada siii isis t SE S NS REN 10 6 3 Example of Connection Check cccccconccncccccccncononc
32. V400 R2 series hereinafter referred to as the 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 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 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 V400 RH2 PMCHR232C EV100 smc Ver 1 00 CX Protocol project file OMRON V400 R2 PMCHR 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 u
33. al 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 98 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 number 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 cis Teal seen T commana Rew ee HEE OMRON V500 R2 PMCR_EV100 co 00 RSET 001 Send amp Receive SD RDCODE Rv RDCODE YES End Abort ane New Protocol List f New Protocol i H cand 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 la oT step ones Command ein
34. anty and Limitations of Liability Change in Specifications Product specifications and accessories may be changed at any time based on improvements and other reasons It is our prac tice to change part numbers when published ratings or features are changed or when significant construction changes are made However some specifica tions of the Product may be changed without any notice When in doubt spe cial part numbers may be assigned to fix or establish key specifications for your application Please consult with your Omron s representative at any time to confirm actual specifications of purchased Product Errors and Omissions Information presented by Omron Companies has been checked and is believed to be accurate however no responsibility is assumed for clerical typographical or proofreading errors or omissions OMRON AUTOMATION amp SAFETY OMRON INDUSTRIAL AUTOMATION THE AMERICAS HEADQUARTERS Schaumburg IL USA e 847 843 7900 800 556 6766 e www omron247 com OMRON CANADA INC HEAD OFFICE OMRON ARGENTINA SALES OFFICE Toronto ON Canada 416 286 6465 e 866 986 6766 e www omron247 com Cono Sur e 54 11 4783 5300 OMRON ELECTRONICS DE MEXICO HEAD OFFICE OMRON CHILE SALES OFFICE M xico DF e 52 55 59 01 43 00 001 800 556 6766 mela omron com Santiago e 56 9 9917 3920 OMRON ELECTRONICS DE MEXICO SALES OFFICE OTHER OMRON LATIN AMERICA SALES Apodaca N L e 52 81 11 56 99 20 e 001 800 556 6766
35. ations not in progress status 3 1 2 Error detection processing during protocol macro execution ELSIF ExecPMCR instance Error THEM ExecPMCR instruction error Output PmrErrorID ExecPMCR instance ErrorID Output PmrErrorIDEx ExecPMCR instance ErrorIDEx MoveDigit01_P2_PmrSta USINT 0 Local_PmrStaCode USINT 0 USINT 1 Output PmrStaErrCode Local PmrStaCode Output TransErrCode J01 P2 TransErrSta Local Status Busy FALSE Local Status Error Z TRUE Local ExecFlg z 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 MOT ExecPMCR instance Busy THEN Local FExecFlg z TRUE END IF 3 2 Executing the communications instruction ExecPMCR instance Execute Local ExecFlg Port Local_InPort SeqNo Local_SeqNo SrcDat zInput SendbData U DstDat Output_RecvData 0 94 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 State 0 0 Communications not in progress status ELSE Local State 99 To 99 Processing number error process END CASE END IF 55 9 Program j 9 6 Protocol macro data Protocol macro data consists of sequence step send receive message and matrix Its composition is de
36. converted into a string unit WORD local ecvBvieDafa An area that stores data in a byte array which will be 7 OF BYTE converted into a string 498 bytes Local_RecvByteSize A size of data to be converted into a string unit BYTE 50 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 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 processing 2 nitialization 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
37. 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 PmrErrorIDEx The content of ExecPMCH instance ErrorlDEx is set when the value of ExecPMCR ainstance ErrorlD is 16320800 Code 1642200000000 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 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 64 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 PmrSia 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
38. e Products and no provision may be changed or waived unless in writing signed by the parties e Severability If any provi sion hereof is rendered ineffective or invalid such provision shall not invalidate any other provision f Setoff Buyer shall have no right to set off any amounts against the amount owing in respect of this invoice g Definitions As used herein including means including without limitation and Omron Compa nies or similar words mean Omron Corporation and any direct or indirect subsidiary or affiliate thereof Certain Precautions on Specifications and Use 1 Suitability of Use Omron Companies shall not be responsible for conformity with any standards codes or regulations which apply to the combination of the Product in the Buyers application or use of the Product At Buyer s request Omron will provide applicable third party certification documents identifying ratings and limitations of use which apply to the Product This information by itself is not sufficient for a complete determination of the suitability of the Prod uct in combination with the end product machine system or other application or use Buyer shall be solely responsible for determining appropriateness of the particular Product with respect to Buyer s application product or system Buyer shall take application responsibility in all cases but the following is a non exhaustive list of applications for which
39. e Trace 7 4 2 Executing the Program l Set up the Code Reader Connect a cable to the 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 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 4 Checking the Receive Data 7T 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 7T Connection Procedure 7 2 Setting UP the Code Reader Set up the Code Reader 7 2 1 Cable Connection Connect a cable to the Code Reader 1 Connect the special cable V509 W011 to the Code Reader Connect the 5 VDC power supply to the special cable and turn ON the power supply Code Reader a V400
40. elect Compare Protocols from the Protocol Menu Hi X File Edit View Protocol Create Upload Protocol List 4 OMBON Y E Upload Protocols 2 New Pr EE Gi Ne Download Protocols i Trace Compare Protocols 18 The dialog box on the right is displayed Select the nclude Source Information Check Box Protocol password protection and click the Compile Button 8 PT Password mr PLI da 32 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 inthe Compared Column in the right figure and click the Close Button 7 Connection Procedure Protocol password protection Password Iv Include Source Information Target 4 scu 0 x Successful Protocol password protection Password Confirm Iv Include Source Information Compile Compiled X Compared 100 33 7 Connection Procedure 7 4 Checking the Serial Communications Execute the program and confirm that serial communications are normally performed Caution Sufficiently confirm safety before you change the values of variables on a Watch Tab Page when
41. 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 the 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 WO011 in Specifications and External Dimension in Section 5 Appendix of the Ultra Small Multi code Reader V400 H2 Series User s Manual Cat No Z333 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 tor 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 defined 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 6 1 Serial Communication
42. h the processing Name new Controller Q Serial ID R01 07x11 0552 The displayed serial ID differs e Controller depending on the device Name new Controller Serial ID R01 07X11 0554 Do you want to continue the connection processing Y N Do you want to change the Serial ID in the project to the controller s Serial ID Y 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 Section 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 Shift W 23 T Connection Procedure 10 The Synchronization Dialog Box EZEEESE IS d isplayed 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 Clear the present values of variables with Retain attribute Valid for Transfer to Controller Do not transfer the program source Valid for Transfer to Controller All data will be re tran
43. he 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 PmrSegAbtSta 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 error 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 Error code of ExecPMCR instruction ErrorlD Expansion error code of ExecPMCR instruction ErrorlIDEx Protocol macro error code lower four bits of JO1 P2 PmrSta e Transmission error status 01 P2 TransErrSta 47 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
44. he 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 LCT Device Type NJ50 Settings Network Type Device Name Settings Connect to PLC Operating Mode zm New Protocol List E NewPL PLC Tools Window Help Disconnect from PLC Operating Mode Program Edit PC PLC Comms Settings Monitor v Run Edit Communications Port Settings This command will affect the state of the connected PLC Do you wish to continue cs New Protocol List FH 8 New Protocol de Trace List H D MewPLC1 Program NJ501 1500 30 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 0 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 nclude Source Information Check Box and click the Compile Button When 100 is displayed in the Complied 96 Column the compiling operation is completed
45. iable Type Column Com vine Protocol Data Error aie mo TL Com Unten oa vari Y ortC Kk ort Port Settings I uM PL PortCta Obal Vanabies gt n Sesa tg Porti Pe Ser RW Boo I ii sedet Got variables 1 StartBach orti Start Bets Sse MOL Pl Startls Cal Van f the settin S are different from dormiens ber SR end we 01 91 us t p g P1 StopBitCig Porti Stop Bits D ME MEO PL Stopite obal Vanabies H P1 ParityYNC Port1 Pari ze EDO 91 Party nico Gba variables the above rig ht click on E Porti Panty Even Odd RW BOOL es vates CJ1 W SCU42 and select P1 Raudratecfg Porti Raud Rat SAD PI BaudrateCfg r Create Device Variable Com UnitSta Com Uniti ogMemE Com UnitPmrDattEr Y P1_PortCfg P1 SerSetCfq P1 StartBitCfg P1 DatBitCfg Copy Search e Expand Collapse All P1 StopBitCfg P1 ParityYNCfg P1 Pa rityBiiCig Create Device Variable P1_BaudrateCtg 7 Double click Task Settings gt Event Settings under Configurations and E Setup in the Multiview Explorer FA Data Trace Settings 19 10 11 12 T Connection Procedure The Task Settings Tab is displayed in the Edit Pane Click X Configurations and Setup the Program Assignment CEM EAP ARSE RAGES Settings Button and confirm that Program0O is set under Primary Task d PrimaryTask 1 Programo FE mens li Select Check All Programs from the Project Menu Check Selected Programs Shift F Build Controller FE Rebuild Controller
46. ion 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 Port1 Port settings Defaults Portl Senal communications mode Hast Link default Port1 Data length bits Portl Stop bits 2 bits Port1 Panty Even Portl Baud rate Default S600bps Portl Send delav Default 0 ms Return to default Help Transfer to Controller Transfer from Controller Compare OK Cancel Apply ee ee ee 40 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 cal All METI Clear All Memory This function initializes 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 Security Information Settings of Operation Authority initialization at the next online H Clear event log Cancel i 8 2 Initializing the Code Reader For the initialization of the Code Reader refer to Return to the factory defa
47. ion frame command sent to the external general purpose device A send message is read from the step in the sequence and sent 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 2 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 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 The user is encouraged to confirm the standards and regulations that the system must c
48. ions Unit 44 9 Program eSend Receive messages Overview of send receive messages Destination device Send message Controller Data Terminator Heceive message Data Terminator Relationship between the SrcDat send data array and the send message ScrDat 0 ScrDat 1 ScrDat 2 ScrDat n 1 Bit Up CPU Communications Unit Io 4 DIS Se UIS 07 VES 0 0 Send data array ScrDat m No of send data words Communications Unit s s Destination Device Send message n CC Data Terminator Relationship between the DstDat receive data array and the receive message Destination device Communications Unit Heceive message No of receive data words Bit Communications Unit CPU Receive data array DstDat m DstDat 0 DstDat 1 DstDat 2 DstDat n 1 45 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 Heading Trigger
49. is called an instance The name of the function block to use is specified as the data type of the variable signal changes to FALSE Variable name Data type Explanation Requests execution of a communications sequence EXEC VIO instance Sheen protocol data registered in a Serial Communications Unit F TRIG instance F TRIG Outputs TRUE for one task period only when the input 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 EN Additional Information For information on the F_TRIG instruction refer to Sequence Input Instructions F_TRIG in Section 2 Instruction Descriptions of the NJ series Instructions Reference Manual Cat No W502 49 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 Loss Benna 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
50. isplayed Confirm that the Device and Version are set as shown on the aR Select Device right and click the OK Button i Category Controller If the settings are not correct i select the setting items from the Device M501 v 1500 pull down list Moran i05 3 If the settings were changed in step 2 the Build Dialog Box is displayed Check the contents and click the Yes Button xm Do you want to execute the build This dialog box is not displayed if no change was made 21 T Connection Procedure 4 Select Communications Setup Controller Simulation Tools Help Tortue odo Aia EIU Change Device Online Ctrl W 5 The Communications Setup p qunm Dialog Box is displayed aa ooh Select the Direct connection via e rd USB Option for Connection ed i Q Select one method from these options at every online connection Ty pe H Direct connection via USB lll 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 i4 Check forced refreshing when going offline Y Response Monitor Time Set the Response Monitor Time in the communications with the Controller OK 6 Select Online from the indic Controller Menu
51. ll other warranties express or implied b Limitations OMRON MAKES NO WARRANTY OR REPRESENTATION EXPRESS OR IMPLIED ABOUT NON INFRINGEMENT MERCHANTABIL 14 15 16 17 18 ITY OR FITNESS FOR A PARTICULAR PURPOSE OF THE PRODUCTS BUYER ACKNOWLEDGES THAT IT ALONE HAS DETERMINED THAT THE PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR INTENDED USE Omron further disclaims all warranties and responsibility of any type for claims or expenses based on infringement by the Products or oth erwise of any intellectual property right c Buyer Remedy Omron s sole obli gation hereunder shall be at Omron s election to i replace in the form originally shipped with Buyer responsible for labor charges for removal or replacement thereof the non complying Product ii repair the non complying Product or iii repay or credit Buyer an amount equal to the purchase price of the non complying Product provided that in no event shall Omron be responsi ble for warranty repair indemnity or any other claims or expenses regarding the Products unless Omron s analysis confirms that the Products were prop erly handled stored installed and maintained and not subject to contamina tion abuse misuse or inappropriate modification Return of any Products by Buyer must be approved in writing by Omron before shipment Omron Compa nies shall not be liable for the suitability or unsuitability or the results from the use of Products in combinatio
52. mela omron com 54 11 4783 5300 OMRON ELETR NICA DO BRASIL LTDA HEAD OFFICE Sao Paulo SP Brasil e 55 11 2101 6300 e www omron com br OMRON EUROPE B V Wegalaan 67 69 NL 2132 JD Hoofddorp The Netherlands e Tel 31 0 23 568 13 OO Fax 31 0 23 568 13 88 e www industrial omron eu Cat No 0 13 Note Specifications are subject to change 2013 Omron Electronics LLC Printed in U S A
53. n with any electrical or electronic components circuits system assemblies or any other materials or substances or environ ments Any advice recommendations or information given orally or in writing are not to be construed as an amendment or addition to the above warranty See http www omron247 com or contact your Omron representative for pub lished information Limitation on Liability Etc OMRON COMPANIES SHALL NOT BE LIABLE FOR SPECIAL INDIRECT INCIDENTAL OR CONSEQUENTIAL DAMAGES LOSS OF PROFITS OR PRODUCTION OR COMMERCIAL LOSS IN ANY WAY CONNECTED WITH THE PRODUCTS WHETHER SUCH CLAIM IS BASED IN CONTRACT WARRANTY NEGLIGENCE OR STRICT LIABILITY Further in no event shall liability of Omron Companies exceed the individual price of the Product on which liability is asserted Indemnities Buyer shall indemnify and hold harmless Omron Companies and their employees from and against all liabilities losses claims costs and expenses including attorney s fees and expenses related to any claim inves tigation litigation or proceeding whether or not Omron is a party which arises or is alleged to arise from Buyers acts or omissions under these Terms or in any way with respect to the Products Without limiting the foregoing Buyer at its own expense shall indemnify and hold harmless Omron and defend or set tle any action brought against such Companies to the extent based on a claim that any Product made to Buyer specifications infringed
54. nality 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 follows Personal computer NJ501 1500 n dud Sysmac Studio CJ1W SCU42 installed OS Windows 7 Special cable RS 232C a V509 W011 on EM ae ee i NOS 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 NJPA30001 OMRON Ver 1 06 OMRON CX Protocol Included in Sysmac Ver 1 97 otudio H232C EV100 smc R_ EV100 psw Personal computer OS Windows7 TT Eu a USB 2 0 type B connector OMRON Ultra Small Multi code Reader VA00 R2CF65 OMRON Special cable RS 232C 1V50e WO0M i 5 VDC power supply gt P Precautions for Correct Use Prepare the latest project file and protocol macro data in advance To obtain the files 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
55. nnector 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 Set the Unit No Switch to O The unit number is set to 0 as the factory default setting Connect the Serial Communications Unit to the Controller as shown on the right Connect the special cable for the Code Reader to the Serial Communications Unit Connect the personal computer to the Controller with a USB cable t Power Supply Unit Special cable Controller Serial Communications Unit USB cable End Cover 7 Connection Procedure 7 3 2 Starting the Sysmac Studio and Importing the Project File otart the Sysmac Studio and import the project file Install the Sysmac Studio and USB driver in the personal computer beforehand 1 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 sl 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 displayed Select a AAA OMRON_V400 R2_PMCR232C Nets Ses EV100 smc and click the E omron v400 R2 PMCR232 Evi00sme Open Button Downloads El Recent Places RE Desktop Obtain the project file from OM RON Al Libraries Es Documents a Music i Pictures 7 3 The OMRON V400 R2
56. nnnonancnnnnnancnnonnnnnnnos 12 7 Connec on POCO UFO eoru x d pano tu ee ar a a aa aan UE aN Aaaa 13 d WOK F IOW m 13 7 2 Setting UP the Code Reader ccccoooccccccccccnccccoccnncocononncononenononanenonnnos 15 7 3 Setting Up the Controles an t apt tds 16 7 4 Checking the Serial Communications seeeeeesssssss 34 9 INIIaliZzation Method mcm 40 8 1 Initializing the Controler saes a a o eaaa 40 8 2 Initializing the Code Reader cccccooccncccccccccococcnncononnnncononennonnnnonnnnnaness 41 Y Program saipa naa 42 9 1 A RM 42 9 2 Communications sequence sssri a e a 46 9 3 Error Detection Processing cooocccoocnccccnococonconnconnnconnnnonnnnonannnnanoss 47 9 4 grille Ene 48 9 5 ST PEIOGFAlTiada e dep i uote ee ee ee 51 9 6 Protocol macio Cala xiii tier hae tetanic a aaa 56 9 7 A IL TM 63 9 8 Error Processing osi am pon oo ud on ito 64 103 ROVISION MISTO uec ie oae nana Dn Gea sexu gana enar eu s eue EaRuc ro tus sac E e unn Fou gue aS 66 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 TEL NJ series CPU Unit Hardware User s Manual NJ301 1 1 11 W501
57. o 3 Confirm that the online value of Local Status Done which indicates the program execution status was changed to True This means the program ended normally In the case of an error end Local Status Error changes to True Troubleshoot the error by referring to step 2 If the program ended normally confirm that each error code is O 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 Check the received data code that was read in the Watch Window of the Sysmac Studio In the example on the right the data stored in Output RHecvMessage is 4912345678904 It is the same as the trace data in step 3 of Section 7 4 3 The number of words used to store the receive data 0008 in hexadecimal is stored in Output RHecvData 0 The bar code data that were read are stored from Output RHecvData 1 to 7 The number of used words is 8 including Output RecvData 0 Normal end Pragram Input Start ud Program Local Status Busy Done Error Mame Program Input Start v Busy Done Error Normal end ProgramQ Output PmrErrorID ProgramO Output PmrErroriDEx Program Output PmrStaErrCaode ProgramQ Output TransErrCode Error end ProgramO Output PmrErroriD Program Output_PmrErroriDEx Pragram Output PmrStaErrCode ProgramQ Output TransErrCode ProgramO Output RecvMessage Program Output Recv
58. 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 Output TransErrCode eOutput TransErrCode The content of J01 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 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 65 10 Revision History 10 Revision History Revision Date of revision Revision reason and revision page code 01 Sep 3 2013 First edition 66 Terms and Conditions of Sale OMRON 12 Offer Acceptance These terms and conditions these Terms are deemed part of all quotes agreements purchase orders acknowledgments price lists catalogs manuals brochures
59. onform to It is prohibited to copy to reproduce and to distribute a part or the whole of this document without the permission of OMRON Corporation The information contained in this document is current as of September 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 1 will result in minor or moderate injury or may result in serious AN WARNING injury or death Additionally there may be significant property damage i C ti Indicates a potentially hazardous situation which if not avoided caution may result in minor or moderate injury or in property damage K 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 The filled circle symbol indicates operabons that you must do The specihic operabon is shown in the circle and explained in text This example shows a general precaution lor something that you must do 4 Overview 4 Overview This document describes the procedure for connecting OMRON Corporation s Ultra Small Multi code Reader
60. or penalties thereon imposed directly or indirectly on Omron or required to be collected directly or indirectly by Omron for the manufacture production sale delivery importa tion consumption or use of the Products sold hereunder including customs duties and sales excise use turnover and license taxes shall be charged to and remitted by Buyer to Omron Financial If the financial position of Buyer at any time becomes unsatisfactory to Omron Omron reserves the right to stop shipments or require satisfactory security or payment in advance If Buyer fails to make payment or otherwise comply with these Terms or any related agreement Omron may without liabil ity and in addition to other remedies cancel any unshipped portion of Prod ucts sold hereunder and stop any Products in transit until Buyer pays all amounts including amounts payable hereunder whether or not then due which are owing to it by Buyer Buyer shall in any event remain liable for all unpaid accounts Cancellation Etc Orders are not subject to rescheduling or cancellation unless Buyer indemnifies Omron against all related costs or expenses Force Majeure Omron shall not be liable for any delay or failure in delivery resulting from causes beyond its control including earthquakes fires floods strikes or other labor disputes shortage of labor or materials accidents to machinery acts of sabotage riots delay in or lack of transportation or the
61. particular attention must be given i Outdoor use uses involving potential chemical contamination or electrical interference or conditions or uses not described in this document ii Use in consumer products or any use in significant quantities iii Energy control systems combustion systems railroad systems aviation systems medical equipment amusement machines vehicles safety equip ment and installations subject to separate industry or government regulations iv Systems machines and equipment that could present a risk to life or prop erty Please know and observe all prohibitions of use applicable to this Prod uct NEVER USE THE PRODUCT FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR PROPERTY OR IN LARGE QUANTITIES WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO ADDRESS THE RISKS AND THAT THE OMRON S PRODUCT IS PROP ERLY RATED AND INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM Programmable Products Omron Companies shall not be responsible for the user s programming of a programmable Product or any consequence thereof Performance Data Data presented in Omron Company websites catalogs and other materials is provided as a guide for the user in determining suitabil ity and does not constitute a warranty It may represent the result of Omron s test conditions and the user must correlate it to actual application require ments Actual performance is subject to the Omron s Warr
62. peA K m m m ee power supply mopecial cable The special cable V509 W011 is used in this document qu B Special cable V509 W011 an NJ501 1500 i Dub apin ite gt CJ1W SCU42 i PE Code Reader san TTT V400 R2CF65 The external trigger is not used in this document Insulate it from other cables Connect 5V and OV to the external power supply 11 6 Serial Communications Settings 6 3 Example of Connection Check This document shows an example of an ST structured text program and protocol macro data in which the Controller sends receives the message to from the Code Reader The Controller and the Code Reader send and receive the message of Reading Trigger sequence No 900 The following figure outlines the sequence operation eOverview 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 Code Reader 3 The 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 Code Reader and then stores in the specified variable Controller CPU Unit Serial Communications Unit Project file RS 232C Code Reader ST Program
63. played to the left of fus the variable instead of KA click 3 and open the configuration Program Output PmrErrorIDEx of the structure variable Program Output PmrstaErrCode Programo of the Name is Program Output TransErrCode omitted from the following Program0 Output_RecvMessage descriptions 4 ProgramQ Output RecvData 0 249 Head the bar code shown on the Error codes Heceive data after converted to a string Heceive data storage area right as an example Position the Code Reader so that it can read the bar code shown on the right 4 912345 678904 36 T Connection Procedure 5 Click TRUE on the Modify Name Online value Modify Column of Input Start TRUE FALSE The online value of nput Start changes to True Name Online value Modify Program Input Start FALSE The program operates serial communications are performed with the Code Reader and then the bar code is read If Read confirmation LED that is A buzzer sounds if the read operation succeeds on the top of the Code Reader is lit green and a buzzer sounds then the read operation succeeds Head confirmation LED If the bar code shown in the document cannot be read read a bar code shown in Preliminary Examination in Section 2 Introduction Procedure of the Ultra Small Multi code Reader V400 H2 Series User s Manual Cat No Z333 When reading change nput Startto False and then change nput Startto Tr
64. r group to show Click the Compare Button Confirm that 4 mismatch is not shown in the red frame on the right 10 7 Connection Procedure Do you want to execute the transfer to the Controller You need to restart the Unit to make the transferred settings valid Do you want to restart the Unit Select the ports to restart from the following list i Hostlnkl HostLink2 Cancel Configurations and Setup Ra O Unit 0 CJ1w Sx NIME Parameter group to show Port2 Protocol macro Settings v aaau uui Parameter value Unit User settings Protocol macro Parameter name Port2 Port settings Port2 Serial communications mode Port2 Data length 8 bits Port2 Stop bits 1 bit Port2 Parity None Port2 Baud rate Default 9600bps Port2 Serial Gateway Response timeout monitoring time Port2 Serial Gateway send start timeout monitoring time Full duplex Clear On request I O refreshing Y Port2 Maximum number of bytes in protocol macro send receive data Byte Port2 Protocol macro Transmission method Port2 Clearing holding the contents of the reception buffer in fullduplex mode Port2 Link word specification data exchange timing Return to default Transfer to Controller Transfer from Controller Compare 9 4 Cancel _ _ rrr Parameter value Port2 Port settings User settings l ser settings Port2 Serial communications mode Protocol macro F rotocol mac Port2 Data length
65. requirements of any government authority Shipping Delivery Unless otherwise expressly agreed in writing by Omron a Shipments shall be by a carrier selected by Omron Omron will not drop ship except in break down situations b Such carrier shall act as the agent of Buyer and delivery to such carrier shall constitute delivery to Buyer c All sales and shipments of Products shall be FOB shipping point unless oth erwise stated in writing by Omron at which point title and risk of loss shall pass from Omron to Buyer provided that Omron shall retain a security inter est in the Products until the full purchase price is paid d Delivery and shipping dates are estimates only and e Omron will package Products as it deems proper for protection against nor mal handling and extra charges apply to special conditions Claims Any claim by Buyer against Omron for shortage or damage to the Products occurring before delivery to the carrier must be presented in writing to Omron within 30 days of receipt of shipment and include the original trans portation bill signed by the carrier noting that the carrier received the Products from Omron in the condition claimed Warranties a Exclusive Warranty Omron s exclusive warranty is that the Products will be free from defects in materials and workmanship for a period of twelve months from the date of sale by Omron or such other period expressed in writing by Omron Omron disclaims a
66. roblem click the Close Button Legend Synchronized 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 Ej 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 Terminal Unit operation settings and NX she application data x 3 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 24 13 14 15 T Connection Procedure Select Reset Controller from E the Controller Menu Aegis c Help When Mode is set to RUN Mode Reset Controller cannot be selected In this case select TEM up Mode PROGRAM Mode from VE Erro the Controller Menu to change Synchronization Ctrl M to PROGRAM mode and i Mode i perform the procedure in this step Stop Monitoring Set Reset b Forced Refreshing b MC Test Run b MC Monitor Table SD Memory Card Controller Clock Release Access Right Update CPU Unit Name Security b Clear All Memory
67. s Settings The serial communications settings are shown below Setting item Serial Communications Unit 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 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 MEN None no protocol system CO a P Precautions for Correct Use This document describes the setting procedure of the CJ1W SCUA2 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 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 mConnector configuration and pin assignment lt
68. scribed 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 i 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 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 15 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 zl Step No 00 SD RDCODE RV RDCODE 96 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 57 9
69. sed 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 program according to your application needs 9 5 Applicable Devices and Device Configuration Applicable Devices and Device Configuration 5 1 Applicable Devices The applicable devices are as follows Manufacturer Model re NJ501 11111 OMRON NJ series CPU Unit NJ301 OMRON Serial Communications Unit CJ1W SCU 2 OMRON Ultra Small Multi code Reader V400 R2CFTIIHI 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 It also does not describe the functio
70. sfer the protocol macro data to the Serial 1 2 3 4 Communications Unit Double click OMRON V400 R2 PMCR EV1 00 on the project workspace to display a tree Select Edit PC PLC Comms Settings from the PLC Menu 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 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 xi al OMRON V4DD R2 PMCR EV100 23 New Protocol Li z io Trace List gj Em MewPLC1 Offline MJ501 1500 Tools Window Help Connect to PLC Operating Mode Edit PC PLC Comms Settings Timer Clock 4 Installed 29 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 t
71. sferred 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 ata are Slave Terminal Unit operation settings and NX Unit application data Transfer To Controller Close 1 1 A confirmation dialog box is Sysmac Studio d Sp ayed Co nfi rm th at the re IS Confirm that there is no problem if the controller operation is stopped no p ro bl e m and cl ick th e Yes Mir urea 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 M IS displayed 21 A confirmation dialog boxis ENE 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 Y 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 D 7 Pumpun 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 If there is no p
72. 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 P Precautions for Correct Use This document explains the procedures for setting up the Code Reader from the factory default setting If the Code Reader was changed from the factory default setting make sure to initialize by referring to Section 8 2 Initializing the 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 Starting Tracing Start tracing with the CX Protocol 1 Select Operating Mode Run from the PLC Menu of the tci CX Protocol Disconnect from PLC Eal 5 gt exlzil Operating Mode kv Program Edit PC PLC Comms Settings Monitor Y R 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 3 Confirm that the operating mode E 383 New Protocol List was changed to the Run mode Sro A f New Protocol and double click NewPLC1 E3 12 Trace List NewPL Run 0501 1500 34 7T Connection Procedure The tree under NewPLC
73. ue again by using the same rocedure as this step 37 T 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 1 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 PLC Operating Mode Edit PC PLC Comms Settings Edit Communications Port Settings Upload Communications Port Settings Download Communications Port Settings Start Trace Stop Trace Upload Trace _ CX Protocol X 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 rc message on the trace data file 0 shown in the right figure a OP Ree KR K R eS Gur Xll d amp d 5A 0D In the example on the right the Reading Trigger command is ENEDT 0900202095099 0900 sent from the Controller and the s bar code data that are shown in us step 4 of Section 7 4 2 are val received Comm Error m Send message Hex 4B 5A 0D String ESC Z CR m Receive message Hex 34 39 31 32 33 34 35 36 37 38 39 30 34 0D String 4912345678904 CR 38 7 4 4 Checking the Receive Data T Connection Procedure Confirm that the correct data are written to the variables of the Controller with the Sysmac otudi
74. ult setting in Menu Sheet Command List in Section 4 Setting Method of the Ultra Small Multi code Reader V400 R2 Series User s Manual Cat No Z333 41 9 Program 9 Program This section describes the details on the program and the protocol macro data used in this document 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 Code Reader hereinafter referred to as the destination device and the Controller Serial 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 164 to hexadecimal data when it is necessary to distinguish between decimal and hexadecimal data e g 1000 or 101000 for decimal data and 16 03E8 for hexadecimal data etc Also to specify a specific data type the prefix data type 2 is added e g WORD 16 03E8 Additional Information
Download Pdf Manuals
Related Search
Related Contents
Cooltek Antiphon Manual de instalacion para Teledespachowin2000osuperior Copyright © All rights reserved.
Failed to retrieve file