background image

OPERATION

 

MANUAL

Cat. No. W381-E1-02

3G8F7-DRM21-E

DeviceNet PCI Board

Summary of Contents for DeviceNet 3G8F7-DRM21-E

Page 1: ...OPERATION MANUAL Cat No W381 E1 02 3G8F7 DRM21 E DeviceNet PCI Board ...

Page 2: ...3G8F7 DRM21 E DeviceNet PCI Board Operation Manual Revised July 2005 ...

Page 3: ...iv ...

Page 4: ...f the product The abbreviation Ch which appears in some displays and on some OMRON products often means word and is abbreviated Wd in documentation in this sense Visual Aids The following headings appear in the left column of the manual to help you locate different types of information Note Indicates information of particular interest for efficient and convenient opera tion of the product 1 2 3 1 ...

Page 5: ...vi ...

Page 6: ...ts 10 1 8 Preparation for Operation 11 SECTION 2 Software Installation 13 2 1 Installation Procedure 14 2 2 Installing the Board in the Computer 14 2 3 Installing the Drivers 16 2 4 Installing the Scanner SDK Software 23 2 5 DeviceNet Connections 29 SECTION 3 Using API Functions 35 3 1 Application Development Environments 36 3 2 API Functions 36 3 3 Checking Events 38 3 4 Checking for Errors 39 3 ...

Page 7: ...4 4 6 Explicit Message API Functions 79 4 7 Maintenance API Functions 89 SECTION 5 Sample Programs 99 5 1 Sample 100 5 2 Using DeviceNet Scanner Demo 100 SECTION 6 Communications Timing 109 6 1 Remote I O Communications Characteristics 110 SECTION 7 Error Processing 115 7 1 LED Indicators and Error Processing 116 7 2 Identifying Errors Detected by Functions 117 7 3 Error Log Function 119 Revision ...

Page 8: ...grams that have been provided as reference when writing pro grams for the DeviceNet PCI Board Section 7 describes communications timing in remote I O communications and message communica tions Section 8 describes troubleshooting and error processing procedures needed to identify and correct errors that can occur during DeviceNet PCI Board operation Trademarks and Copyrights COMBICON is a registere...

Page 9: ...S DETERMINED THAT THE PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR INTENDED USE OMRON DISCLAIMS ALL OTHER WARRANTIES EXPRESS OR IMPLIED LIMITATIONS OF LIABILITY OMRON SHALL NOT BE RESPONSIBLE FOR SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES LOSS OF PROFITS OR COMMERCIAL LOSS IN ANY WAY CONNECTED WITH THE PRODUCTS WHETHER SUCH CLAIM IS BASED ON CONTRACT WARRANTY NEGLIGENCE OR STRICT LIABILITY...

Page 10: ... that the uses listed may be suitable for the products Outdoor use uses involving potential chemical contamination or electrical interference or conditions or uses not described in this manual Nuclear energy control systems combustion systems railroad systems aviation systems medical equipment amusement machines vehicles safety equipment and installations subject to separate industry or government...

Page 11: ...confirm actual specifications of purchased products DIMENSIONS AND WEIGHTS Dimensions and weights are nominal and are not to be used for manufacturing purposes even when tolerances are shown PERFORMANCE DATA Performance data given in this manual is provided as a guide for the user in determining suitability and does not constitute a warranty It may represent the result of OMRON s test conditions a...

Page 12: ...must read this section and understand the information contained before attempting to set up or operate a DeviceNet PCI Board as part of a control system 1 Intended Audience xiv 2 General Precautions xiv 3 Safety Precautions xiv 4 Operating Environment Precautions xv 5 Application Precautions xvi 6 Conformance to EC Directives xvii 6 1 Applicable Directives xvii 6 2 Concepts xvii 6 3 Conformance to...

Page 13: ...ard Be sure to read this manual before operation and keep this man ual close at hand for reference during operation WARNING It is extremely important that all control products be used for the specified pur pose and under the specified conditions especially in applications that can directly or indirectly affect human life You must consult with your OMRON representative before applying an OMRON cont...

Page 14: ...ent values in memory from a Programming Device Force setting resetting bits from a Programming Device Transferring I O memory files from a Memory Card or EM file memory to the CPU Unit Transferring I O memory from a host computer or from another PLC on a network Caution Confirm safety at the destination node before transferring a program to another node or changing contents of the I O memory area ...

Page 15: ... electric shock Mounting or dismounting DeviceNet PCI Board Setting rotary switches Assembling the Boards Connecting cables or wiring the system Connecting or disconnecting the connectors Do not attempt to disassemble repair or modify any product Be sure that all the board mounting screws cable screws and cable con nector screws are tightened to the torque specified in the relevant manu als Incorr...

Page 16: ...tricity and maintain the proper storage temperature Always enable the scan list before operating the control system Check the baud rate of any new node added to an existing network to be sure that it agrees with the rest of the network 6 Conformance to EC Directives 6 1 Applicable Directives EMC Directives 6 2 Concepts EMC Directives OMRON devices that comply with EC Directives also conform to the...

Page 17: ...therefore confirm that EC directives are met for the overall machine or de vice particularly for the radiated emission requirement 10 m The following examples show means of reducing noise 1 2 3 1 Noise from the communications cable can be reduced by installing a ferrite core on the communications cable within 10 cm of the DeviceNet PCI Board 2 Keep DeviceNet communications cables as short as possi...

Page 18: ... 3 1 4 Scanner SDK Functions 4 1 4 1 I O Communications 4 1 4 2 Message Communications Function 5 1 4 3 Maintenance Functions 6 1 5 System Configuration 7 1 6 Specifications 8 1 6 1 DeviceNet PCI Board General Specifications 8 1 6 2 DeviceNet Communications Specifications 8 1 6 3 Scanner SDK Communications Specifications 9 1 6 4 Development Environment 9 1 6 5 Dimensions 10 1 7 Board Components 10...

Page 19: ...nner SDK this product is a library for developing applica tions that operate as DeviceNet Masters or Slaves It is supplied as a DLL file for a Windows environment Use the Scanner SDK to develop Master Slave applications with industry leading performance and functions PCI Board Scanner SDK 3G8F7 DRM21 E DeviceNet PCI Board Scanner DeviceNet Scanner SDK DeviceNet Configurator NetXServer for DeviceNe...

