Page 4
OMRON. No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is con- stantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice.
TABLE OF CONTENTS PRECAUTIONS........xiii Intended Audience ............General Precautions .
Page 7
TABLE OF CONTENTS SECTION 4 API Function Reference ......Function Lists ............Board Status.
Page 8
Other product names and company names in this manual are trademarks or registered trademarks of their respective companies. The copyright of the DeviceNet PCI Board and related software belongs to OMRON Corporation. !WARNING Failure to read and understand the information provided in this manual may result in per- sonal injury or death, damage to the product, or product failure.
Page 9
WHETHER SUCH CLAIM IS BASED ON CONTRACT, WARRANTY, NEGLIGENCE, OR STRICT LIABILITY. In no event shall the responsibility of OMRON for any act exceed the individual price of the product on which liability is asserted. IN NO EVENT SHALL OMRON BE RESPONSIBLE FOR WARRANTY, REPAIR, OR OTHER CLAIMS...
Page 10
Application Considerations SUITABILITY FOR USE OMRON shall not be responsible for conformity with any standards, codes, or regulations that apply to the combination of products in the customer's application or use of the products. At the customer's request, OMRON will provide applicable third party certification documents identifying ratings and limitations of use that apply to the products.
Page 11
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, and the users must correlate it to actual application requirements. Actual performance is subject to the OMRON Warranty and Limitations of Liability.
Page 12
PRECAUTIONS This section provides general precautions for using the DeviceNet PCI Board and related devices. The information contained in this section is important for the safe and reliable application of the DeviceNet PCI Board. You 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.
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 control system to the abovemen- tioned applications.
Operating Environment Precautions 3. The PLC outputs may remain ON or OFF due to deposition or burning of the output relays or destruction of the output transistors. As a countermea- sure for such problems, external safety measures must be provided to en- sure safety in the system.
Application Precautions Application Precautions Observe the following precautions when using the DeviceNet PCI Board. • Install failsafe safety mechanisms to provide safety in the event of incor- rect signals that may result from signal line disconnections or power inter- ruptions. •...
Concepts EMC Directives OMRON devices that comply with EC Directives also conform to the related EMC standards so that they can be more easily built into other devices or machines. The actual products have been checked for conformity to EMC standards.
Components Conformance to EC Directives DeviceNet products that meet EC directives must be installed as follows: 1,2,3... 1. Used reinforced insulation or double insulation for the DC power supplies used for the communications power supply, internal circuit power supply, and the I/O power supplies. 2.
SECTION 1 Introduction This section provides an overview of the DeviceNet Scanner SDK functions, specifications, and system configurations. Product Configuration ......... . . DeviceNet PCI Board .
Product Configuration Section 1-1 Product Configuration The 3G8F7-DRM21-E DeviceNet PCI Board includes the PCI Board (hard- ware) and the Scanner SDK software on CD-ROM. 3G8F7-DRM21-E DeviceNet PCI Board Scanner PCI Board Scanner SDK DeviceNet PCI Board The PCI Board is used as an interface to other software, such as the DeviceNet Configurator, NetXServer, and Analyzer.
The DeviceNet Configurator is a Windows-based application that supports construction of DeviceNet networks. The Configurator is used not only for set- ting parameters and monitoring OMRON Master and Slave devices, but also for setting parameters for slaves from other manufacturers, simply by installing the EDS files.
Scanner SDK Functions Section 1-4 Use Other Vendor’s DeviceNet-compatible Devices DeviceNet is a worldwide standard, so any manufacturer’s Slave can be con- nected as long as it is DeviceNet compatible. I/O Capacity of 37,800 Bytes for Up To 63 Slaves The Scanner SDK provides 37,800 bytes for I/O allocation to up to 63 Slaves (input: 25,200 bytes;...
1. Use functions to register Masters individually or in a group. 2. Register Masters in a group by specifying a parameter file that was created with the OMRON DeviceNet Configurator. A slave scan list must be registered in the Scanner SDK for nodes to operate as Slaves.
Scanner SDK Functions Section 1-4 Maximum Number of The following table shows maximum number of connections allowed. Connections Item Specification Max. number of client connec- 63 connections (1 connection per server) tions Max. number of server con- 4 connections (1 connection per client) nections 1-4-3 Maintenance Functions...
System Configuration Section 1-5 System Configuration The following diagram shows the various device connections allowed. Input Slave Trunk line (A cable with terminators connected on both ends.) Board DeviceNet Cable Output Slave Slave connected by the multi-drop method Output Slave Slave connected by the T-branch method using a T-branch Tap T-branch Tap with...
Specifications Section 1-6 Specifications 1-6-1 DeviceNet PCI Board General Specifications Item Specifications 119.9 × 106.7 mm (W × H) Dimensions 5 VDC ± 5% (3.3 VDC is not used.) Operating voltage range Current consumption Internal power supply: 290 mA max. at 5 VDC Communications power supply: 30 mA max.
Specifications Section 1-6 1-6-3 Scanner SDK Communications Specifications Item Specifications Supported I/O connections • Bit Strobe • Polling • Cyclic • Change of State (COS) • Explicit Peer-to-peer Messaging Communications cycle time (See note.) 2 to 500 ms (Can be specified using API functions.) Number of server nodes capable of simultaneous 63 nodes communications as explicit clients...
Board Components Section 1-7 1-6-5 Dimensions The following diagram shows the dimensions of the DeviceNet PCI Board. (The height of components on the Board is within specifications for a single PCI slot.) 132.3 mm 21.6 mm 119.9 mm 14.7 mm (The height of the component surface will fit in one PCI bus slot.) Board Components...
Preparation for Operation Section 1-8 LED Indicators The following table explains the operation of the LED indicators. Indicator status Meaning Boot program initialization is in progress. Flashing green OFF Scanner firmware initialization is in progress. Lit green Waiting for online request. Lit green Flashing green A connection was established and I/O communi- cations are in progress.
SECTION 2 Software Installation This section explains how to install the DeviceNet PCI Board in a computer, how to install the software, and how to connect the communications cables. Installation Procedure ......... . . Installing the Board in the Computer.
Installation Procedure Section 2-1 Installation Procedure There procedure for installing the DeviceNet PCI Board and its software is outlined below. Installing the Board in the Computer Set the board ID (rotary switch) and install the Board in the computer. Windows NT 4.0 Windows 95, 98, Me, 2000, XP Installing the Driver Install the DeviceNet PCI Board driver.
Page 32
Installing the Board in the Computer Section 2-2 Board ID Setting Set the board ID on the DeviceNet PCI Board’s rotary switch before installing the board. Note Static electricity can damage the DeviceNet PCI Board’s electronic components. Do not touch the Board’s connector or components. Set a board ID between 0 and 7.
Installing the Drivers Section 2-3 Installing the Drivers After the Board is installed in the computer and the computer is started, the Board will be detected as new hardware (except for Windows NT computers, see note). Install the driver to ensure correct operation of the Board. The installation method and windows displayed when installing the driver will differ depending on the Windows operating system used.
Page 34
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
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
Installing the Drivers Section 2-3 8. Check the displayed 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
Installing the Drivers Section 2-3 Windows XP Installation Note You must login to Windows XP with Administrator rights to install the driver. 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 and the Found New Hardware Wizard will start automatically as shown in the following diagram.
Page 38
Installing the Drivers Section 2-3 3. Select Search for the best driver in these locations for 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.
Page 39
Installing the Drivers Section 2-3 5. The following window will be displayed 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.
Installing the Scanner SDK Software Section 2-4 Installing the Scanner SDK Software This section explains how to install the Scanner SDK’s software. Note The operations and windows will vary slightly depending upon the version of Windows being used. Windows XP is used in this exam- ple.
Page 41
Installing the Scanner SDK Software Section 2-4 7. When the setup window is 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.
Page 42
9. Select the destination folder for the installation. The following folder is the default destination: C:\Program 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.)
Page 43
Installing the Scanner SDK Software Section 2-4 10. Specify the program folder that contains as the DeviceNet Scanner SDK shortcuts in the Windows Start menu. A shortcut to the DeviceNet Scanner SDK folder is created by default: Start/Programs/DeviceNet Tools/DeviceNet Scanner SDK To change the default folder, select an existing folder or input a new folder name.
Page 44
The following table shows the folders and files that are created and installed when the default folders are used.: Default Folder Contents \Program Files\OMRON\DeviceNet Scanner The PDF file of this manual is SDK\Manual\ installed. \Program Files\OMRON\DeviceNet Scanner...
Page 45
Installing the Scanner SDK Software Section 2-4 4. A confirmation message will be displayed. Click the OK Button 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).
DeviceNet Connections Section 2-5 • If no other DeviceNet applications are installed, click the Yes Button. The shared files can be deleted. 7. A completion message will be displayed when removal of the driver has been completed (see diagram.) Click the Finish Button to complete the in- stallation procedure.
Page 47
DeviceNet Connections Section 2-5 1,2,3... 1. Remove about 30 mm of the cable sheathing, being careful not to damage the woven shielding underneath. Do not remove too much sheathing; re- moving too much of the sheathing can result in short circuits and increase the effect of noise.
Page 48
DeviceNet Connections Section 2-5 • PHOENIX CONTACT, AI-series Crimp Terminals Cable type XW4B- XW4B- XW4G- Crimping 05C10H1-D 05C4-TF-D 05C1-H1-D Tool XW4B- XW4B- XW4G- 05C10V1R0D 05C4-T-D 05C4-TF MSTB2.5/5- ST-5.08AU Using thin Signal lines AI0.25-6BU AI0.25-8YE AI0.25-8YE CRIMPFOX cables Power lines AI0.5-6WH AI0.5-10WH AI0.5-10WH Using thick Signal lines...
Page 49
Use a flat-blade screwdriver that does not taper at the end. Note The following diagram shows the dimensions of the OMRON XW4Z-00C screwdriver, which is ideal for these DeviceNet connec- tors. Side Front 0.6 mm...
Page 50
AI TWIN2 × 0.5-8WH (for thin cable) CRIMPFOX UD6 Multi-drop Connector The following OMRON Multi-drop Connectors (sold separately) can be used to make a multi-drop connection with either thin or thick cable. • XW4B-05C4-T-D Straight Multi-drop Connector without Attachment Screws •...
Page 51
DeviceNet Connections Section 2-5 4. Be extremely careful to wire all signal lines, power lines, and shielding wire correctly. 5. Tighten all set screws firmly. Tighten to a torque of between 0.25 and 0.3 N ⋅ m. 6. Wire the signal lines, power lines, and shielding wire so that they do not become disconnected during communications.
SECTION 3 Using API Functions This section provides flowcharts showing how to use the API functions as well as precautions to observe when using the API functions. Refer to this section when actually writing the applications required to use the DeviceNet PCI Board. Application Development Environments .
Application Development Environments Section 3-1 Application Development Environments Recommended Microsoft Visual C++ (Ver. 6.0 or later) Development Environment Precautions when Using Microsoft Visual Basic Other Development • API functions other than explicit messages can be used. Environments • Each API function must be declared to use the API functions from Visual Basic.
Page 54
API Functions Section 3-2 I/O Data Access Service API Functions I/O Data Access Service API functions are used to read and write I/O data. The PCI Board has two memory areas: the I/O area which can be read from or written to using functions, and the Board’s internal buffer. Only the internal buffer is used during I/O communications.
Checking Events Section 3-3 When Scanner SDK receives a request addressed to a registered object, that request is automatically stored in the response queue in the DLL file. There is a response queue for each registered object and the response is queued for as long as there is free memory on the computer.
Checking for Errors Section 3-4 Once event notification has been received by the user application, execute the corresponding event processing. For example, when an explicit client response is received, prepare a data buffer to hold the received service data and read the response. Checking Events by The event queue can be checked from a user application with the Polling...
Page 57
Parameters Section 3-5 Name Meaning Initial Value (Master) Scan List Used with the Master function. The default is no scan list. The scan list is the list of slave node addresses for I/O communi- API functions are cations. The list also registers the required to register a parameters required for I/O com- scan list.
Using I/O Communications Functions Section 3-6 Using I/O Communications Functions Procedure for Using Use the procedure shown in the following diagram to use API functions when Master Function using the Master function of the Scanner SDK. Refer to SECTION 4 API Function Reference for details on using API functions.
Using the Explicit Message Client Function Section 3-7 Procedure for Using Slave Use the procedure shown in the following diagram to use API functions when Function using the Slave function of the Scanner SDK. Refer to SECTION 4 API Func- tion Reference for details on how to use API functions.
Page 61
Using the Explicit Message Client Function Section 3-7 Using Windows Messages for Event Notification Open Board SCAN_Open( ); Join Network SCAN_Online( ); Register Client Event Notification Message SCAN_RegClientEvtNotifyMessage( ); Send Client Explicit Message SCAN_SendClientExplicit( ); Offline Check Network Status Error SCAN_GetScannerStatus( );...
Page 62
Using the Explicit Message Client Function Section 3-7 Checking Events by Polling the Event Queue Open Board. SCAN_Open( ); Join Network. SCAN_Online( ); Send Client Explicit Message. SCAN_SendClientExplicit( ); Offline Check Network Status. Error SCAN_GetScannerStatus( ); processing Online Check Response Received. SCAN_PeekClientEvent( );...
Using the Explicit Message Server Function Section 3-8 Using the Explicit Message Server Function There are two methods for detecting request messages when using the explicit message server function with Scanner SDK. Each method uses API functions in the procedures shown in the following diagram. Refer to SEC- TION 4 API Function Reference for details.
Error Log Functions Section 3-10 3-10 Error Log Functions The PCI Board provides an error log function that records and holds error information. When an error occurs, one record per error is stored in the Board’s internal RAM error log table, up to a maximum of 64 records. When the maximum number of 64 records has been stored in the error log table, the oldest record will be discarded when another error occurs and the new error data will be recorded in the table.
Page 66
PC Watchdog Timer Management Function Section 3-11 Open Board SCAN_Open(); Initialization Enable PC Watchdog Timer SCAN_EnablePCWDTTimer(); PC watchdog timer Refresh PC Watchdog Timer Value monitoring SCAN_RefreshPCWDTTimer(); Disable PC Watchdog Timer SCAN_EnablePCWDTTimer(); End processing Close Board SCAN_Close(); Note The Board’s PC watchdog timer function is disabled when the Board starts operation.
Page 67
PC Watchdog Timer Management Function Section 3-11...
SECTION 4 API Function Reference This section provides details on the various API functions in the DN 3G8F7 Scanner.DLL that are used with the DeviceNet PCI Board. Function Lists ..........Board Status.
Function Lists Section 4-1 Function Lists Board Management API Board Service API Functions Functions Use the following API functions for initialization and end processes such as reading the DLL version, reading the driver version, opening the Board, or closing the Board. API function Operation SCAN_GetVersion...
Page 70
Function Lists Section 4-1 API function Operation SCAN_GetActualSlaveDevice Reads existing Slave information. SCAN_ConnectSlaveDevice Starts I/O communications with a specified Slave. SCAN_DisconnectSlaveDevice Stops I/O communications with a specified Slave. SCAN_SetScanTimeValue Sets the communications cycle time. SCAN_GetScanTimeValue Reads the communications cycle time. SCAN_StoreScanTimeValue Writes the communications cycle time to non- volatile memory.
Page 71
Function Lists Section 4-1 Explicit Message API Message Monitoring Timer Service API Functions Functions Use the following API functions to manage the explicit message monitoring timer. API function Operation SCAN_SetMessageTimerValue Sets the message monitoring timer. SCAN_GetMessageTimerValue Reads the message monitoring timer. SCAN_StoreMessageTimerValueList Saves the message monitoring timer list to non-volatile memory.
Board Status Section 4-2 API function Operation SCAN_GetCycleTime Reads the present value of the communi- cations cycle time. SCAN_GetMaxCycleTime Reads the maximum value of the communi- cations cycle time. SCAN_GetMinCycleTime Reads the minimum value of the communi- cations cycle time. SCAN_ClearCycleTime Clears the maximum and minimum com- munications cycle times.
Board Management API Functions Section 4-3 Closed State All of the Board’s resources are disengaged in this status. Control operations cannot be performed on the Board in this status. The Board will be in this status after it is started or reset. Open State All of the Board’s resources are engaged in this status.
Page 74
Board Management API Functions Section 4-3 Function Reads the version information for the driver being used for the DeviceNet PCI Board. Call Format BOOL SCAN_GetDriverVersion(DWORD Handle, DWORD *Version) Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() DWORD* Version Buffer address for obtaining version information.
Page 75
Board Management API Functions Section 4-3 Return Value TRUE is returned if the DeviceNet PCI Board with the specified board ID was opened successfully. FALSE is returned if an error occurred or there is not a Board with the specified board ID. Detailed error information can be read with the GetLastError() function.
Board Management API Functions Section 4-3 • Send timeout A network error may occur if the other nodes in the network have a different baud rate setting. When connecting to slaves with an automatic baud rate recognition function, a transmission timeout may occur. If this error occurs, perform SCAN_Online() retry processing.
Page 77
Board Management API Functions Section 4-3 Call Format BOOL SCAN_GetIrqControl(DWORD Handle, BYTE *IrqReg) Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() BYTE* IrqReg Buffer address for obtaining interrupt control regis- ter. Return Value TRUE is returned if the register value was read from the specified Board suc- cessfully.
Page 78
Board Management API Functions Section 4-3 Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() DWORD ThreadId The thread ID to notify. (No setting = NULL) HWND hWnd Specifies the window handle to notify. (No setting = NULL) UNIT Notification message Range: WM_USER + 0x100 to WM_USER + 0x7FFF...
Master Function API Functions Section 4-4 Clearing Interrupt Status: SCAN_ClearIrqEvent() Application Range Open status Function Clears the cause of the interrupt that occurred in the specified Board. Call Format BOOL SCAN_ClearIrqEvent(DWORD Handle, BYTE IrqClrMask) Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() BYTE IrqClrMask...
Page 80
Master Function API Functions Section 4-4 The I/O data for Slaves registered using this function will be output data 1 and input data 1. Reading a Scan List Slave: SCAN_GetSlaveDevice() Application Range Open status Function Reads Slave information registered in the scan list. Call Format BOOL SCAN_GetSlaveDevice(DWORD Handle, WORD, MacId, WORD*Out- size, WORD*Insize)
Page 81
Master Function API Functions Section 4-4 Storing the Scan List: SCAN_StoreScanlist() Application Range Open status Function Saves the scan list information to non-volatile memory. Call Format BOOL SCAN_StoreScanlist(DWORD Handle) Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() Return Value TRUE is returned if the scan list was successfully written to non-volatile mem- ory.
Page 82
Master Function API Functions Section 4-4 Type Name Contents WORD ScanType Scan type Specifies the type of connection to be used. Up to two can be selected. However, COS and cyclic connections cannot be selected at the same time. Specify 0×8000 (32768) for automatic selection. Bit 5 Bit 4 Bit 3...
Page 83
Master Function API Functions Section 4-4 Note When not specifying a connection path, set the connection path size to 0 and the connection path to NULL. Registering a Slave in the Scan List (Detailed): SCAN_RegisterSlaveDeviceEx() Application Range Open status Function Registers detailed information in the scan list for a Slave.
Master Function API Functions Section 4-4 FILE_SCAN_DEV This structure defines the format of the grouped Slave information used when nodes are registered in the scan list as a group. This structure is used in the SCAN_SetScanList() function. Type Name Contents WORD DeviceCount Number of Slaves set...
Page 85
Master Function API Functions Section 4-4 Stopping Remote I/O Communications: SCAN_StopScan() Application Range I/O communications execution status Function Stops remote I/O communications. Call Format BOOL SCAN_StopScan(DWORD Handle) Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() Return Value TRUE is returned if remote I/O communications stopped normally in the spec- ified Board.
Page 86
Master Function API Functions Section 4-4 Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() WORD ScanTime Buffer address for receiving the communications cycle time Receiving range: 0x0000 (0): Automatic (Always executed at the fast- est speed.) 0x0001 to 0x01F4 (1 to 500): 1 to 500 ms Return Value TRUE is returned if the communications cycle time was read successfully.
Page 87
Master Function API Functions Section 4-4 ACTUAL_SLAVE_INFO Structure This structure stores information obtained when reading information about the Slaves connected to the network. This structure is used in the SCAN_Get ActualSlaveDevice() function. Type Name Contents WORD VendorID Vendor ID Scan list disabled mode:0xFFFF (65535) No Slaves connected:0xFF00 (65280) WORD ProductType...
Page 88
Master Function API Functions Section 4-4 Use SCAN_GetSlaveDevice() or SCAN_GetSlaveDeviceEx() to get Slave information for Slaves registered on the scan list. Starting Slave I/O Communications: SCAN_ConnectSlaveDevice() Application Range I/O communications execution status Function Starts I/O communications with the specified Slave. Call Format BOOL SCAN_ConnectSlaveDevice(DWORD Handle, WORD MacId) Arguments...
Master Function API Functions Section 4-4 4-4-3 I/O Data Access Service API Functions Refreshing Master I/O Data: SCAN_IoRefresh() Application Range Open status Function Refreshes the all Slave data in the I/O area of the Board’s Master function. Call Format BOOL SCAN_IoRefresh(DWORD Handle) Arguments Type Name...
Page 90
Master Function API Functions Section 4-4 Return Value TRUE is returned if the specified input data was read successfully. FALSE is returned if an error occurred. Detailed error information can be read with the GetLastError() function. Description The most recent Slave inputs will not be reflected in the Board’s input area unless this function is executed after SCAN_IoRefresh().
Slave Function API Functions Section 4-5 Description Before output data is sent to Slaves through a COS connection, the SCAN_SetOutData() function must be used to set the output data. COS connections do not always produce immediate communications. Trans- mission may be delayed when several nodes are using COS communications. Slave Function API Functions 4-5-1 Slave Scan List Operation API Functions...
Page 92
Slave Function API Functions Section 4-5 Registering a Slave Scan List: SCAN_RegisterSelfSlaveDevice() Application Range Open status Function Registers Slave function information in the Slave scan list. Call Format BOOL SCAN_RegisterSelfSlaveDevice(DWORD Handle, SELF_DEV* Devi- ceInfo) Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() SELF_DEV* DeviceInfo...
Slave Function API Functions Section 4-5 Storing a Slave Scan List: SCAN_StoreSlaveScanlist() Application Range Open status Function Saves the Slave scan list information to non-volatile memory. Call Format BOOL SCAN_StoreSlaveScanlist(DWORD Handle) Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() Return Value TRUE is returned if the Slave scan list was successfully written to non-volatile memory.
Slave Function API Functions Section 4-5 Slave information must be registered using SCAN_RegisterSelfSlaveDevice() to use this function. Stopping Master I/O Communications: SCAN_DisconnectMasterDevice() Application Range I/O communications execution status Function Stops I/O communications with the specified Master. Call Format BOOL SCAN_ConnectMasterDevice(DWORD Handle, WORD MacId) Arguments Type Name...
Page 95
Slave Function API Functions Section 4-5 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. Type Name Contents DWORD DataSize Amount of data in bytes Setting range: 0x00 to 0xC8 (0 to 200 bytes) BYTE Data[256]...
Explicit Message API Functions Section 4-6 Return Value TRUE is returned if the specified input data was written successfully. FALSE is returned if an error occurred. Detailed error information can be read with the GetLastError() function. Description The Board’s Slave function input area will not reflect in the most recent Master inputs unless SCAN_IoRefresh() is executed after this function.
Page 97
Explicit Message API Functions Section 4-6 Description Use this function to change the message monitoring timer value. The default value (2 s, or 2,000 ms) will be used when 0 is set as the message monitoring timer value. Reading the Message Monitoring Timer: SCAN_GetMessageTimerValue() Application Range Open status Function...
Explicit Message API Functions Section 4-6 Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() Return Value TRUE is returned when the message monitoring timer list was successfully loaded from non-volatile memory. FALSE is returned if an error occurred. Detailed error information can be read with the GetLastError() function.
Page 99
Explicit Message API Functions Section 4-6 Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() WORD MacID Desired node address Return Value TRUE is returned if the message registration was cleared successfully. FALSE is returned if an error occurred. Detailed error information can be read with the GetLastError() function.
Page 100
Explicit Message API Functions Section 4-6 CLIENT_REQ Structure This structure defines the format of client request explicit messages. It is used with the SCAN_SendClientExplicit() function. Type Name Contents DWORD MessageID Message ID Set a value to enable the application to identify the message.
Explicit Message API Functions Section 4-6 Type Name Contents 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- vice data Setting range: 0x0 to 0x228 (0 to 552) Specifies the size of the buffer for storing the service data before calling the function.
Page 102
Explicit Message API Functions Section 4-6 Call Format BOOL SCAN_RegObjectClass(DWORD Handle, WORD ClassId) Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() WORD ClassId Registers object class ID. Return Value TRUE is returned if the object class ID was successfully registered to the specified Board.
Page 103
Explicit Message API Functions Section 4-6 Type Name Contents HWND hWnd Specifies the window handle to notify. (No setting = NULL) UINT Notification message Range: WM_USER + 0x100 to WM_USER + 0x7FFF Return Value TRUE is returned if registration of the notification message was completed successfully.
Page 104
Explicit Message API Functions Section 4-6 Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() WORD ClassId Class ID of the destination for the request for which the request size is being read. DWORD* Length Buffer address for receiving the request size. Return Value TRUE is returned if the size of the event was read successfully.
Page 105
Explicit Message API Functions Section 4-6 Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() SERVER_REQ* Buffer address where the request message is stored Return Value TRUE is returned if the request message was read successfully from the specified Board.
Maintenance API Functions Section 4-7 Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() SERVER_RES* Msg Buffer address where the response message is stored Return Value TRUE is returned if the send event registration was completed successfully. FALSE is returned if an error occurred. Detailed error information can be read with the GetLastError() function.
Page 107
Maintenance API Functions Section 4-7 The status obtained using this function is not required for control, but is useful for determining whether or not a communications error originated in the net- work. Reading Scanner Status: SCAN_GetScannerStatus() Application Range Open status Function Gets the scanner status.
Page 108
Maintenance API Functions Section 4-7 Reading Master Function Status: SCAN_GetMasterModeStatus() Application Range Open status Function Gets the Master function status. Call Format BOOL SCAN_GetMasterModeStatus(DWORD Handle, WORD *Status) Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() WORD * Status Buffer address for receiving the status.
Page 109
Maintenance API Functions Section 4-7 Description The following table shows the location and meaning of the Slave device status flags. Code Meaning Error occurred Verification error Invalid Slave Vendor ID discrepancy Product type discrepancy Product code discrepancy Unsupported connection I/O size discrepancy Connection path discrepancy Not used I/O communications error...
Page 110
Maintenance API Functions Section 4-7 Return Value TRUE is returned if a connection has been established successfully with the specified device. FALSE is returned if a connection has not been opened nor- mally. Detailed error information can be read with the GetLastError() function. Reading the Current Communications Cycle Time: SCAN_GetCycleTime() Application Range Open status...
Page 111
Maintenance API Functions Section 4-7 Return Value TRUE is returned if the minimum 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 minimum value after the SCAN_CycleTime function is executed, the power is turned ON, or the Board is reset is held in the minimum communica-...
Maintenance API Functions Section 4-7 The correct value for the Master node address is stored when bit 12 or bit 13 turns ON. Bits 2 and 3 indicate Slave function errors. When either bit 2 or 3 turns ON, bit 3 of the scanner status obtained using SCAN_GetScannerStatus() turns ON.
Maintenance API Functions Section 4-7 Description Refer to 7-3 Error Log Function for details on the error log function such as the meaning of error codes. Error logs not saved to non-volatile memory are held only in open status. The error log is cleared when the Board is closed, the power turned OFF, or the Board is reset.
Page 114
Maintenance API Functions Section 4-7 Arguments Type Name Contents DWORD Handle Device handle obtained by SCAN_Open() Return Value TRUE is returned if the processing was completed normally. FALSE is returned if an error occurred. Detailed error information can be read with the GetLastError() function.
SECTION 5 Sample Programs This section describes the sample programs that have been provided as reference when writing programs for the DeviceNet PCI Board. Sample ............Using DeviceNet Scanner Demo .
Sample Section 5-1 Sample The following sample programs are extracted into the “Sample” directory when the Scanner SDK is installed. Path Function Sample\BusDELog This sample program displays the Scanner’s error log. Sample\DemoToo This sample program operates the Scanner function and exe- cutes remote I/O communications and message communica- tions.
Page 118
Using DeviceNet Scanner Demo Section 5-2 • Disconnects from the network (offline). • Creates scan lists. • Registers scan lists. • Refreshes and monitors output and input data. • Starts I/O communications. • Stops I/O communications. • Sends explicit client request messages and receives responses. 5-2-2 Usage Example for I/O Communications This section provides an example of performing I/O communications with...
Page 119
Using DeviceNet Scanner Demo Section 5-2 3. Set the Slave node address (MAC ID) and I/O size (OUT Size and IN Size). Select User Setup to specify the I/O connection, and set the connection to be used and the I/O size. 4.
Page 120
Using DeviceNet Scanner Demo Section 5-2 Connecting to the Use the following procedure to connect the Board to the DeviceNet network Network (i.e., go online). 1,2,3... 1. Select Online from the Scanner menu. 2. The following Go Online Window will be displayed. 3.
Page 121
Using DeviceNet Scanner Demo Section 5-2 4. Enter the output data to be set and click Write. Note The output data will not be sent yet. 5. Perform the above operation for all Slaves that have output data. Starting I/O Use the following procedure to start I/O communications with Slaves.
Page 122
Using DeviceNet Scanner Demo Section 5-2 Note It takes several seconds for a connection to be established (and until the sta- tus is displayed). Refreshing and Use the following procedure to refresh output data and monitor input data for Monitoring Output and each Slave during I/O communications.
Page 123
Using DeviceNet Scanner Demo Section 5-2 • Output Data • Input Data The input data will be displayed. 4. Multiple I/O data setting 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.
Page 124
Using DeviceNet Scanner Demo Section 5-2 4. Click Stop to stop automatic refresh. Changing Input Data Monitor Interval and Output Data Automatic Refresh Interval Use the following procedure to change the monitor interval for input data and the automatic refresh interval for output data. 1,2,3...
Page 125
Using DeviceNet Scanner Demo Section 5-2 5-2-3 Usage Example for Explicit Message Communications The DeviceNet Scanner Demo program has explicit message client functions. Explicit request messages can be sent to remote nodes and responses received. Use the following procedure to send explicit request messages and receive explicit response messages.
Remote I/O Communications Characteristics This section describes the characteristics of remote I/O communications when a DeviceNet PCI Board is used with OMRON Slaves. Use this section for reference when planning operations that require precise I/O timing. The equations provided here are valid under the following conditions: 1,2,3...
Page 128
Remote I/O Communications Characteristics Section 6-1 Communications Time Per Slave: This is the communications time required for a single Slave (see below). “ Σ (Communications time per Slave)” represents the total of the “Commu- nications time per Slave” for all the Slaves in the network. High-density Unit Processing Time: 3.5 [ms] This is added if there are any Slaves in the network that use at least 8 bytes...
Page 129
Remote I/O Communications Characteristics Section 6-1 Protocol overhead The input byte transmission time BYTE-IN The number of input bytes The output byte transmission time BYTE-OUT : The number of output bytes OUT : Baud rate BYTE-IN BYTE-OUT 500 kbps 0.306 ms 0.040 ms 0.036 ms 250 kbps...
Page 130
Remote I/O Communications Characteristics 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.
SECTION 7 Error Processing This section describes troubleshooting and error processing procedures needed to identify and correct errors that can occur during DeviceNet PCI Board operation. LED Indicators and Error Processing ....... Identifying Errors Detected by Functions .
LED Indicators and Error Processing Section 7-1 LED Indicators and Error Processing The DeviceNet PCI Board have an MS (Module Status) indicator that indi- cates the status of the Board itself and an NS (Network Status) indicator that indicates the status of the Network. These indicators show when an error has occurred and what type of error it is.
Identifying Errors Detected by Functions Section 7-2 Indicator status Error Probable cause and remedy Send error: The communications power supply isn’t being supplied properly. change Network power supply error Check the network power supply and network cable wiring. Send error: A transmission couldn’t be completed successfully for one of the Transmission timeout following reasons:...
Page 135
Identifying Errors Detected by Functions Section 7-2 The following table lists the error codes and the and the probable causes for those errors. Note Refer to 3-4 Checking for Errors for information on how to check errors using error codes. Error code Value Likely cause and remedy...
Error Log Function Section 7-3 Error code Value Likely cause and remedy SCAN_AUTO_SCANNING 0x20010025 The function can’t be executed because the Board is operating in disabled mode. Switch to enabled mode and execute the function again. SCAN_FIXED_SCANNING 0x20010026 The Board is already operating in disabled mode. SCAN_BUS_OFF 0x20010029 The function can’t be executed because a bus off error...
Page 137
Error Log Function Section 7-3 The error log data can be read from the Board with the SCAN_GetErrorLog() function. (See page 95 for details.) The error log can be cleared with the SCAN_ClearErrorLog() function. (See page 96 for details.) Note 1.
Page 138
Error Log Function Section 7-3 Error Error Detailed information EEPROM code storage byte byte (Hex) (Offset = 0002h) (Offset = 0003h) 0111 Service data too long 80 Hex Bits 0 to 5: Client device MAC ID Bit 6: OFF Bit 7: ON 0117 Internal buffer full 00 Hex...
Page 139
Error Log Function Section 7-3 Error Error Detailed information EEPROM code storage byte byte (Hex) (Offset = 0002h) (Offset = 0003h) 0348 Response message discarded because a 80 Hex Bits 0 to 5: new request was received Client device MAC ID Bit 6: OFF Bit 7: ON 0601...
Page 140
Index cycle time clearing API functions communications See also functions communications cycle time management loading applications reading precautions setting atmosphere storing cables DeviceNet Scanner SDK software attaching connectors to DeviceNet cables installing connecting communications cables uninstalling client functions DeviceNet slaves See also explicit messages See also slaves communications...
Page 141
Index ClearIrqEvent SCAN_GetIrqControl function descriptions SCAN_PeekIrqEvent Board service API functions SCAN_RegIrqEvtNotifyMessage SCAN_Close SCAN_SetIrqControl SCAN_GetDriverVersion SCAN_UnRegIrqEvtNotifyMessage SCAN_lsExistCard scan list operation (master service) API functions SCAN_Offline SCAN_ClearScanlist SCAN_Online SCAN_GetSlaveDevice SCAN_Open SCAN_GetSlaveDeviceEx SCAN_Reset SCAN_LoadScanlist Board service APII functions SCAN_RegisterSlaveDevice SCAN_GetVersion SCAN_RegisterSlaveDeviceEx client message service API functions SCAN_RemoveDevice RegClientEvtNotifyMessage SCAN_SetScanlist...
Page 142
Index communications refreshing communications cycle time management setting communications service API functions indicators error log errors clearing installation reading DeviceNet PCI Board error log access service API functions DeviceNet Scanner SDK software explicit messages drivers See also explicit messages Windows 95 I/O communications Windows 98 I/O data...
Page 143
Index reset See also functions network rotary switch length See also settings multiple masters offline online reading status safety precautions See also precautions scan lists clearing object class ID deleting slave scan list information clearing loading registering reading slave information operating environment registering slaves precautions...
Page 144
Index reading See also functions system hardware/software requirements temperature operating, storage timers message monitoring troubleshooting user applications writing See also API functions version reading See also functions vibration resistance voltage operating voltage range weight...
Revision History A manual revision code appears as a suffix to the catalog number on the front cover of the manual. Cat. No. W381-E1-02 Revision code The following table outlines the changes made to the manual during each revision. Page numbers refer to the previous version.
Page 148
The Netherlands 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,...
Page 149
Authorized Distributor: Cat. No. W381-E1-02 Note: Specifications subject to change without notice 0675128-2A Printed in Japan This manual is printed on 100% recycled paper.
Need help?
Do you have a question about the DeviceNet 3G8F7-DRM21-E and is the answer not in the manual?
Questions and answers