Page 20: ...te traffic status It can be used to find the source of errors and for developing DeviceNet compatible devices 1 3 Scanner SDK Functions and Features DeviceNet Communications Functions The Scanner SDK is equipped with the following communications functions I O communications functions that exchange I O data with other DeviceNet nodes DeviceNet Master function DeviceNet Slave function DeviceNet expl...

Page 21: ...ng of the Board s event queue by user applica tions Use the method most appropriate for each application 1 4 Scanner SDK Functions 1 4 1 I O Communications Master Function The Scanner SDK Master function provides two 200 byte input areas 100 words or 1 600 points and one 200 byte output area 100 words or 1 600 points for allocation to each slave I O communications are executed according to the sca...

Page 22: ... function Note Two input areas have been provided but normally only the first area is used If two connections are used at the same time then the second input area can be used 1 4 2 Message Communications Function Explicit Message Communications The DeviceNet PCI Board supports explicit message communications As a client the DeviceNet PCI Board can send explicit messages to control or monitor other...

Page 23: ...with a command from the computer Communications Cycle Time Management This function can set the communications cycle time interval between the exchange of the Slave s I O and read or clear the minimum and maximum values Error Log The DeviceNet PCI Board has an error log function that records information on errors that occur during operation The error log can be checked to pin point errors for fast...

Page 24: ...ame network Note Refer to the DeviceNet Operation Manual W267 for details on connection methods and grounding Input Slave Output Slave Output Slave Input Slave Trunk line DeviceNet Cable Drop line A cable with terminators connected on both ends Slave connected by the multi drop method Slave connected by the T branch method using a T branch Tap T branch Tap with terminator installed PCI Board A cab...

Page 25: ...perating 0 to 55 C Storage 20 to 60 C Humidity 10 to 90 with no condensation Atmosphere Must be free from corrosive gas Weight 91 g max Max number of Boards 3 Boards computer max Item Specification Communications protocol DeviceNet Connection forms Multi drop and T branch connections can be used for trunk or drop lines Terminators must be connected at both ends of the trunk line Baud rate 500 kbps...

Page 26: ...opment Environments Microsoft Visual Basic Some functions are limited Refer to Precautions when Using Other Development Environments under 3 1 Application Development Environ ments for details Borland C Builder Refer to Refer to Precautions when Using Other Development Environ ments under 3 1 Application Development Environments for details Item Specifications Supported I O connections Bit Strobe ...

Page 27: ...omponent surface will fit in one PCI bus slot LED indicators MS and NS Board ID switch Communications connector PCI interface These are the DeviceNet MS module status and NS net work status indicators When two or more DeviceNet PCI Boards are installed in a computer the computer uses the board ID settings to distinguish the Boards from each other Set unique deci mal board IDs between 0 and 7 Conne...

Page 28: ...ng ON the computer Installation on Computer Install the Board in the computer Refer to 2 2 Installing the Board in the Com puter for details Software Installation Install the DeviceNet PCI Board driver and software required to use the Board from the computer Refer to 2 3 Installing the Drivers and 2 4 Installing the Scanner SDK Software for details Writing the Program Write the programs user appli...

Page 29: ...12 Preparation for Operation Section 1 8 ...

Page 30: ...he software and how to connect the communications cables 2 1 Installation Procedure 14 2 2 Installing the Board in the Computer 14 2 3 Installing the Drivers 16 2 4 Installing the Scanner SDK Software 23 2 5 DeviceNet Connections 29 2 5 1 Attaching Connectors to the DeviceNet Cable 29 2 5 2 Connecting Communications Cables 31 ...

Page 31: ...s tab Installing the Board in the Computer Set the board ID rotary switch and install the Board in the computer Installing the Driver Install the DeviceNet PCI Board driver Installing the Scanner SDK Software Install the provided Scanner SDK software Windows NT 4 0 Windows 95 98 Me 2000 XP Check point Description Available PCI slot Make sure that the computer has an available PCI slot IRQ conflict...

Page 32: ...ons needed to install a PCI board Refer to your computer s User s Guide for details 4 Align the Board with the computer s PCI slot slide it into position and press it firmly into the slot Check that the Board s PCI interface is com pletely and evenly installed into the PCI slot Do not use much force when pressing the board it should slide into the slot with little resistance 5 Pull on the Board li...

Page 33: ...ibes driver installation for Windows 98 and XP Note The Board will not be automatically detected with Windows NT 4 0 The driver must be installed with Scanner SDK Perform the instal lation procedure described in 2 4 Installing the Scanner SDK Soft ware Windows 98 Installation 1 2 3 1 After the Board is installed in the computer and the computer is started the Board will be detected as new hardware...

Page 34: ...17 Installing the Drivers Section 2 3 3 Select Other devices as the device type and click the Next Button 4 Click the Have Disk Button to specify the hardware model ...

Page 35: ...and click the OK Button You can click the Browse Button to display a list of the actual directories and select the Win98 directory from that list The following example win dow shows the CD ROM drive as drive A 7 When the driver information has been read from the CD ROM select OMRON 3G8F7 DRM21 E PCI Adapter as shown in the following dia gram Click the Next Button ...

Page 36: ...ayed message and click the Next Button if the correct driv er is displayed The drivers will be installed 9 A completion message will be displayed when installation of the Windows 98 drivers is completed Click the Finish Button to complete the installa tion ...

Page 37: ...is installed in the computer and the computer is started the Board will be detected as new hardware and the Found New Hardware Wizard will start automatically as shown in the following diagram Select In stall from a list or specific location Advanced as shown in the following diagram and then click the Next Button 2 Insert the Scanner SDK CD ROM into the CD ROM drive ...

Page 38: ...or the search and in stall option and select the Include this location in the search option Click the Browse Button specify the CD ROM drive s Win2000 folder see following diagram and then click the Next Button Note In this example the CD ROM drive is drive F 4 The driver installation will start ...

Page 39: ...d during installation but it does not indicate an error Click the Continue Button to continue the installation 6 A completion message will be displayed when installation of the driver has been completed see diagram Click the Finish Button to complete the in stallation procedure ...

Page 40: ... or XP you must log in with Administrator rights to install the Scanner SDK Software Installation Procedure 1 2 3 1 Close all applications that are being executed 2 Insert the Scanner SDK s CD ROM disk in the CD ROM drive 3 Click the Windows Start Button and select Run 4 Input a setup in the displayed input field In this case the system disk is in drive F 5 Click the OK Button to begin the softwar...

Page 41: ... displayed click the Next Button to continue 8 The software usage license agreement will be displayed Read all of the conditions in the agreement and click the Yes Button if you agree Click the No Button if you do not agree Note Installation will stop if the No Button is clicked ...

Page 42: ...gram Files OMRON DeviceNet Scanner SDK To change the destination folder click the Browse Button and specify the desired folder If a non existent folder is specified a new folder with that name will be created automatically Click the Next Button after specifying the desired directory A window will be displayed to specify the program folder for the Start menu ...

Page 43: ... default folder select an existing folder or input a new folder name If a non existent folder is specified a new folder with that name will be created automatically Click the Next Button after specifying the desired program folder The in stallation will begin and the files will be copied The progress of the instal lation will be displayed as the installation proceeds 11 A completion message will b...

Page 44: ...l not be removed 1 2 3 1 Select Start Settings Control Panel from the Windows Start Button 2 Double click the Add Remove Programs Icon in the Control Panel 3 Select DeviceNet Scanner SDK from the list Click the Add Remove But ton Default Folder Contents Program Files OMRON DeviceNet Scanner SDK Manual The PDF file of this manual is installed Program Files OMRON DeviceNet Scanner SDK Program Execut...

Page 45: ...tton to proceed 5 Removal of the application will start 6 During removal messages asking if detected shared files are to be deleted may be displayed see diagram below If other DeviceNet applications such as the Configurator NetXServer or Analyzer are installed click the No Button Do not delete the shared files ...

Page 46: ...DeviceNet Connections Connect the DeviceNet communications cables after installing the Board This section explains how to prepare and connect the communications cables to the DeviceNet PCI Board only Refer to the DeviceNet Operation Manual W267 for details on connecting cables to Slaves 2 5 1 Attaching Connectors to the DeviceNet Cable This section explains how to attach connectors to the network ...

Page 47: ... lines to the proper length for the crimp terminal connectors being used Twist the wire strands on each of the signal and power lines so that there are no loose strands 4 Attach the crimp terminals solderless pin terminals to the lines and use the proper Crimping Tool to crimp the terminal securely Note We recommend using the following crimp terminals and crimping tools NICHIFU TC series Crimp Ter...

Page 48: ... the shield wire If the screws are not loosened sufficiently the wires cannot be inserted into the correct position They will enter the gap at the back where they cannot be secured in place 2 The connector and Board have colored stickers that match the wire col ors The wire colors can be checked against the sticker color to check that the cables are wired correctly Cable type XW4B 05C10H1 D XW4B 0...

Page 49: ...of the cable does not disconnect the connector Note The following diagram shows the dimensions of the OMRON XW4Z 00C screwdriver which is ideal for these DeviceNet connec tors 4 Align the connector to the Board s Connector and then insert the connector until it is securely set in place Firmly tighten the screws at both ends of the connector Tighten the connector mounting screws to a torque between...

Page 50: ...ctor with Attachment Screws XW4G 05C4 TF D Straight Multi drop Clamp Connector with Attachment Screws In some cases the Multi drop Connector cannot be used because there is not enough space and other Units or connectors get in the way Note 1 Before connecting the communications cables turn OFF the power supply to all PCs Slaves and communications power supplies 2 Use crimp terminals for wiring Con...

Page 51: ...t they do not become disconnected during communications 7 Do not pull on communications cables with excessive force They may be come disconnected or wires may break 8 Allow leeway so that communications cables do not have to be bent further than natural The Cables may become disconnected or wires may break if the cables are bent too far 9 Never place heavy objects on communications cables They may...

Page 52: ...the DeviceNet PCI Board 3 1 Application Development Environments 36 3 2 API Functions 36 3 3 Checking Events 38 3 3 1 Board Events 38 3 3 2 Checking for Events 38 3 4 Checking for Errors 39 3 5 Parameters 39 3 6 Using I O Communications Functions 42 3 7 Using the Explicit Message Client Function 43 3 8 Using the Explicit Message Server Function 46 3 9 Reset Function 47 3 10 Error Log Functions 48 ...

Page 53: ...functions detect interrupts from the PCI Board Two kinds of interrupts can be detected For interrupts to be detected the interrupt control register must be set for the Board to send interrupts to the computer There are two ways the computer can detect interrupts Refer to 3 3 Checking Events for detection methods Master API Functions Scan List Operation API Functions Slave information must be regis...

Page 54: ... time from when a explicit mes sage request is sent until an explicit message response is received from the remote node If the response is not be received within the response time the request is timed out The Message Monitoring Timer Service API functions are used to set the message monitoring timer for each remote device The default message time is 2 s 2 000 ms Set a longer time if the response f...

Page 55: ...ils 3 3 Checking Events 3 3 1 Board Events The following table shows the kinds of events that occur in the Scanner SDK 3 3 2 Checking for Events There are two ways to check events in the Board Use the method that is eas iest for your application and system conditions Detecting events with Windows messaging Checking events by polling Detecting Events with Windows Messaging A Windows message is sent...

Page 56: ...ction was completed normally If an error occurred detailed error information can be obtained with the Get LastError function Refer to 7 2 Identifying Errors Detected by Functions for the meaning of the error codes obtained with the GetLastError function and appropriate error processing Note GetLastError is a Windows API function Detailed error information can be obtained by calling GetLastError im...

Page 57: ...meters required for I O com munications for each node The default is no scan list API functions are required to register a scan list Slave Scan List Used with the Slave function The slave scan list registers the parameters required for nodes to operate as a slave The default is no slave scan list API functions are required to register a slave scan list Name Meaning Initial Value ...

Page 58: ...used Non volatile memory storage area Download Upload Download Upload Download Upload Download Upload Configurator SCAN_SetMessageTimerValue SCAN_GetMessageTimerValue SCAN_StoreMessageTimerValueList SCAN_LoadMessageTimerValueList SCAN_SetScanTimeValue SCAN_GetScanTimeValue SCAN_StoreScanTimeValue SCAN_LoadScanTimeValue SCAN_RemoveDevice SCAN_StoreScanlist SCAN_LoadScanlist SCAN_SetScanlist SCAN_Cl...

Page 59: ...CAN_StartScan A Check Network Status SCAN_GetScannerStatus A Get Slave Status SCAN_GetSlaveDeviceStatus Get Slave Status SCAN_GetSlaveDeviceStatus Finished Output Data to Slave SCAN_SetOutData Get Slave Data SCAN_GetInData Stop I O Communications SCAN_StopScan Disconnect from Network SCAN_Offline Close Board SCAN_Close Refresh I O data SCAN_IoRefresh Error processing Error processing Error process...

Page 60: ...ies with explicit message communications Sometimes messages cannot be received due to the status of the remote node or an error response is returned Open Board SCAN_Open Register Slave Scan List SCAN_RegisterSelfSlaveDevice Join Network SCAN_Online Check status of Slave functions SCAN_GetSlaveModeStatus Finished Get Slave Input Data SCAN_SetSlaveInData Get Slave Output Data SCAN_GetSlaveOutData St...

Page 61: ...ient Event Notification Message SCAN_UnRegClientEvtNotifyMessage Disconnect from Network SCAN_Offline Receive Client Explicit Message SCAN_ReceiveClientExplicit Close Board SCAN_Close Register Client Event Notification Message SCAN_RegClientEvtNotifyMessage Error processing Offline Normal response Retry Error response Yes Online Receive message Expected message Normal response Message client proce...

Page 62: ...rk Status SCAN_GetScannerStatus Check Response Received SCAN_PeekClientEvent Disconnect from Network SCAN_Offline Get Explicit Response Message SCAN_ReceiveClientExplicit Close Board SCAN_Close Online Response received Message client processing Wait Set Time Sleep Windows function Error processing Offline Normal response Retry Error response Yes Normal response Error processing No Initialization E...

Page 63: ...twork SCAN_Online Check Network Status SCAN_GetScannerStatus Expected message Receive Windows Message PeekMessage Windows function Server functions finished Get Explicit Request Message SCAN_ReceiveServerExplicit Server processing Send Explicit Response Message SCAN_SendServerExplicit Register Application Object Class SCAN_RegObjectClass Offline No message Online Message received Expected message ...

Page 64: ...RUE return value is returned from SCAN_Reset The next function can be executed immediately after the TRUE return value is recognized Open Board SCAN_Open Join Network SCAN_Online Check Network Status SCAN_GetScannerStatus Check Request Received SCAN_PeekServerEvent Server functions finished Server processing Send Explicit Response Message SCAN_SendServerExplicit Register application object class S...

Page 65: ...ROM is copied to RAM API functions can be used to read the error logs held in RAM When error logs are cleared the error logs held in both RAM and EEPROM are cleared Reading and Clearing Error Logs The functions listed in the following table are used to read and clear error logs stored in the Board 3 11 PC Watchdog Timer Management Function The DeviceNet PCI Board is equipped with a PC watchdog tim...

Page 66: ... PC watchdog timer and refresh the timer value If the timer isn t refreshed the function will determine that the application has stopped and will stop remote I O communications if the set time has elapsed since the last refresh Initialization End processing Open Board SCAN_Open Enable PC Watchdog Timer SCAN_EnablePCWDTTimer Close Board SCAN_Close Disable PC Watchdog Timer SCAN_EnablePCWDTTimer Ref...

Page 67: ...50 PC Watchdog Timer Management Function Section 3 11 ...

Page 68: ... Communications Service API Functions 67 4 4 3 I O Data Access Service API Functions 72 4 5 Slave Function API Functions 74 4 5 1 Slave Scan List Operation API Functions 74 4 5 2 I O Communications Service API Functions 76 4 5 3 I O Data Access Service API Functions 77 4 6 Explicit Message API Functions 79 4 6 1 Message Monitoring Timer Service API Functions 79 4 6 2 Client Message Service API Fun...

Page 69: ... SCAN_Open Opens the Board SCAN_Close Closes the Board SCAN_Online Adds the Board to the network online SCAN_Offline Removes the Board from the network offline SCAN_Reset Resets the Board API function Operation SCAN_GetIrqControl Reads the PC interrupt control register SCAN_SetIrqControl Sets the PC interrupt control register SCAN_RegIrqEvtNotifyMessage Registers the interrupt notification message...

Page 70: ...Value Writes the communications cycle time to non volatile memory SCAN_LoadScanTimeValue Loads the communications cycle time from non volatile memory API function Operation SCAN_IoRefresh Executes I O refreshing SCAN_GetInData Reads Slave input data SCAN_SetOutData Sets Slave output data SCAN_SendMasterCosToSlave Immediately sends output data to Slaves from the Master performing COS communications...

Page 71: ...e Clears the client response event notifica tion message SCAN_SendClientExplicit Sends an explicit client message SCAN_ReceiveClientExplicit Receives an explicit client message SCAN_PeekClientEvent Checks the client response event SCAN_GetClientEventLength Reads the size of the client response API function Operation SCAN_RegObjectClass Registers the object class ID SCAN_UnRegObjectClass Clears the...

Page 72: ...cleTime Reads the minimum value of the communi cations cycle time SCAN_ClearCycleTime Clears the maximum and minimum com munications cycle times API function Operation SCAN_GetErrorLog Reads the error log SCAN_ClearErrorLog Clears the error log API function Operation SCAN_EnablePCWDTTimer Enables or disables the PC watchdog timer SCAN_RefreshPCWDTTimer Refreshes the PC watchdog timer API function ...

Page 73: ...ns are stopped Remote I O Active State The Board is open participating in the DeviceNet network and performing remote I O communications 4 3 Board Management API Functions 4 3 1 Board Service API Functions Reading the DLL Version SCAN_GetVersion Application Range Unlimited Can be executed in closed status Function Reads the version information for the API DN 3G8F7 Scanner DLL that is being used Ca...

Page 74: ...ormat BOOL SCAN_lsExistCard DWORD BoardId Arguments Return Value TRUE is returned if there is a DeviceNet PCI Board with the specified board ID and FALSE is returned if there is not Detailed error information can be read with the GetLastError function Description Use to check the ID of the mounted Board Set the board ID with the Board s rotary switch Opening the Board SCAN_Open Application Range C...

Page 75: ...form any end processing for the application before executing this function Joining the Network Online SCAN_Online Application Range Offline status Function Adds the specified DeviceNet PCI Board to the network and puts it in online status Call Format BOOL SCAN_Online DWORD Handle WORD Macld WORD BaudRate Arguments Return Value TRUE is returned if the specified Board was successfully switched to on...

Page 76: ...completed properly FALSE is returned if an error occurred Detailed error information can be read with the GetLastError function Description When this function is executed the Board will be reset and all of the informa tion that has been set will be cleared It will be necessary to redo all of the procedures that were executed since the Board was opened The TRUE return value is returned when initial...

Page 77: ...IrqControl DWORD Handle BYTE IrqReg Arguments Return Value TRUE is returned if the register value was written to the specified Board suc cessfully FALSE is returned if an error occurred Detailed error information can be read with the GetLastError function Description Once the interrupt control register has been set the computer will be notified when the corresponding interrupts occur Registering a...

Page 78: ... Reading Interrupt Event SCAN_PeekIrqEvent Application Range Open status Function Reads the cause of the interrupt that occurred in the specified Board Call Format BOOL SCAN_PeekIrqEvent DWORD Handle BYTE IrqStatus Arguments Return Value TRUE is returned if the status value was read successfully from the specified Board FALSE is returned if an error occurred Detailed error information can be read ...

Page 79: ...Outsize WORD Insize Arguments Return Value TRUE is returned if the specified Slave was successfully registered in the scan list FALSE is returned if an error occurred Detailed error information can be read with the GetLastError function Description I O communications can be performed with Slaves registered in the scan list Slaves do not need to be registered in the scan list for message communica ...

Page 80: ...st Call Format BOOL SCAN_RemoveDevice DWORD Handle WORD MacId Arguments Return Value TRUE is returned if the specified Slave was successfully removed from the scan list FALSE is returned if an error occurred Detailed error information can be read with the GetLastError function Clearing the Scan List SCAN_ClearScanlist Application Range Open status Function Deletes the scan list as a group Call For...

Page 81: ... the GetLastError function Description Use SCAN_StoreScanlist to save the scan list information to non volatile memory When scan list information is loaded the previous scan list is overwritten and the newly read scan list is enabled SCAN_DEV Structure This structure defines the format of the registration information used when registering a node Master in the scan list This structure is used in th...

Page 82: ...an list No communications errors will occur either Once the Slave has been added use SCAN_ConnectSlaveDevice to start I O communi cations WORD HeatBeatTime COS cyclic send interval time ms Setting range 0x0000 0 Default 1 s 0x000A to 0xFFFF 10 to 65535 10 to 65 535 ms The actual HeatBeatTime will be the greater of the following values The value set here Communications cycle time x 2 10 ms WORD Out...

Page 83: ...BOOL SCAN_GetSlaveDeviceEx DWORD Handle WORD MacId SCAN_ DEV DeviceInfo Arguments Return Value TRUE is returned if the specified Slave information was successfully read from the scan list FALSE is returned if an error occurred Detailed error infor mation can be read with the GetLastError function FSCAN_DEV Structure This structure defines the format of the individual Slave information used when no...

Page 84: ...the speci fied Board FALSE is returned if an error occurred such as the lack of a corre sponding event Detailed error information can be read with the GetLastError function Description Performs remote I O communications with the Slaves registered in the scan list Several seconds are required after this function is called before I O communi cations will actually start Scan list operation API Functi...

Page 85: ...n error occurred Detailed error information can be read with the GetLastError function Description The default communications cycle time is automatic maximum The commu nications cycle time for the automatic setting is calculated using the formula listed in 6 1 1 Communications Cycle Time If a value shorter than the communications cycle time used under the auto matic setting is set the set value ch...

Page 86: ...s cycle time saved to non volatile memory is enabled when SCAN_LoadScanTimeValue is used Loading the Communications Cycle Time SCAN_LoadScanTimeValue Application Range Open status Function Loads the communications cycle time from non volatile memory and uses it as the set value Call Format BOOL SCAN_LoadScanTimeValue DWORD Handle Arguments Return Value TRUE is returned if the communications cycle ...

Page 87: ...t disabled mode 0xFFFF 65535 No Slaves connected 0xFF00 65280 WORD ProductType Product type Scan list disabled mode 0xFFFF 65535 No Slaves connected 0xFF00 65280 WORD ProductCode Product code Scan list disabled mode 0xFFFF 65535 No Slaves connected 0xFF00 65280 WORD ScanType WORD Output1 Size of output data 1 in bytes No Slaves connected 0xFF00 65280 WORD Input1 Size of input data 1 in bytes No Sl...

Page 88: ... communications Stopping Slave I O Communications SCAN_DisconnectSlaveDevice Application Range I O communications execution status Function Stops I O communications with the specified Slave Call Format BOOL SCAN_ConnectSlaveDevice DWORD Handle WORD MacId Arguments Return Value TRUE is returned if the I O communications with the specified Slave were stopped successfully FALSE is returned if an erro...

Page 89: ...etOutData for the required Slaves and then execute this function IO_DATA_CTL Structure This structure defines the data format used when accessing the Board s I O areas This structure is used in the SCAN_GetInData SCAN_SetOutData SCAN_GetSlaveOutData and SCAN_SetSlaveInData functions Specify the read data size or write data size under DataSize Reading Slave Input Data SCAN_GetInData Application Ran...

Page 90: ...e Board s output area will not be reflected in the most recent Slave outputs unless SCAN_IoRefresh is executed after this function Specify NULL as the input data 2 storage buffer address if only one I O con nection is used with Slaves e g when using SCAN_RegisterSlaveDevice Specify the output data size for the specified node address as the data size for the IO_DATA_CTL structure The output data to...

Page 91: ...utput1 Output data 1 Master to Slave Size bytes 0x00 to 0xC8 0 to 200 WORD Input1 Input data 1 Slave to Master Size bytes 0x00 to 0xC8 0 to 200 WORD Output2 Output data 2 Master to Slave Size bytes 0x00 to 0xC8 0 to 200 Set this area to 0 if specifying automatic selection for the scan type or specifying only one connection WORD Input2 Input data 2 Slave to Master Size bytes 0x00 to 0xC8 0 to 200 S...

Page 92: ...ORD Handle Arguments Return Value TRUE is returned if the Slave scan list was successfully deleted FALSE is returned if an error occurred Detailed error information can be read with the GetLastError function Reading a Slave Scan List SCAN_GetSelfSlaveDevice Application Range Open status Function Reads the Slave scan list information Call Format BOOL SCAN_GetSelfSlaveDevice DWORD Handle SELF_DEV De...

Page 93: ...sfully loaded from non vola tile memory FALSE is returned if an error occurred Detailed error information can be read with the GetLastError function Description Use SCAN_StoreSlaveScanlist to save the Slave scan list to non volatile memory 4 5 2 I O Communications Service API Functions Starting Master I O Communications SCAN_ConnectMasterDevice Application Range Online status Function Starts I O c...

Page 94: ...esh Application Range Open status Function Refreshes the input and output areas of the Board s Slave function with the most recent data from remote I O communications Refreshes the data in the I O areas of the Slave function Call Format BOOL SCAN_SlaveIoRefresh DWORD Handle Arguments Return Value TRUE is returned if the input and output areas of the specified Board s Slave function were successful...

Page 95: ...utput data 2 storage buffer address if only one I O con nection is used with the Slave function Specify the output data size from the Master when using the Slave function OUT size as the data size for the IO_DATA_CTL structure The output data read from the Master is stored in the data storage buffer of the IO_DATA_CTL structure Writing Master Input Data SCAN_SetSlaveInData Application Range Open s...

Page 96: ...ed if an error occurred Detailed error information can be read with the GetLastError function Description The SCAN_SetSlaveInData function must be used to set the input data before the input data is sent to the Master through a COS connection COS connections do not guarantee immediate communications Transmission may be delayed when several nodes are using COS communications 4 6 Explicit Message AP...

Page 97: ...ion Range Open status Function Saves the explicit client connection s message monitoring timer list to non vol atile memory Call Format BOOL SCAN_StoreMessageTimerValueList DWORD Handle Arguments Return Value TRUE is returned when the message monitoring timer list was successfully saved to non volatile memory FALSE is returned if an error occurred Detailed error information can be read with the Ge...

Page 98: ...UINT Msg Arguments Return Value TRUE is returned if the message registration was completed successfully FALSE is returned if an error occurred such as null values for both the thread ID and window handle Detailed error information can be read with the Get LastError function Description The client response source remote node address is sent to WPARAM with the notification message The reception resp...

Page 99: ...nes the length of the client response Call Format BOOL SCAN_GetClientEventLength DWORD Handle WORD MacId DWORD Length Arguments Return Value TRUE is returned if the size of the event was read successfully FALSE is returned if an error occurred such as the lack of a client event Detailed error information can be read with the GetLastError function Description Before getting the response message usi...

Page 100: ..._ReceiveClientExplicit has been completed Note Always enable retries when sending explicit messages because explicit mes sages may not be received depending on the type of destination Slave CLIENT_RES Structure This structure defines the format of client response explicit messages This structure is used in the SCAN_ReceiveClientExplicit function Type Name Contents DWORD MessageID Message ID Set a ...

Page 101: ... specified service data storage buffer 4 6 3 Server Message Service API Functions Registering an Object Class ID SCAN_RegObjectClass Application Range Open status Function Registers the object class implemented in the application program WORD ServiceCode Service code Stores the service code when function processing is completed WORD DataLength The size in bytes of the buffer containing the ser vic...

Page 102: ...Clears registration of an object class Call Format BOOL SCAN_UnRegObjectClass DWORD Handle WORD ClassId Arguments Return Value TRUE is returned if the object class ID was successfully deleted from the specified Board FALSE is returned if an error occurred Detailed error infor mation can be read with the GetLastError function Registering a Server Notification Message SCAN_RegServerEvtNotifyMessage ...

Page 103: ...r information can be read with the GetLastError function Checking Server Request Events SCAN_PeekServerEvent Application Range Open status Function Checks whether there is a server request event addressed to the specified class ID Call Format BOOL SCAN_PeekServerEvent DWORD Handle WORD ClassId Arguments Return Value TRUE is returned if there is a server request event addressed to the specified cla...

Page 104: ...RD Length Buffer address for receiving the request size Type Name Contents DWORD MessageID Message ID Stores the server request message ID when the function is completed WORD ServiceCode Service code Stores the service code for the server request when the function is completed WORD ClassID Class ID Specifies the class ID for the server request to be obtained before the function is called WORD Inst...

Page 105: ...re when sending the server response corresponding to the server request SERVER_RES Structure This structure defines the format of server response explicit messages This structure is used in the SCAN_SendServerExplicit function Sending a Server Explicit Message SCAN_SendServerExplicit Application Range Online status Function Sends a server response message Call Format BOOL SCAN_SendServerExplicit D...

Page 106: ...cation Range Open status Function Gets the network CAN status Call Format BOOL SCAN_GetNetworkStatus DWORD Handle WORD Status Arguments Return Value TRUE is returned if the specified Board s network status was read success fully FALSE is returned if an error occurred Detailed error information can be read with the GetLastError function Description The following table shows the location and meaning...

Page 107: ... 13 notify if errors have occurred Bit 0 is an OR of bits 1 to 13 Bit 1 turns ON if an error occurs with the Master function Bit 1 is an OR of bits 0 and 2 of the Master function status obtained using SCAN_Get MasterModeStatus Bit 3 turns ON if an error occurs with the Slave function Bit 3 is an OR of bits 2 and 3 of the Slave function status obtained using SCAN_Get SlaveModeStatus Type Name Conte...

Page 108: ...iceStatus Bits 0 and 2 indicate Master function errors When either bit 0 or 2 turn ON bit 1 of the scanner status obtained using SCAN_GetScannerStatus will turn ON Reading Slave Detailed Status SCAN_GetSlaveDeviceStatus Application Range Open status Function Gets the specified Slave s detailed status Call Format BOOL SCAN_GetSlaveDeviceStatus DWORD Handle WORD MacId WORD Status Arguments Return Va...

Page 109: ...etailed error information can be read with the GetLastError function Checking Slave Connection Established SCAN_IsDeviceConnection Application Range Open status Function Checks whether or not a connection has been established with a Slave Call Format BOOL SCAN_IsDeviceConnection DWORD Handle WORD MacId Arguments Bit Code Meaning 0 B00 Error occurred 1 B01 Verification error 2 B02 Invalid Slave 3 B...

Page 110: ...Call Format BOOL SCAN_GetMaxCycleTime DWORD Handle WORD CycleTime Arguments Return Value TRUE is returned if the maximum communications cycle time was read suc cessfully from the specified Board FALSE is returned if an error occurred Detailed error information can be read with the GetLastError function Description The maximum value after the SCAN ClearCycleTime function is executed power is turned...

Page 111: ...tion Status SCAN_GetSlaveModeStatus Application Range Open status Function Gets the Slave function status Call Format BOOL SCAN_GetSlaveModeStatus DWORD Handle WORD Status WORD MacId Arguments Return Value TRUE is returned if the specified Board s Slave function status was read suc cessfully FALSE is returned if an error occurred Detailed error information can be read with the GetLastError functio...

Page 112: ...d with the SCAN_GetErrorLog function Reading an Error Log SCAN_GetErrorLog Application Range Open status Function Reads the error log from the specified Board Call Format BOOL SCAN_GetErrorLog DWORD Handle ERROR_LOG Log Arguments Return Value TRUE is returned if the error log was read successfully from the specified Board FALSE is returned if an error occurred Detailed error information can be rea...

Page 113: ...chdog Timer Service API Functions Setting the PC WDT SCAN_EnablePCWDTTimer Application Range Open status Function Enables or disables the Board s PC watchdog timer management function Call Format BOOL SCAN_EnablePCWDTTimer DWORD Handle BOOL Enable WORD Timer Arguments Return Value TRUE is returned if the processing was completed normally FALSE is returned if an error occurred Detailed error inform...

Page 114: ...n Description When using the PC watchdog timer management function be sure to refresh the timer value with this function within the PC WDT timer value Remote I O communications will stop if the set timer value elapses before the timer value is refreshed Refer to 3 11 PC Watchdog Timer Management Function for details on the PC watchdog timer management function Type Name Contents DWORD Handle Devic...

Page 115: ...98 Maintenance API Functions Section 4 7 ...

Page 116: ...ve been provided as reference when writing programs for the DeviceNet PCI Board 5 1 Sample 100 5 2 Using DeviceNet Scanner Demo 100 5 2 1 DeviceNet Scanner Demo Functions 100 5 2 2 Usage Example for I O Communications 101 5 2 3 Usage Example for Explicit Message Communications 108 ...

Page 117: ...her is required to build the sample pro gram The sample programs are provided to show how to use the API functions they are not intended to be used as is 5 2 Using DeviceNet Scanner Demo 5 2 1 DeviceNet Scanner Demo Functions The DeviceNet Scanner Demo program performs the following functions Opens the Board Closes the Board Connects to network goes online Path Function Sample BusDELog This sample...

Page 118: ...e DeviceNet Scanner Demo program Opening the Board Use the following procedure to open the Board and prepare it for use 1 2 3 1 Select Open from the Board menu 2 The following Open Board Window will be displayed 3 Select the Board to be used and click Open 4 The specified Board will be opened and ready for use The Board number Board ID will be displayed on the status bar Creating Scan Lists Use th...

Page 119: ...he Slaves have been registered click Cancel to display the cre ated scan list in the main window as shown below Note The icons in the MAC ID column will be displayed in gray until the scan list is registered to the Board Registering Scan Lists Use the following procedure to register the created scan list to the Board 1 2 3 1 Select Set ScanList from the Board menu 2 The icons in the MAC ID column ...

Page 120: ... Board will go online i e will be connected to the DeviceNet network The status bar will indicate the online status OL at the far right and the node address will be displayed next to the Board number Note I O communications have not started yet even though the Board is online Setting Initial Output Data Use the following procedure to set the initial output data before starting I O communications 1...

Page 121: ...rocedure to start I O communications with Slaves 1 2 3 1 Select Start Cycle from the Scanner menu 2 The following Start Cycle Window will be displayed 3 Set the communications cycle time Cycle Time and click OK Specify 0 to automatically set the communications cycle time 4 I O communications will start The status will be displayed in the Status column for each Slave as shown in the following diagr...

Page 122: ...il the sta tus is displayed Refreshing and Monitoring Output and Input Data Use the following procedure to refresh output data and monitor input data for each Slave during I O communications 1 2 3 1 Select the desired Slave 2 Select I O Data from the Scanner menu 3 The I O Data Window will be displayed as shown below ...

Page 123: ...and monitoring windows can be displayed at the same time Automatically Refreshing Output Data Use the following procedure to automatically refresh output data to be sent to Slaves 1 2 3 1 Display the I O Data Window for the corresponding Slave 2 Click Increment 3 The current output data will be automatically incremented and sent ...

Page 124: ... at the set intervals Stopping I O Communications Use the following procedure to stop I O communications with Slaves 1 2 3 1 Select Stop Cycle from the Scanner menu 2 I O communications with Slaves will be stopped Disconnecting from the Network Use the following procedure to disconnect from the DeviceNet network i e go offline 1 2 3 1 Select Offline from the Scanner menu 2 The PCI Board will go of...

Page 125: ...cit response messages 1 2 3 1 Open the Board and connect online to the network Explicit request messages can be sent regardless if I O communications are being performed or are stopped 2 Select Send Explicit Message from the Scanner menu 3 The following Send Explicit Message Window will be displayed 4 Set the destination node address MAC ID and explicit request message parameters and click Send 5 ...

Page 126: ...ming This section describes communications timing in remote I O communications and message communications 6 1 Remote I O Communications Characteristics 110 6 1 1 Communications Cycle Time 110 6 1 2 More than One Master in Network 112 ...

Page 127: ...tions cycle time depends on a variety of factors such as the number of Masters in the Network and on whether or not message communi cations are being performed The following explanation is for a network with one Master For networks with two or more Masters refer to 6 1 2 More than One Master in Network Communications Cycle Time Graph The following graph plots the communications cycle time against ...

Page 128: ...r 125 kbps n Number of nodes for COS Cyclic connections that are used at the same time in one communications cycle N Number of Slaves Communications Time Slave The communications time per Slave is the time required for communications with a single Slave Use the following equations to calculate the communica tions time Slave TRT for each kind of Slave Output Slaves with less than 8 Bytes of Output ...

Page 129: ...ed into two groups for clarity in this diagram but the actual physical positions in the Network are irrelevant Next we refer to the equations introduced in 6 1 1 Communications Cycle Time and calculate the communications cycle time for each group as if they were separate Networks In a Network with two Masters the communications cycle time for the entire Network is the sum of the communications cyc...

Page 130: ...cteristics Section 6 1 Although this example shows only two Masters in the Network the total com munications cycle time for any Network can be calculated by dividing it into groups and adding the communications cycle times of all groups ...

Page 131: ...114 Remote I O Communications Characteristics Section 6 1 ...

Page 132: ...roubleshooting and error processing procedures needed to identify and correct errors that can occur during DeviceNet PCI Board operation 7 1 LED Indicators and Error Processing 116 7 2 Identifying Errors Detected by Functions 117 7 3 Error Log Function 119 ...

Page 133: ...munications stopped and message communi cations not established Communications have not been established with other nodes even though the Board is online With message communications this indicates that the local node has not sent a message to another node and that a mes sage has not been received from another node ON green ON green Remote I O or message commu nications in progress Indicates normal...

Page 134: ...r loose or broken cables Check that there are Terminating Resistors at each end of the trunk line and nowhere else in the network Check for excessive noise No change Flashing red Verification error Slave doesn t exist A Slave registered in the scan list does not exist in the network Check the following Check the communications baud rate settings in all of the nodes Check that the cable lengths tru...

Page 135: ...ing execution of the command Check the parameters and execute the function again SCAN_NOT_DOWNLOAD 0x2000000D An error occurred while downloading the communications module Check that there isn t a problem with the hardware and execute the function again SCAN_NOT_ENOUGH_BUFFER 0x20001000 There isn t enough buffer space to store the data Increase the size of the buffer SCAN_RES_NOT_RECEIVED 0x200010...

Page 136: ...d execute the function again SCAN_INVALID_IO_SIZE 0x20010043 The data size is invalid Specify a valid data size and execute the function again SCAN_INVALID_CLASS_ID 0x20010044 The specified class ID is not registered SCAN_INVALID_INSTANCE_ID 0x20010045 The instance ID is invalid Specify a valid instance ID SCAN_INVALID_ATTRIBUTE_ID 0x20010046 The attribute ID is invalid Specify a valid attribute I...

Page 137: ...ture See page 95 for details Error Code Table The following table shows the error codes that can be recorded by the error log function and the corresponding errors Refer to 7 1 LED Indicators and Error Processing for details on error processing Variable name Data type Contents BCD ErrCode WORD Error code DetailCode WORD Detail code Second BYTE Second when error occurred Minute BYTE Minute when err...

Page 138: ...guration error 03 Hex Unsupported Slave Unsupported Slave s MAC ID No 0344 Verification error 01 Hex Non existent Slave including use of the local MAC ID 02 Hex Invalid vendor ID 03 Hex Invalid product type 04 Hex Invalid product code 05 Hex Unsupported connection 06 Hex I O size mismatch 07 Hex Invalid connection path Slave s MAC ID No 0345 I O communications error 01 Hex Master function 02 Hex S...

Page 139: ...x Bits 0 to 5 Client device MAC ID Bit 6 OFF Bit 7 ON No 0601 System error Undefined Yes 0602 Memory error 01 Hex Read error 02 Hex Write error 06 Hex Error log 09 Hex Identity information 0A Hex Scan list 0B Hex Slave scan list 0C Hex Message monitoring timer list 0D Hex Communications cycle time set value Yes see note Error code Hex Error Detailed information EEPROM storage 1st byte Offset 0002h...

Page 140: ...rent consumption 8 cycle time 110 clearing 94 communications 110 communications cycle time management 6 loading 69 reading 68 93 setting 68 storing 69 D DeviceNet Scanner SDK software installing 23 uninstalling 27 DeviceNet slaves See also slaves dimensions 10 distance See also communications E EC Directives xvii errors checking 39 codes 117 120 detected by functions 117 error log 119 data 120 pro...

Page 141: ...oreMessageTimerValueList 80 PC Board interrupt service API functions ClearIrqEvent 62 SCAN_GetIrqControl 59 SCAN_PeekIrqEvent 61 SCAN_RegIrqEvtNotifyMessage 60 SCAN_SetIrqControl 60 SCAN_UnRegIrqEvtNotifyMessage 61 scan list operation master service API functions SCAN_ClearScanlist 63 SCAN_GetSlaveDevice 63 SCAN_GetSlaveDeviceEx 66 SCAN_LoadScanlist 64 SCAN_RegisterSlaveDevice 62 SCAN_RegisterSlav...

Page 142: ...e service API functions 84 slave 5 status service API functions 89 G general specifications 8 H humidity 8 I I O communications using I O communications functions 42 I O data reading 53 refreshing 53 72 77 setting 53 indicators 11 errors 116 installation DeviceNet PCI Board 14 DeviceNet Scanner SDK software 23 drivers Windows 95 16 Windows 98 16 procedure 14 software 11 13 interrupts 52 control re...

Page 143: ...ctions rotary switch See also settings S safety precautions See also precautions scan lists 52 53 clearing 63 deleting slave scan list information 75 loading 64 76 reading slave information 63 66 75 registering slaves 62 66 67 removing slaves 63 storing 64 76 scanner reading status 90 Scanner SDK software See also DeviceNet Scanner SDK software server functions See also explicit messages settings ...

Page 144: ...are requirements 9 T temperature operating storage 8 timers message monitoring 54 troubleshooting 115 U user applications writing 11 See also API functions V version reading See also functions vibration resistance 8 voltage operating voltage range 8 W weight 8 ...

Page 145: ...Index 128 ...

Page 146: ... outlines the changes made to the manual during each revision Page numbers refer to the previous version Revision code Date Revised content 1 October 2000 Original production 02 July 2005 Revisions were made throughout the manual to add information on the DeviceNet Scanner SDK and make accompanying changes Cat No W381 E1 02 Revision code ...

Page 147: ...130 Revision History ...

Page 148: ...erlands Tel 31 2356 81 300 Fax 31 2356 81 388 OMRON ELECTRONICS LLC 1 East Commerce Drive Schaumburg IL 60173 U S A Tel 1 847 843 7900 Fax 1 847 843 8568 OMRON ASIA PACIFIC PTE LTD 83 Clemenceau Avenue 11 01 UE Square Singapore 239920 Tel 65 6835 3011 Fax 65 6835 2711 OMRON CHINA CO LTD Room 2211 Bank of China Tower 200 Yin Cheng Zhong Road PuDong New Area Shanghai 200120 China Tel 86 21 5037 2222...

Page 149: ...Authorized Distributor Cat No W381 E1 02 Note Specifications subject to change without notice Printed in Japan This manual is printed on 100 recycled paper 0675128 2A ...

Reviews: