Home

User`s Manual - ICP DAS USA`s I

image

Contents

1. Active Reset Search Start All Stop All Clear All Module Firmware Network Device Device Device Remote Devices Configuration Remote Devices 1 0 Monitor Searched Devices Devices in EEPROM I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 103 5 2 6 How to read write the I O data form to the slave device 1 If users have no I O configuration in the EEPROM please refer to section 5 2 4 to add at least one I O configuration 2 Please press Start all Device button to communicate with all slave devices The warning message would pop up In this example please click Yes Total Module I mware Ver poo Master ID 9 m Set Slot No 3 Master Status 0 Baud Rate 125k v Active Ea Search Start All Stop All EA All fodule Ea Network Device Device EA T It will start communicating with all slave devices Do you really want to do this DNM_UtilityCE v2 0 fok fx Tota Module Igor Ver Boo Master ID 0 v Slot No E Master Status 0 Baud Rate 125k Start alr Reset Search Stop All Clear All M i ui Firmware Network Deyi vice Device Device Remote Devices Configuration Remote Devices 1 0 Monitor e e e Device Device Device 11 30 33 Device Name 27 pa D Type IN OUT Input Data Output Data write Get Attribute mji m cass Instf ater Loot Set Attribute fit v cass so
2. DeviceNet is the standardized network application layer optimized for factory automation It is mainly used in low volume and mid volume automation systems Some users have also implemented DeviceNet in machine control systems The main DeviceNet application fields include the applications shown below For more information please refer to www odva org e Production cell builds and tests CPUs e Dinnerware production e Beer brewery e HVAC module production e Equipment for food packing e Textile machines e Fiberglass twist machine e Trawler automation system e Sponge production plant e LCD manufacturing plant e Isolation wall manufacturing e Rolling steel door production e Overhead storage bin production e Bottling line e Pocket bread bakery e Tight manufacturing I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 8 1 3 8124W with Vendor s DeviceNet Slaves We have communicated with the following DeviceNet slaves e Allen Bradley PowerFlex series DeviceNet Inverters e BECKHOFF CX1500 B520 series DeviceNet I O modules e BECKHOFF BK5250 series DeviceNet I O modules e MKS 683 series DeviceNet exhaust throttles e MKS MFC Mass Flow Controller series DeviceNet devices e MKS DELTA II FRC Flow Ratio Controller series DeviceNet devices e MKS DC Power Generator OPT xxx series DeviceNet devices e OMRON DRT1 ID ODxx series DeviceNet I O modules e OMRON DRT2 MDxx series DeviceNet I O modules e C
3. 125k Stop All Clear All Device Device Remote Devices Configuration Remote Devices 1 0 Monitor This button can send the output data to the slave device Get Attribute fit dass o mt ter Leet Set Attribute mjii dass mt o atf 2013 06 11 105 5 3 Description of the Buttons and Fields Here is the description of the buttons in the software utility 5 3 1 Total Module Number Total Module fi This field shows the total number of the I 8124W module in the WP 8000 The utility will detect the 8124W hardware automatically when starting up If the number is 0 users can not use this software Please check the installation of the l 8124W module 5 3 2 Slot Number Slot No 3 This shows which slot the l 8124W has been plugged in The drop down list will show the entire slots which the l 8124W module plugged in the WP 8000 5 3 3 Active Module Active Module This button could activate the I 8124W hardware which is selected in the Slot No field Users should click this button before using other functions 5 3 4 Reset Firmware Reset Firmware This button can restart the firmware of the l 8124W If users have changed the baud rate or the MAC ID of the l 8124W you must restart firmware to make the modification enable 5 3 5 Search All Device Search Network This button can search all the slave devices in the network I 8124W DeviceNet Master API functions User s Manual V 1 4
4. 2013 06 11 1 General Information 1 1 DeviceNet Introduction The CAN Controller Area Network is a serial communication protocol which efficiently supports distributed real time control with a very high level of security It is an especially suited for networking intelligent devices as well as sensors and actuators within a system or sub system In CAN networks there is no addressing of subscribers or stations in the conventional sense but instead prioritized messages are transmitted DeviceNet is one kind of the network protocols based on the CAN bus and mainly used for machine control network such as textile machinery printing machines injection molding machinery or packaging machines etc DeviceNet is a low level network that provides connections between simple industrial devices sensors actuators and higher level devices controllers as shown in Figure 1 1 7565 DNM I 7241D 1 7242D CAN 8124 CAN 8224 CAN 8424 Device Layer Figure 1 1 Example of the DeviceNet network I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 6 DeviceNet is a cost effective solution to one kind application of control area network It reduces the connection wires between devices and provides rapid troubleshooting function The transfer rate can be up to 500 kbps within 100 meters bus length The transfer distance can be up to 500 meters in 125 kbps baud See Table 1 1 It allows direct peer to peer data
5. 2013 06 11 106 Note When the master is communicating with the slave devices please don t use this function to avoid breaking the connection among the slave devices 5 3 6 Start All Device Start All Device This button can start to communicate with all slave devices which have configured in the EEPROM Note If the slave device contains output channels and the initial output value is not used the master will send default value 0 to the output channels 5 3 7 Stop All Device Stop All Device This button would disconnect the communication with all slave devices which have configured in the EEPROM All remote slave devices will change to the off line state 5 3 8 Clear All Device Clear All Device This button can clear all configuration data in the EEPROM The MAC ID of the master would be reset to 0 and the baud rate reset to 125K bps 5 3 9 Write Output Data If users have started to communicate with the slave device you can edit the Output Data field to change the value to the output channel Finish the value modification and press the Write button to send the new data to the slave device I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 107 5 3 10 Change Master ID Master D wy If users want to change the MAC ID of the DeviceNet Master you can select your own setting and then press the Set button After changing the MAC ID please reset firmware the make
6. Output 8 bytes Output 7 bytes Input Area Output Area Figure 3 11 The example of the I 8124W memory mapping Example 2 ID 2 ID 9 ID 16 ID 18 ID 44 Input 4 bytes Input 7 bytes Input 5 bytes Input 0 bytes Input 7 bytes Output 8 bytes J Output 5 bytes f Output 0 bytes Output 7 bytes Output 9 bytes Input Area Output Area Figure 3 12 The example of the I 8124W memory mapping I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 37 Example 3 ID 3 ID 5 ID 8 ID 9 ID 14 Input 0 bytes Input 4 bytes Input 6 bytes Input 6 bytes Input 4 bytes Output 4 bytes J Output O bytes Output O bytes J Output 5 bytes Output 4 bytes Input Area Figure 3 13 The example of the I 8124W memory mapping Output Area User can read data from the Remote Input Area or write data to the Remote Output Area There are three functions to access these two areas 1 18124 ReadinputArea Call this function to get a bulk data from the Remote Input Area Please refer to the section 4 3 40 for more information 2 18124 WriteOutputArea Call this function to set a bulk data to the Remote Output Area Please refer to the section 4 3 41 for more information 3 18124 ReadbackOutputArea Call this function to get a bulk data from Remote Output Area Please refer to the section 4 3 42 for more information Note If users add
7. 1 Where to find the Hardware Information 0006 5 2 2 How to start using the utility sc cecssiscssivesdexivesesevesnsacsdoianes 5 2 3 How to search the slave devices siisssncaseadecuantiecveertcnes 5 2 4 How to add I O information into the EEPROM 5 2 5 How to remove I O information from the EEPROM 5 2 6 How to read write the I O data form to the slave device 5 3 DESCRIPTION OF THE BUTTONS AND FIELDS 1 sc01seeeeceeeeeeees 5 3 1 Total Module Number Ss dcstsccacstonsatigacwniadsis Mteatrdanvendeoosseaass 5 3 2 Slot 0149 b gene ee nr er Pe ee re 5 3 3 Active Mod l sesiune Eas ai 5 3 4 Reset Firmware dais oc dancsaiensnscastecdeanesaanioteaneeatredeewnastadionse 5 3 9 Search AN DSVICe i ccsscacsdisrsnarndssnseiodeusansssesseiboneumesinanes 5 3 6 Start All Device s ssesnssoessssesessessseesrtseessessessrssressessessees 5 3 7 Stop AULD SWIC wecaizscceunessisteceiscassnaastedussasrdedtectansasearanasass 5 3 8 Clear All Device ass sip chconcceetaahasiopsnes anu danoraganmnectasennt nk 5 3 9 Write Output ID AIA ix accreciceduntionsendsninniceesdndgucnddcunadatosaaars 5 3 10 Change Master MDs wscssuytarencacsncesscyssccersaeremepeanseccnees 5 3 11 Change Baud Rate asiicss xsdscnaisaccinisseraiecs Mormpendeadiceutaaas 5 3 12 Firmware Version onde ssarcideonnatacsuasintuiencentcmanidecmextarnes 5 3 13 M ster Stats sisssiiisironer spiers onir e v Rs I 8124W DeviceNet Master API functions User s Manual V 1 4
8. 2013 06 11 12 1 Add device into firmware Add the slave device s MAC ID into firmware by using API function 2 Configure connection Check the slave device s I O connection type and the I O data length While configuring the I O connection provide these parameters to configuration APIs 3 Start Device After configuring connections the master will communicate with the slave device which is triggered to active by using API function 4 Access I O data After communicating with slave devices you can access the I O data with corresponding read write functions After adding the device into the firmware the master will wait for users to get the I O configuration information Users can create the I O connections in the next step Once I O connections have been created and activated I O data can be exchanged among devices in the DeviceNet network according to the requirement of the master device The master device can access O data of the slave devices by one of the four I O connection methods All of the steps described above are implemented by API functions The API functions are not only easy to use but also providing a lot of the DeviceNet Master functions to retrieve and deliver the I O data of the slaves For more information about APIs please refer to functions description and demo programs in section 4 I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 13 1 6 8124W Firmware Characteristics The 8124W i
9. 79 4 3 33 18124 GetDevicelnfoFromScanList e Description This function will obtain the ScanList data of the specific device in the l 8124W e Syntax DWORD 18124 GetDevicelnfoFromScanList BYTE cSlot BYTE DesMACID WORD ListCount BYTE ConnectionTypeList WORD InputDataLenList WORD OutputDataLenList WORD EPRList e Parameter cSlot input The slot number which the I 8124W is plugged in DesMACID input The MAC ID number which the users want to get the information ListCount output The amount of all information items ConnectionTypeList output The list of slave s connection type 0 Explicit connection type 1 Poll connection type Bit Strobe connection type COS connection type Cyclic connection type A O N InputDataLenList output The list of slave s input length OutputDataLenList output The list of slave s output length EPRList output The list of slave s expected packet rate e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 80 4 3 34 18124 GetScanList e Description This function will get all the ScanList data in the I 8124W e Syntax DWORD 18124 GetScanList BYTE cSlot WORD TotalDevices BYTE DesMACIDList BYTE ConnectionTypeList WORD InputDataLenList WORD OutputDataLenList WORD EPR List e Parameter cSlot input The slot number which the I 8124
10. connection type Bit Strobe connection type COS connection type Cyclic connection type A WwW N InputDataLenList input The input data length of all slave devices OutputDataLenList input The output data length of all slave devices EPR_List input The EPR value of all slave devices e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 82 4 3 36 18124 ReadinputData e Description This function is used to get the data according with the produced connection path of the specific MAC ID device via the I O connection e Syntax DWORD 18124 ReadInputData BYTE cSlot BYTE DesMACID BYTE ConType WORD lOLen BYTE IODATA e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ConType input The connection type of the remote slave 0 Explicit connection type 1 Poll connection type Bit Strobe connection type COS connection type Cyclic connection type A O N lOLen output The length of the I O data In byte IODATA output The remote I O data e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 83 4 3 37 18124 WriteOutputData e Description The function will set the data according with the consumed connection path
11. device s InstancelD BYTE AttributelD input The remote slave device s AttributelD DataLen input The length of the attribute value in byte DATA input The attribute value that the users want to send e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 72 4 3 26 18124 SetAttributeW e Description The method is used to set the attribute of the specific device s instance Before calling this function you must start the device After calling this function you should execute the 18124 IsSetAttributeOK to check the response message returned from the remote slave device This function could totally complain with the old function which has the same name without the W The user could use this function instead of the 18124 SetAttribute e Syntax DWORD 18124 SetAttributeW BYTE cSlot BYTE DesMACID WORD ClassID WORD InstancelD BYTE AttributelID WORD DataLen BYTE DATA e Parameter cSlot input The slot number which the l 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ClassID input The remote slave device s ClassID VWWORD InstancelD input The remote slave device s InstancelD VWWORD AttributelD input The remote slave device s AttributelD DataLen input The length of the attribute value in byte DATA input The attribute value that the users want
12. mt o e I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 3 The users can click Remote Device I O Monitor tag to view the I O data of the slave devices 104 4 Users can press the device No to display the device information including the device name and input data DNM_UtilityGE 2 0 Total Module i Firmware Ver 2 00 slot No 5 Master Status 0 e Reset Search e Firmware Network Device Name OICPDAS CAN 8x24 Status D A Type d IN 2 OUT 2 eel Input Data Output Data The input data of the slave The output data of the slave Master ID gt Set Baud Rate 125k Set_ Stop all Clear All ice_ Device Device Remote Devices Configuration Remote Devices 1 0 Monitor When clicking the text it will shows the I O data below Get Attribute wji dass o mt o at aj Set Attribute mji v dass o mtf o e 5 Users can press Write button to send the output data to the slave device DNM_UtilityGE v2 0 Total Module ft EENE Eo Slot No E Master Status p Reset Search Firmware Network Active Module C e e Device Device Device 11 30 33 Device Name DICPDAS CAN 8x24 D 11 Type 1 IN 2 Input Data 07 The user can edit the output data field I 8124W DeviceNet Master API functions User s Manual V 1 4 Master ID 9 wy FI Baud Rate
13. or the slave device is fine I O Functions These functions help user to read or write the I O data from or to the remote slave devices I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 39 4 1 DLL Function Definition and Description All the functions provided in the 18124 eVC DLL or 18124 DotNET DLL are listed in the following table and detail information for each function is presented in the next sub section However in order to make the descriptions more simply and clearly the attributes for the both input and output parameter functions are given as input and output respectively as shown in the following table Keyword Bet parameter by user before Get the data from this parameter calling this function after calling this function mj oo Table 4 1 1 Functions Table Module Functions Function Name Description 18124_Totall8124Module Get total 8124W modules in the MCU 18124 ActiveModule Make 8124W module active 18124 CloseModule Close all the 8124W modules Get the DLL version of the 18124 eVC DL or 18124 DotNET DLL 18124 GetDLLVersion Table 4 1 2 Functions Table Firmware Functions P e e o 18124 GetFi avasid Get the version of the firmware inside the rm Se eee 8124W module Fal 18124 ResetFirmware Reset the firmware in the 8124W module I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 40 Table 4 1 3 Functions Table
14. remove any slaves information into from the l 8124W they need to reset firmware to update the modification of the data arrangement of the Remote Input Area and Remote Output Area In other word if users have called these functions below they need to call 18124 ResetFirmware to make the modification active 1 18124 AddDevice 2 18124 RemoveDevice 3 18124 AddlOConnection 4 18124 RemovelOConnection I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 38 4 Function description All the functions of the I 8124W can be separated into five groups The classifications are shown Figure 4 1 1 8124 Function Groups Figure 4 1 Five Function Groups Module Functions The functions in this group help users to find the I 8124W modules or get the information of the I 8124W The users can use these functions to configure or manage the I 8124W in the WP 8000 or XPAC 8000 series MCU Firmware Functions The functions in this group help users to operate the firmware or get the status of the firmware inside the I 8124W module Operating Functions These functions are the important operation of the DeviceNet master They help users to configure the whole network Searching Functions The functions can help user to debug the network including the wire connection the slave device s setting and etc When building the DeviceNet network users can use these functions to make sure that the network
15. which the I 8124W is plugged in Offset input The offset of the input area memory DataLen input The length in byte which the users want to write DataArray input The data pointer pointed the data written to the output data area e Return Please refer to the section 4 2 for the return code e Example I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 92 Example 1 ID 2 ID 3 ID 5 ID 8 ID 9 Input 4 bytes Input 4 bytes Input 4 bytes Input 6 bytes Input 6 bytes Output 5 bytes Output 4 bytes Output 5 bytes ff Output 8 bytes Output 7 bytes Input Area Output Area BYTE cSlot 0 Assume that the l 8124 was plugged in the slot 0 WORD Offset 0 WORD DataLen 0 BYTE DataArray 512 0 Write the whole output data of all slave devices Offset 0 Write the data from the beginning of the output area DataLen 5 4 5 8 7 The sum of all slave s output length DataArray The whole output data 18124_WriteOutputArea cSlot Offset DataLen DataArray Write the output data of the slave device which ID 5 Offset 5 4 Write the data from the beginning of the ID 5 DataLen 5 The output length of the ID 5 DataArray The output data of the ID 5 18124 WriteOutputArea cSlot Offset DataLen DataArray I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 93 4 3 45 18124 ReadbackOutputAr
16. 013 06 11 TI 4 3 31 18124 IsSearchOK e Description This function will check whether the searching process has finished or not e Syntax DWORD 18124 _IsSearchOK BYTE cSlot e Parameter cSlot input The slot number which the l 8124W is plugged in e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 78 4 3 32 18124 GetSearchedDevices e Description This function will get the information of the device which has been searched in the network e Syntax DWORD 18124 GetSearchedDevices BYTE cSlot WORD TotalDevices BYTE DesMACID BYTE Type WORD DevicelnputLen WORD DeviceOutputLen e Parameter cSlot input The slot number which the I 8124W is plugged in the PAC TotalDevices output The amount of all slave device which ware found DesMACID output The list of slave s MAC ID which ware found Type output The list of slave s connection type which ware found 0 Explicit connection type 1 Poll connection type Bit Strobe connection type COS connection type Cyclic connection type A O N DevicelnputLen output The list of slave s input length which ware found DeviceOutputLen output The list of slave s output length which ware found e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11
17. 16M Hz clock CAN Transceiver NXP 82C250 Isolation 3000 VDC for DC to DC 2500 Vrms for photo couple Specification ISO 11898 2 CAN 2 0A and CAN 2 0B 3 indicating LED RUN NS and MS Terminator resistor Switch select 1200 terminator resistor Power Consumption 2W Operating Temperature 25 75 C Storage Temperature 40 80 C Humidity 5 95 RH non condensing Support PAC ViewPAC WinPAC XPAC XPAC Atom series DeviceNet Firmware Features Programmable Master MAC ID Programmable transfer rate 125 kbps 250 kbps 500 kbps Each port support maximum nodes up to 64 Support Group 2 and UCMM functions Predefined Master Slave Connection Set The maximum Fragment number is Input Output up to 64 Support I O Operation Mode Poll Bit Strobe and Change Of State Cyclic Support Auto Scan slave device function Support on line adding and removing devices Support Auto Reconnect when the connection is broken I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 16 1 8 Block Diagram 1 The figure 1 8 shows the block diagram of the I 8124W module DPRAM The DPRAM provides the communication channel between PAC WP 8000 or XPAC 8000 and I 8124W module EEPROM The EEPROM stores the configuration information While activating the I 8120W the ScanList will be loaded from EEPROM automatically CPU This CPU is for implementing the DeviceNet protocol and commu
18. 24 Totall8124Module e Description The function can get the count of total 8124W modules in the user s WP 8000 or XPAC 8000 series MCU e Syntax DWORD 18124 Total 18124Module BYTE TotalModules BYTE SlotNoList e Parameter TotalModules output The amount of total modules SIotNoList output The list of all slot No of each modules e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 48 4 3 2 18124 ActiveModule e Description The function is used to activate the entire 8124W module The user should wait at least two seconds before calling any other I 8124W functions The DeviceNet master costs two seconds to check the duplicate MAC ID It must be called once before using the other functions of I 8124W APIs e Syntax DWORD 18124 ActiveModule BYTE cSlot e Parameter cSlot input The slot number which the I 8124W is plugged in e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 49 4 3 3 18124 CloseModule e Description The function is used to stop and close the I 8124W driver This method must be called once before exiting the user s application program e Syntax DWORD 18124 CloseModule BYTE cSlot e Parameter cSlot input The slot number which the I 8124W is plugged in e Return Please refer t
19. 4W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ConType input The remote slave device s I O connection type 0 Explicit connection type Poll connection type Bit Strobe connection type COS connection type 4 Cyclic connection type DevicelnputLen input The remote slave device s input length Byte DeviceOutputLen input The remote slave device s output length Byte EPR input The expected packet rate mSec WO N e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 66 4 3 20 18124 RemovelOConnection e Description The function is used to remove the I O connection configuration e Syntax DWORD 18124 RemovelOConnection BYTE cSlot BYTE DesMACID BYTE ConType e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ConType input The remote slave device s I O connection type 0 Explicit connection type Poll connection type Bit Strobe connection type COS connection type Cyclic connection type A O N gt e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 67 4 3 21 18124 GetAttribute e Description This function is used to send the request command to retrieve the
20. 59 18124 StartDEVi CE sc Success euccarctag ic unsaivtcacuesinacedastacspenatiswenavasewrrete dee eatin 60 M2 SCO VI esses santas vases niie EENES a REAA EEE NETTES 61 MT 2A SS yt Gish ca sascadecadiaaantdevatenasc canta teivantaiaaentuaminaannnaeraneds 62 18124 Stop AUDEVIC is soca aciraasesedaccaivaanel dd eseria aaar E AE AIENEA E aiai 63 18124 AddD viC occas ct a eee rerieri rest eaid sinea ineke r cecsaeneaavmeavonane 64 18124 R moveDeviC ssessssiiosisesseisrriisii shakateeiascmaesssieadbenstedibiaguieess 65 18124 AddIOCONNECH N sasts ed ecesstecnssdadedecsadeaea war rasene nt iiiar 66 18124 _RemovelOConnection ssc ssedescacascastechavtentavaicehcdodisronmontesbioessenicedad 67 18124 re A a coerce ene dees araxzeauncnaict pupae bat ewan eae os aaa tees 68 18124 GetAttrib te W cri excsiscncnopeahelacicoca selene rslscesnaleac ei E E S 69 18124 IsGetAttributeOK seinninn arni 70 18124 GetAttribute Value sssssescssersicssrrssicrisrricensrisiissiecesecisserieiseessiisenoe 71 18124 SetAttrib t s casccecstcareaceeraeuccannteesteoseovacesapsaseraceseennesasciqnernpiieuee 12 18124 SetAttribute W exiseseisspsicaccepicvasesags Mansvnerndussdixcucapienaressbesioonbewedusaauiedes 73 18124_IsSetAttributeOK grease snesintna tn avast ade eng Sa ane veces cadence reas 74 18124_ClearAllConfig ssiiesccscwsiosteurntezacaedieadcuvdsaaevunondutonvelesaurndasntontiunadooneisae 75 18124_SearchAllDevices n nosseneseesnesseessesessseessessessressesstssresse
21. API functions User s Manual V 1 4 2013 06 11 44 Table 4 2 1 Interpretation of the return code General Error 2 2 Return Ea Code DNMXS UnKnowError The DeviceNet has some unknown 7 errors DNMXS_BoardNotActive The l 8124W has not been activated The master MAC ID collides with other DNMXS_OnlineError slave device in the DeviceNet network The CAN port can t send message DNMXS_CANBusError Please check the baud rate or the port of the CAN bus 1003 DNMXS_Booting The I 8124W is still booting DNMXS_MACIDError The MAC ID is exceed the range 0 63 DNMXS_BaudRateError The baud rate is exceed the range 0 2 The connection type is exceed the range DNMXS_ConnectionTypeError 0 4 1053 DNMXS_DuplicMasterMACID The MAC ID is the same with the master s ID DNMXS_EEPROMError The EEPROM is out of order DNMXS_NowScanning The I 8124W is searching the slave DNMXS_ScanListError The Scan List has some errors 1057 IDNMXS DeviceExist The information of the slave device already exists DNMXS DeviceNotExist The information of the slave device a doesn t exist DNMXS_MapTableError The MapTable has some errors I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 45 Table 4 2 2 Interpretation of the return code I O Error MapTable Error Comment a The Explicit connection is not DNMXS_ExplicitNotAllocate established The Poll connection is not DNMXS_PollNotAllocate established The Strobe connect
22. AllDevice and 18124W_StartDevice Refer to the next chapter 4 Read Write any information from connected Slave Devices After communicating with all slave devices the users could read or write the I O data form the slave devices For further purpose the users also could get or set the attribute information form the slave devices The users could use software timer or thread to read the latest I O data or attribute form the remote slave devices cyclically Continue this chapter you would learn more details 5 Close l 8124W Module If the users need to close the application for any purpose it is important to close the I 8124W module by calling the 18124 CloseModule This would make the I 8124W to stop working Refer to the description in the next chapter for more details 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 29 3 1 Flow Chart for Searching Devices Before developing the DeviceNet applications users should diagnose the connection among the slave devices First users can search the slave devices in the network by using the searching function of the APIs If the connection among the master and other slave devices is good uses can find the information of each slave device in the same DeviceNet network When users have no idea about how to find the slave devices by 8124W the following steps in the figure 3 2 is good reference The users could take advantage of the searching function to check the connec
23. Devices to get the searched devices Attention that this function will terminate all communications with remote devices This function is usually used to develop or debug applications e Syntax DWORD 18124 SearchAllDevices BYTE cSlot e Parameter cSlot input The slot number which the I 8124W is plugged in e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 76 4 3 30 18124 SearchSpecificDevice e Description This function is used to retrieve some devices which specified by the users This function makes the I 8124W to start the searching process The users need to check whether the process is complete or not by calling the 18124 IsSearchOkK After completing the search process the users could call the 18124 GetSearchedDevices to get the searched devices Attention This function will terminate all communications with remote devices This function is usually used to develop or debug the applications e Syntax DWORD 18124 SearchSpecificDevice BYTE cSlot WORD ListCount BYTE DesMACIDList e Parameter cSlot input The slot number which the l 8124W is plugged in ListCount input The amount of the slave s ID DestMACIDList input The list of all slave s MAC ID e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2
24. I 8124W DeviceNet Master Module User s Manual Warranty All products manufactured by ICP DAS are warranted against defective materials for a period of one year from the date of delivery to the original purchaser Warning ICP DAS assumes no liability for damages consequent to the use of this product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for its use or for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright 2010 by ICP DAS Co LTD All rights reserved worldwide Trademark The names used for identification only may be registered trademarks of their respective companies I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 1 Revision Version Firmware Date Author Description Version 2013 Add new function 1 18124_GetAttributeW 10 06 11 Johney 2 18124 SetAttributeW 3 18124_SendExplicitMSG_W 2012 Fix function 1 3 1 7 01 04 JOPNEY ig124_ImportEEPROM 2011 Add new functions 1 1 18124_ReadlnputArea 1 2 1 6 01 10 Johney 18124 WriteOutputArea 18124 ReadbackOutputArea 2010 Update the CAN pin tl 1e 05 25 Jonney description 2010 This manual is for the l 1 0 1 0 03 28 Johney 8124W module I 8124W DeviceNet Master API function
25. OSMOS PS 7 series DeviceNet gas detectors e CELERITY UNIT IFC 125 series DeviceNet devices I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 1 4 l 8124W Architecture The I 8124W provides the way to establish DeviceNet network rapidly by Master Slave connection model It is a high performance DeviceNet master module with inside CPU This architecture of the I 8124W only needs few resources of main control unit such as WinPAC 8000 ViewPAC 8000 XPAC 8000 and really increases the work efficiency on DeviceNet network Applying the I 8124W you don t need to take care of the detail of the DeviceNet protocol The firmware implements the DeviceNet protocol to help you setting up the connection with DeviceNet slave devices easily The illustration of the idea is shown as Figure 1 2 L8124w ea A cay DeviceNet Network DeviceNet Slaves Figure 1 2 8124W architecture I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 10 1 5 DeviceNet Master Working Procedure Using the API functions users don t need to take care of the detail of the DeviceNet protocol It can reduce the complexity of users DeviceNet Master Software The firmware mainly supports the Predefined Master Slave Connection Set and UCMM functions to allow users to merge third party s DeviceNet devices into the DeviceNet network It can help users establishing the connection with DeviceNet slave devices easi
26. Operating Functions 1 2 ee rre St Set the MAC ID of the I 8124W modul 18124 SetMasterMACID j i j DeviceNet Master s MAC ID Get the MAC ID of the I 8124W dule 18124 GetMasterMACID i lt ee ite DeviceNet Master s MAC ID 3 18124 GetBaudRate Get the baud rate of the CAN bus 4 I8124 SetBaudRate Set the baud rate of the CAN bus Get the status of the I 8124W modul 18124 _GetMasterStatus DeviceNet Master s status at present me 18124 GetSlaveStatus Get the slave device s status f l 8124W will start to communicate with the 7 18124 StartDevice P f specific slave device I 8124W will stop to communicate with the 18124 StopDevice specific slave device I 8124W will start to communicate with all 18124 StartAllDevice slave devices f l 8124W will stop to communicate with all 18124_StopAllDevice slave devices Add the specific slave device s information 18124_AddDevice i the 1 8124W module DeviceNet Remove the specific slave device 18124 RemoveDevice information from the l 8124W modul DeviceNet Master 13 18124 AddlOConnection device into the DeviceNet Master Remove specific slave devices 18124 RemovelOConnection information from the l 8124W modul DeviceNet Master I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 41 Table 4 1 4 Functions Table Operating Functions 2 2 18124 GetAttribute Send the obfalned attribute command to a the slave device S
27. W is plugged in TotalDevices output The data count of all the information DestMACIDList output The MAC ID of all the slave devices in the ScanList ConnectionTypeList output The connection type of all the slave devices in the ScanList Explicit connection type Poll connection type Bit Strobe connection type COS connection type Cyclic connection type WN CO InputDataLenList output The input data length of all the slave devices in the ScanList OutputDataLenList output The output data length of all the slave devices in the ScanList EPR_List output The EPR value of all the slave devices in the ScanList e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 81 4 3 35 18124 ImportEEPROM e Description This function provides a convenient method which could write a great amount of devices information into the EEPROM e Syntax DWORD 18124 _ImportEEPROM BYTE cSlot WORD ListCount BYTE DesMACIDList BYTE ConnectionTypeList WORD InputDataLenList WORD OutputDataLenList WORD EPR_List e Parameter cSlot input The slot number which the I 8124W is plugged in ListCount input The data count of all the information DestMACIDList input The MAC ID of all the slave devices ConnectionTypeList input The connection type of all slave devices 0 Explicit connection type 1 Poll
28. attribute value of the specific device s instance Before calling this function you must start the device After calling this function you should execute the l8124 GetAttributeValue to get the response message returned from the remote slave device This old function will be removed in the future Please use the new function which is 18124 GetAttributeW e Syntax DWORD 18124 GetAttribute BYTE cSlot BYTE DesMACID BYTE ClassID BYTE InstancelD BYTE AttributelD e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ClassID input The remote slave device s ClassID BYTE InstancelD input The remote slave device s InstancelD BYTE AttributelD input The remote slave device s AttributelD e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 68 4 3 22 18124 GetAttributeW e Description This function is used to send the request command to retrieve the attribute value of the specific device s instance Before calling this function you must start the device After calling this function you should execute the l8124 GetAttributeValue to get the response message returned from the remote slave device This function could totally complain with the old function which has the same name without the W The user could use this fu
29. bytes ff Output 8 bytes Output 7 bytes Input Area Output Area BYTE cSlot 0 Assume that the l 8124 was plugged in the slot 0 WORD Offset 0 WORD DataLen 0 BYTE DataArray 512 0 Read back the whole output data of all slave devices Offset 0 Read back the data from the beginning of the output area DataLen 5 4 5 8 7 The sum of all slave s output length 18124 ReadbackOutputArea cSlot Offset DataLen DataArray DataArray The whole output data Read back the output data of the slave device which ID 5 Offset 5 4 Read back the data from the beginning of the ID 5 DataLen 5 The output length of the ID 5 18124 WriteOutputArea cSlot Offset DataLen DataArray DataArray The output data of the ID 5 I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 95 5 DNM_UtilityCE for WP 8000 The utility does not work normally if the DeviceNet master series hardware driver is not installed correctly We Ob see v AY 2 A Select the DeviceNet Master Product 1 8124 nO O s ne ml eviceNetMastenUtilitvg An Easy Way to Communicate with DeviceNet Devices An Easy Way to Communicate with DeviceNet Devices After selecting the I 8124W modules the screen shoot is shown below DNM_UtilityGE V2 0 Total Module fa Firmware Ver Master ID v Slot No E w Master Status Baud Rate v Active Reset Search Start All St
30. ccceccusseseeccesecseuuuacsesccecceceuuuaseecccseeaeunenenss 20 2 3 CONNECTOR PIN ASSIGNMENT 0 cccccsssessceccccccccsssssseeccccceceuususseeccccseceuuuasscececeseesunenenss 21 2 4 WIRE CONNECTION vicscccccccssssssceccccccccsssssseeccccceccusuasseeccesceseuuuasesccecceusuauaesceccesseaeuaenenss 22 2 INDICATOR LED sesiiseevccte ccs de sus teeees a EEE OORE 23 293A DS MII Red rrenen na a a 23 29 2 RUN LED Green srren TE E N ENE KEE a i 23 2 5 3 MS LED Yellow ceca vtas ear saa tan ose enue as 24 2 6 UPDATE THE I 8 124W S FIRMWARE vescescsccccccccccsssessceccccccccussassceccccceceuueassceccesseueuaanenss 25 3 FLOW CHART FOR DEVICENET APPLICATION 1 cccccscscssssssssssssscesees 28 3 1 FLOW CHART FOR SEARCHING DEVICES vicececcccccccccsssssssececcccccssussssececcceseueuaensececceseeanea 30 3 2 FLOW CHART FOR SLAVE CONFIGURATION Jwicccccccccsssssssececcccccssusssscceccceceueuussecscceseeaues 31 3 3 FLOW CHART FOR ON LINE ADDING REMOVING DEVICE 32 3 5 FLOW CHART FOR SETATTRIBUTE AND GETATTRIBUTE viceccccsseccccsseececcuseececcuncecs 34 3 6 FLOW CHART FOR I O CONNECTION cccccccccccccscccccecececccececececececececscecececscecscecececeeecs 35 3 7 INPUT AND OUTPUT I O DATA AREA ADVANCED OPTION sscccssssseeesseeessseeensseeesaeeess 36 4 FUNCTION DESCRIPTION ccccccscssssssssssssssssscssscssscsssssssssssssssccccccssccsssssees 39 4 1 DLL FUNCTION DEFINITION AND DESCRIPTION scssssceccccccccssssessececccccsseuaeseces
31. cessennes 40 4 2 FUNCTION RETURN CODE cscssssceccccccccssssssseccccccccussussescescccseuuuusssececeseseuuuusasececesseeaaea 44 4 3 FUNCTION DESCRIPTION cscssssceccccccccsssssceccccceccunuusesccccceceusuaessecesesessseuaeeecesceseeaaea 48 7 a ee al ae 7 a0 Cn eee ee ee ec SOT eT ee ee 48 I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 3 4 3 2 4 3 3 4 3 4 4 3 5 4 3 6 4 3 7 4 3 8 4 3 9 4 3 10 4 3 11 4 3 12 4 3 13 4 3 14 4 3 15 4 3 16 4 3 17 4 3 18 4 3 19 4 3 20 4 3 21 4 3 22 4 3 23 4 3 24 4 3 25 4 3 26 4 3 27 4 3 28 4 3 29 4 3 30 4 3 31 4 3 32 4 3 33 4 3 34 4 3 35 4 3 36 4 3 37 4 3 38 4 3 39 I8124 Acie MO GUNS sisirin sieta aE AE EES NS 49 18124 Clos Modu l sisses ranees ae aa ia RSi 50 18124 GetDLEL Versi Oisin a anoe n eE EE NEE EEEE E 51 18124 _GetFirmwareVersion vice desc vacsticaczncasisaitasstnevacixeetousauaineecivuseemneennises 52 18124 ResetFirmWat enstinn laine E Aea ANAA T EERS E EEEE 53 18124 GetMasterMACID vincristine r EE EEE EEE 54 I8124 SetM sterMACID is aussionisesdaisuniddediutnacssdalaadaundisadnaitudadvaduinb asionsadvincias 55 18124 GetB udRat s gcc acicpess encccotecsatevaacevs sawnarperaeuseu ienis aTi itid iania i a EREA SSe 56 18124 Set BAHAR AUG sionin iei a e EAA E REEE E EKE 57 IB124 GetMasterStat s versre ne sere E E E E E ES 58 18124 _GetSlaveStatus a5 o03ictnesisseaspewalsnsacnsdasesnnedasistersanentanwedpaatnndiaubsnouisaneunieae
32. ch the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 Explicit_EPR input The Expected Packet Rate Usually is 2500 e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 64 4 3 18 18124 RemoveDevice e Description This function is used to remove the specified slave device from the ScanList in the I 8124W and the information of the device in the EEPROM is erased at the same time e Syntax DWORD 18124 RemoveDevice BYTE cSlot BYTE DesMACID e Parameter cSlot input The slot number which the l 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 65 4 3 19 18124 AddlOConnection e Description This method is used to configure the I O connection of the device which has specific MAC ID The I 8124W can get set the data via the connection which is applied to the specific slave according to the produced consumed connection path of this slave device This configuration data will be saved into EEPROM of the I 8124W e Syntax DWORD 18124 AddlOConnection BYTE cSlot BYTE DesMACID BYTE ConType WORD DevicelnputLen WORD DeviceOutputLen WORD EPR e Parameter cSlot input The slot number which the I 812
33. e s ServicelD ClassID input The remote slave device s ClassID WORD InstancelD input The remote slave device s InstancelD WORD DataLen input The length of the attribute value in byte DATA input The attribute value that the users want to send e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 86 4 3 40 18124 IsExplicitMSGRespOK e Description This function is used to check whether the I 8124W has received the response message or not After checking the response message you should execute the 18124 GetExplicitMSGRespValue to get the response message returned from the remote slave device e Syntax DWORD 18124 _IsExplicitMSGRespOK BYTE cSlot BYTE DesMACID e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 87 4 3 41 18124 GetExplicitMSGRespValue e Description This function is used to get the attribute value of the specific device s instance from the remote slave device Before calling this function users should call 18124 SendExplicitdMSG_W to send request command first e Syntax DWORD 18124 GetExplicitMSGRespValue BYTE cSlot BYTE DesMACID WORD Da
34. e Acc Mask FFFFFFFF BTO FF BT1 FF Q asc CAN Status CAN Status Hex Clear Status Pause Rx Msg Buffer RGMsg cnt Ceeemces Reset Counter Tx Msg Buffer NO mode m rTR oo 01 02 os o4 os os D7 Time 100us _Enable Sys Msg V Show message on the list _ SaveToFile Send CAN Message 11 bit 1D ID Hex Len Data Hex separated by space O 29 bit 1D pe irr 8 FRRPRR PR PP PP FPP Send 2 Select the slot number which the I 8124W plugged in 1 8120W Utility Ver 1 00 Filter Setting Acc Code i Slot NO Slot 0 Acc Mask j CAN Status CAN Status Rx Msg Cnt 3 Click the Update Firmware button Firmware cm1s107 exe Modified 2010 2 11 10 4 22 Size 112182 I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 26 4 Click the Update button to select the I 8124W firmware Update SPN prawo Size 112182 3H T Execution Files exe w Firmware cm14 5 Click OK button to start downloading the firmware i8120w_utility 0K x ae an on ee J _ Download OK Update Firmware 8124V10 EXE Modified 2010 2 23 12 39 15 Size 239376 E Configuring the jumpers of I 8124W again The users should lock the flash protection jumper shown below BE I 8124W Connector I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 27 3 Flow Chart fo
35. ea Advanced Option e Description This function reads the bulk data from the output area memory It dose not change the output data located in the output area memory Users can use this function to read back a large amount of the output data but the data may be different with the real output statuses of the DeviceNet slaves It provides effective method to read bulk data in one command If the users need to read back the output data of all slave devices they need to call the 18124 ReadbackOutputData for each slave device in general By _ calling the advanced function 18124 ReadbackOutputArea the whole output data would be wrote once in this function call Please refer to the section 3 7 for more description e Syntax DWORD 18124 ReadbackOutputArea BYTE cSlot WORD Offset WORD DataLen BYTE DataArray e Parameter cSlot input The slot number which the l 8124W is plugged in Offset input The offset of the output area memory DataLen input The length in byte which the users want to read DataArray output The data pointer pointed the observed data form the output area memory e Return Please refer to the section 4 2 for the return code e Example I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 94 Example 1 ID 2 ID 3 ID 5 ID 8 ID 9 Input 4 bytes Input 4 bytes Input 4 bytes Input 6 bytes Input 6 bytes Output 5 bytes Output 4 bytes Output 5
36. end the obtained attribute command to 18124 GetAttributeW f the slave device 1 Check whether the slave has replied fo 18124 IsGetAttributeOK the getting command or not e attribute value of th 18124_GetAttributeValue oe l oi 18124 GetAttributew 18124 SetAttribute Send the comigaice attribute command to the slave device 18124 SetAttributeW Send the eonngives attribute command to the slave device Check whether the slave has replied fo 18124 IsSetAttributeOK 7 the setting command or not i3124 GeiDeviceintoFromscanii Get specific slave device s I O information form the Scan List within the l 8124 module 7 3 st Get the I O information of all slave device 18124 GetScanList form the Scan List within the l 8124 module Write the I O information of all slave 18124 ImportEEPROM devices into the EEPROM within the 8124W module within the 8124W module Check whether the I 8124W has received 18124 IsExplicitMSGRespOK the response message or not Get the attribute value of the specific 30 18124 GetExplicitMSGRespValue e device s instance I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 42 Table 4 1 5 Functions Table Searching Functions I 8124W will search the DeviceNet network to find out the I O information of all slave devices I 8124W will search the DeviceNet network to find out the I O information of specific slave devices Check whether
37. erminated at both ends by two terminal resistances as in the following figure According to the ISO 11898 2 spec each terminal resistance is 1200 or between 1080 132Q The length related resistance should have 70 mQ m Users should check the resistances of the CAN bus before they install a new CAN network Device N 120Q OZI CAN_L Figure 2 4 CAN bus network topology Moreover to minimize the voltage drop over long distances the terminal resistance should be higher than the value defined in the ISO 11898 2 The following table can be used as a good reference Bus Cable Parameters l Bus Lenath Terminal u Length Related i meter a Cross Section Resistance Resistance Q Type mQ m 0 40 70 0 25 23AWG 124 0 1 0 34mm7 22AWG 40 300 lt 60 0 34 22AWG 127 0 1 0 6mm7 20AWG 300 600 lt 40 0 5 0 6mm 150 300 20AWG 600 1K lt 20 0 75 0 8mm 150 300 18AWG Table 2 4 Relationship between cable characteristics and terminal resistance I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 22 2 5 Indicator LED NS RUN MS 1 8124W DeviceNet Master 2 5 1 NS LED Red The NS means Network Status It presents the error status of the network If some error occurs on the bus or the MAC ID of any slave conflicts with the one of thel 8124W the NS LED will flash There are two situations in NS LED 1 LED off There is no bus error or MAC ID conf
38. esessresseesees 76 18124 _SearchSpecificDevice ssnsnesseesseeeessessesseesressersrssresseesessresseeseese 71 18124 TS CARCI osni a R N E err it 78 18124 Geet ear ed De VCS ciuivcs asstacanus ss losdivsdetaatacacuaadasaeunadeiandendedacteadvoninke 79 1S 124 Get Device lnfoP rom Scam 151 cdec causes daredscedhadisesenwdadarsacenevaveessenunders 80 18124 G tScan List ronne esaeren EEn Eii EEEE AEAEE EEEE EER 81 8124 ImportEEPROM siess nieren E E REEE 82 18124 ReadlnputD ta iseseisana eais rE tr OPETE aA 83 MS HA Wy ACC ONL eAthena aeboseaacie auton cnaseade voesadne isa ces pases temnntae 84 18124 SendExplicitMS Gassion riasenie aissi aiia EEE i E EREA 85 18124 _SendExplicitMSG W essssseesessssessessrssressessrssressessrssresseesessessseeseese 86 I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 4 4 3 40 18124 IsExplicitMSGRespOK ccceeeseeeseeeeeeeeees 4 3 41 18124 GetExplicitMSGRespValue ccceeeeeeeeeee 4 3 42 18124 ReadbackOutputData cc eccecseceteceeeeeeees 4 3 43 18124 ReadInputArea Advanced Option 0 4 3 44 18124 WriteOutputArea Advanced Option 4 3 45 18124 ReadbackOutputArea Advanced Option 5 IDNM UTILITY CE FOR WP 8000 srcosscsctssnesetuswccsvescexsevsenseesesi 3 1 INTRODUCTION jszssascie absteiecsievaccatasdadeessstadaatecuadeasieralacieeadensas 3 2 TUTORIAL DEMOS wsctctced cd Sececiu Sera canenlcuatsendad ected Sonea iaaa 5 2
39. exchange between nodes in an organized and if necessary deterministic manner Master Slave connection model can be supported in the same network Therefore DeviceNet is able to facilitate all application communications based on a redefine a connection scheme However DeviceNet connection object strands as the communication path between multiple endpoints which are application objects that is needed to share data Baud rate bit s Max Bus length m 500 k 100 250 k 250 125 k 500 Table 1 1 The Baud rate and the Bus length l 8124W is a DeviceNet master device on the DeviceNet network It supports Group 2 only Server and UCMM functions to communication with slave devices It has an CAN bus communication port with the ability to cover a wide range of DeviceNet applications because of the inside CPU Besides l 8124W uses the new CAN controller Phillips SJA1000T and transceiver 82C250 which provide bus arbitration error detection with auto correction and re transmission function With WinPAC 8000 ViewPAC and XPAC system it is an economic and high performance solution of DeviceNet application There are utility tool and demos for l 8124W to help you building your application quickly Therefore it is popularly applied in the industrial automation building automation vehicle marine and embedded control network I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 7 1 2 DeviceNet Applications
40. fi Firmware Ver 2 00 Master ID o v Sot No 5 Master Status 0 Baud Rate 125k Active Reset Search Start All Stop All Clear All Module Firmware Network Device Device Device Remote Devices Configuration Remote Devices I O Monitor Devices in EEPROM a Poll Input 2 Output 2 Strobe Input 2 COS Input 2 Output 0 amp E Device 30 Add gt gt a Poll Input 2 Output 2 Strobe Input 2 COS Input 2 Output 0 em Device 33 a Poll Input 1 Output 1 Strobe Input 1 COS Input 1 Output 0 I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 101 5 2 4 How to add I O information into the EEPROM 1 Please activate your module Refer to section 5 2 2 for more information 2 Please search all devices Refer to section 5 2 3 for more information 3 Please select one of the I O connection items in the Searched Devices field and click the Add gt gt button to add the item into the EEPROM field DNM_UtilityGE v2 0 Total Module i Firmware Ver 2 00 Master ID 9 v Sot No E Master Status 0 Baud Rate 125k Active Reset Search Start All Stop All Clear All Module Firmware Network Device Device Device Remote Devices Configuration Remote Devices I O Monitor Searched Devices Devices in EEPROM amp L Device 11 Poll Input 2 Output 2 Strobe Input 2 COS Input 2 Outpu
41. ged in DestMACID input The remote slave device s MAC ID 0 63 e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 61 4 3 15 18124 StartAllDevice e Description This function is used to start to communicate with all slave devices in the ScanList e Syntax DWORD 18124 _ StartAllDevice BYTE cSlot e Parameter cSlot input The slot number which the l 8124W is plugged in e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 62 4 3 16 18124 StopAllDevice e Description This function is used to stop to communicate with all destination devices in the ScanList e Syntax DWORD 18124 StopAllDevice BYTE cSlot e Parameter cSlot input The slot number which the I 8124W is plugged in e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 63 4 3 17 18124 AddDevice e Description This function can add the slave devices into the ScanList of the l 8124W and save the information into the EEPROM Before communicating with any slave device users should call this function to add the slave device e Syntax DWORD 18124 AddDevice BYTE cSlot BYTE DesMACID WORD Explicit_EPR e Parameter cSlot input The slot number whi
42. he slave device by calling 18124 AddlOConnection Thirdly users can set the initial output value by calling 18124 WriteOutputData before starting the specific slave device If users do not initialize the output value the firmware default output value is 0 Finally users can start communicating with the slave devices to read or write I O data If the specific slave device doesn t have any output channel the firmware will start communicating with the device automatically The Figure 3 9 shows the main steps how to achieve this More functions are described in chapter 4 Call these eS BBB eeae AA A U a n A r a z functions m one time z i u m m u E u a T m annnnnnnnn Seeeeeeeeee Set the initial output value Call these functions continually OS BBR RBERB BSS RE SERRE REREEREEREEE eee eeeees Seseeeeeeam Pee PPP PPP OPE P UR U PEPE RERU ROUSE RR PRRO RRC EERE PEER EE EE Figure 3 9 I O Connection Flow Chart Note The Strobe connection doesn t support the output channel Users can not use the 18124 WriteOutputData with Strobe connection I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 35 3 7 Input and Output I O Data Area Advanced Option Here exist two memory areas Remote Input Area and Remote Output Area The input data of all DeviceNet slaves would be stored in the Remote Input Area and the output data of them would be in the Remote O
43. hich the l 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ServicelD input The remote slave device s ServicelD ClassID input The remote slave device s ClassID BYTE InstancelD input The remote slave device s InstancelD BYTE DataLen input The length of the attribute value in byte DATA input The attribute value that the users want to send e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 85 4 3 39 18124 SendExplicitMSG_W e Description This function is used to send the explicit request command to retrieve or configure the attribute value of the specific device s instance Before calling this function you must start the device After calling this function you should execute the 18124 GetExplicitMSGRespValue to get the response message returned from the remote slave device This function could totally complain with the old function which has the same name without the _W The user could use this function instead of the 18124 SendExplicitMSG e Syntax DWORD 18124 SendExplicitMSG_W BYTE cSlot BYTE DesMACID BYTE ServicelD WORD ClassID WORD InstancelD WORD DataLen BYTE DATA e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ServicelD input The remote slave devic
44. hown below As users press the button the DeviceNet master device would search the devices It takes about 30 seconds to search the whole slave devices in the network The numbers of scanned device is 64 DNM_UtilityCE v2 0 ox Total Module j1 Firmware Ver 2 00 Master 1D o v Slot No B Master Status D Baud Rate 125k v Reset Search Start All Stop All Clear All Firmware fj Network f Device Device Device Remote Devices Configuration Remote Devices 1 0 Monitor Searched Devices Devices in EEPROM ai Poll Input 2 Output 2 TE Poll Input 2 Output 2 S Devic Device 33 m Poll Input 1 Output 1 2 After finishing the searching procedure the utility shows the information of all slave devices in the Searched Devices field DNM_UtilityGE v2 0 x Total Module fr Firmware Ver oo Master ID Pw v Slot No B Master Status 0 Baud Rate 125k Active Reset Search Start All Stop All Clear All Module Firmware Network Device Device Device Remote Devices Configuration Remote Devices I O Monitor Searched Devices Devices in EEPROM Device 11 Device 11 amp L Device 30 S L Device 30 Device 33 S L Device 33 I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 100 3 Users can expand the device to find out more I O connection information of those devices DNM_UtilityGE v2 0 Total Module
45. ion is not DNMXS_BitStrobeNotAllocate established The COS connection is not 1103 DNMXS_COSNotAllocate i established The Cyclic connection is not DNMXS_CyclicNotAllocate t established The Poll connection has been DNMXS_PollAlreadyExist established The Poll connection has been DNMXS_BitStrobeAlreadyExist f established The COS connection has been 1107 DNMXS_COSAlreadyExist established The Cyclic connection has been DNMXS_CyclicAlreadyExist established jo The communication among I 8124W DNMXS_CommunicationPause jand all slave devices has been suspended I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 46 Table 4 2 3 Interpretation of the return code Slave Error SSRI DeviceNet Error Comment cy 1150 onus PNMXS_SiaveNoResp The slave has no The slave has no any response response The l 8124W is waiting for the DNMXS_WaitForSlaveResp g esse leks 1 form the slave device 1152 DNMXS DNMXS_SlaveRespError The slave The slave replied some errors some errors The output length of the I O 1153 DNMXS_OutputDataLenError connection doesn t match the device s output length The input length of the I O DNMXS_InputDataLenError connection doesn t match the device s input length The specific memory address is out DNMXS_OutofRange of range I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 47 4 3 Function Description 4 3 1 181
46. lave device Before calling this function users should call 18124 GetAttributeW to send request command first e Syntax DWORD 18124 _GetAttributeValue BYTE cSlot BYTE DesMACID WORD DataLen BYTE DATA e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 DataLen output The length of the attribute value in byte DATA output The attribute value that returned from the slave device e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 71 4 3 25 18124 SetAttribute e Description The method is used to set the attribute of the specific device s instance Before calling this function you must start the device After calling this function you should execute the 18124 IsSetAttributeOK to check the response message returned from the remote slave device This old function will be removed in the future Please use the new function which is 18124 SetAttributeW e Syntax DWORD 18124 SetAttribute BYTE cSlot BYTE DesMACID BYTE ClassID BYTE InstancelD BYTE AttributelID WORD DataLen BYTE DATA e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ClassID input The remote slave device s ClassID BYTE InstancelD input The remote slave
47. liction 2 LED twinkle Red Some error occurs The situations may be shown bellow a The I 8124W doesn t connect any slave device with CAN bus b The slave devices maybe out of order or have wrong configuration c The MAC ID collision between master and slave devices is detected 2 5 2 RUN LED Green The RUN LED presents the firmware status of I 8124W There are three situations in RUN LED 1 LED off Some error happens on the bus or in the I 8124W module The DeviceNet firmware doesn t work 2 LED twinkle Green This indicates that the CAN bus works well But there is no slave device configured in the EEPROM of I 8124W The DeviceNet firmware is waiting for configuration Users can use APIs or utility tool to add or remove the slaves in the ScanList I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 23 3 LED solid on Green This indicates that the DeviceNet firmware is running The 8124W module is communicating with all the slave devices normally 2 5 3 MS LED Yellow The MS LED shows the module status It indicates that at least one slave devices disconnecting with the I 8124W There are two situations in MS LED 1 LED off This shows that all of the slave devices communicate with the I 8124W normally 2 LED twinkle Yellow This shows that at least one slave device has problem to communicate with I 8124W It may occur if the configuration is wrong or the
48. ly The general application architecture is demonstrated as Figure 1 3 TS WP 8000 vP 25W1 PLC may i ka Sensor w Tad O A aA CAN 8224 CAN 8424 I 7241D Z JF DCON on RS 485 A I O O 7242D 7 K os Modbus RTU on RS 485 J S PP oe Figure 1 3 Application architecture I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 The firmware of I 8124W provides the DeviceNet Master mechanism to communicate with slave devices by the Predefined Master Slave Connection Set and UCMM Connection Set In the DeviceNet communication protocol can be clarify as two forms Explicit Message and I O Message Here we only provide one explicit message connection and 4 I O connections as depicted in Figure 1 4 Bit Strobe Connection I O DeviceNet Poll Connection I O Master Device Change of State Connection I O j Cyclic Connection I O Figure 1 4 DeviceNet Messaging The DeviceNet Communication Protocol is based on the concept of connections method Master should create connections with slave devices based on the command of exchanging information and I O data To establish the master control mechanism there are only 4 steps to be followed Figure 1 5 demonstrates the basic process for the DeviceNet master communication Each step is described in below 1 Z 3 4 Figure 1 5 Four steps to establish connection I 8124W DeviceNet Master API functions User s Manual V 1 4
49. make the firmware boot up completely e Syntax DWORD 18124 ResetFirmware BYTE cSlot e Parameter cSlot input The slot number which the I 8124W is plugged in e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 53 4 3 7 18124 GetMasterMACID e Description The function can get the MAC ID of the DeviceNet master I 8124W e Syntax DWORD 18124 GetMasterMACID BYTE cSlot e Parameter cSlot input The slot number which the I 8124W is plugged in e Return The MAC ID information 0 64 e Error Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 54 4 3 8 18124 SetMasterMACID e Description The function can set the MAC ID of the DeviceNet master l 8124W After calling this function users must call 18124 ResetFirmware to make the modification enabled It will save the information in the EEPROM of the 1 8124W e Syntax DWORD 18124 SetMasterMACID BYTE cSlot BYTE MasterMACID e Parameter cSlot input The slot number which the I 8124W is plugged in MasterMACID input The new MAC ID of the master 0 63 e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 55 4 3 9 18124 GetBaudRate e Description This functio
50. n can help you to get the DeviceNet baud rate information of the I 8124W e Syntax DWORD 18124 GetBaudRate BYTE cSlot e Parameter cSlot input The slot number which the l 8124W is plugged in e Return The CAN bus baud rate information in the I 8124W If the value is 0 the baud rate is 125Kbps If the value is 1 the baud rate is 250Kbps If the value is 2 the baud rate is 500Kbps e Error Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 56 4 3 10 18124 SetBaudRate e Description This function can set the DeviceNet baud rate of the I 8124W After calling this function you must call 18124 ResetFirmware to reset the firmware to make change enabled e Syntax DWORD 18124 SetBaudRate BYTE cSlot BYTE BaudRate e Parameter cSlot input The slot number which the l 8124W is plugged in BaudRate input The new baud rate value 0 125K bps 1 250K bps 2 500K bps e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 57 4 3 11 18124 GetMasterStatus Description The function is used to obtain the firmware status inside the I 8124W The users can call this function to make sure that the DeviceNet master is online successfully Syntax DWORD 18124 GetMasterStatus BYTE cSlot Parameter cSlot input The
51. nction instead of the 18124 GetAttribute e Syntax DWORD 18124 GetAttributeW BYTE cSlot BYTE DesMACID WORD ClassID WORD InstancelD BYTE AttributelD e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ClassID input The remote slave device s ClassID WWORD InstancelD input The remote slave device s InstancelD VWWORD AttributelD input The remote slave device s AttributelD e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 69 4 3 23 18124 IsGetAttributeOK e Description This function is used to check whether the I 8124W has received the response message or not After checking the response message you should execute the 18124 GetAttributeValue to get the response message returned from the remote slave device e Syntax DWORD 18124 IsGetAttributeOK BYTE cSlot BYTE DesMACID e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 70 4 3 24 18124 GetAttributeValue e Description This function is used to get the attribute value of the specific device s instance from the remote s
52. nicating with the main control unit such as WP 8000 or XP 8000 CAN Controller The CAN controller is used for sending and receiving the CAN messages l 8120W provides the photo isolation function between CAN controller and CAN bus Inside I 8124W Module Photo Isolated Figure 1 8 Block diagram of the I 8124W module I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 17 1 9 Product Check List In addition to this manual the package includes the following items I 8124W module Software CD ROM Quick Start manual Release Note A 00 Bo It is recommended that users should read the release note first All of the important information needed will be provided in the release note as follows o Where you can find the software driver utility and demo programs o How to install software amp utility o Where is the diagnostic program o FAQ s and answers Attention If any of these items are missing or damaged please contact your local field agent Keep aside the shipping materials and carton in case you want to ship or store the product in the future 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 18 2 Hardware Configuration This section will describe the hardware settings of the I 8124W This information includes the wire connection and terminal resistance configuration 2 1 Board Layout Cee amma Y JP2 JP3 E F Ea l 8124W Connector Fig
53. nn unnn nnnnnn Figure 3 6 On line Add Device Flow Chart I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 32 2 On line Removing Devices eS BBB nnnnnn BERBERS EEEE SS et eaeunnuuan Seseeeeean tnnnnnnnnnn annnnnnnnnt Figure 3 7 On line Remove Device Flow Chart I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 33 3 5 Flow Chart for SetAttribute and GetAttribute Users can set or get the DeviceNet properties of the slaves via the DeviceNet network I 8124W provides these functions to set or get these properties easily The steps are shown in Figure 3 8 EERBRB BRR EESE BEB EB EBB SBS E ED eonnnue eS SS SSCS ESSSEEEESSEES BEB EB EBB RBBB EBSEEE a ol a a E a a a a a n a 5 n m n a 5 m n 2 od nnna BRB RB RBBB ERB Ee o o tannuunnnununnnnnunnnnnnunnnunnnununnuuuunuuuunuununnt Figure 3 8 SetAttribute and GetAttribute Flow Chart I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 34 3 6 Flow Chart for I O Connection The users can read or write device s I O data via the DeviceNet I O connections such as Poll Strobe COS and Cyclic connection There are four important steps to read and write the I O data Firstly users should know the device s I O input length in Byte and output length in Byte Secondly users should set these two parameters to t
54. o the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 50 4 3 4 18124 GetDLLVersion e Description The function can obtain the version information of 18124 eVC DLL or 18124 DotNET DLL e Syntax DWORD 18124 GetDLLVersion void e Parameter None e Return The DLL version information For example If 100 hex is returned it means DLL version is 1 00 e Error Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 51 4 3 5 18124 GetFirmwareVersion e Description The function can obtain the version information of the firmware inside the 8124W module e Syntax DWORD 18124 GetFirmwareVersion BYTE cSlot e Parameter cSlot input The slot number which the I 8124W is plugged in e Return The firmware version information For example If 100 hex is returned it means firmware version is 1 00 e Error Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 52 4 3 6 18124 ResetFirmware e Description The function is used to reset the I 8124W firmware When users have changed the baud rate of CAN bus or changed the Master s MAC ID the function must be called to make the modification enable After calling this function users should wait for 2 seconds to
55. of all modules in the Slot No field I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 98 5 2 2 How to start using the utility 1 Before using this utility users should click ActiveModule button to activate the DeviceNet master device hardware That would initialize the DeviceNet master device which you have selected in the Slot No field Total Module m Firmw Slot No 3 v Mast Active Reset Searc Module Firmware Netw vices Configuratio 2 After activating the specific 8124W the utility will read all configurations from the EEPROM of the I 8124W After reading the configuration from EEPROM of the DeviceNet master device successfully the utility shows the information in the Devices in EEPROM field DNM_UtilityGE 2 0 Total Module i Firmware Ver 2 00 Master ID 9 v Sot No 3 Master Status 0 Baud Rate 125k Active Reset Search Start All Stop All Clear All Module Firmware Network Device Device Device Remote Devices Configuration Remote Devices 1 0 Monitor Searched Devices Devices in EEPROM Ri Poll Input 2 Output 2 amp L Device 30 a Poll Input 2 Output 2 SL Device 33 a Poll Input 1 Output 1 I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 99 5 2 3 Howto search the slave devices 1 After the module has been activated users can press the Search all Devices button s
56. of the specific MAC ID device via the I O connection e Syntax DWORD 18124 WriteOutputData BYTE cSlot BYTE DesMACID BYTE ConType WORD IlOLen BYTE IODATA e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ConType input The connection type of the remote slave 0 Explicit connection type 1 Poll connection type Bit Strobe connection type COS connection type Cyclic connection type A O N lOLen Input The length of the I O data In byte IODATA Input The remote I O data e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 84 4 3 38 18124 SendExplicitMSG e Description This function is used to send the explicit request command to retrieve or configure the attribute value of the specific device s instance Before calling this function you must start the device After calling this function you should execute the l8124 GetExplicitMSGRespValue to get the response message returned from the remote slave device This old function will be removed in the future Please use the new function which is 18124 SendExplicitMSG_W e Syntax DWORD 18124 SendExplicitMSG BYTE cSlot BYTE DesMACID BYTE ServicelD BYTE ClassID BYTE InstancelD WORD DataLen BYTE DATA e Parameter cSlot input The slot number w
57. op All Clear All Module Firmware Network Device Device Device Remote Devices Configuration Remote Devices I O Monitor Searched Devices Devices in EEPROM I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 96 5 1 Introduction The software utility includes various useful functions These functions help users to diagnose and access the DeviceNet devices There are three main parts of these functions Diagnosis This utility supports searching all devices and the specific devices in the network These functions help users to configure the connection of the slave devices Moreover the software also can diagnose the remote slave devices when building the DeviceNet network Configuration This software could configure the I O connection of the devices After configuring the I O connection the information would be saved into the EEPROM of the I 8124W Remote I O access The software utility can easily access the I O data of all slave devices Users can monitor the input data of the specific slave device and change the output data to the remote slave device with this utility I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 97 5 2 Tutorial Demos 5 2 1 Where to find the Hardware Information 1 The utility would search how many modules in WP 8000 automatically It shows the count of the modules which have been found 2 The utility also lists the slot numbers
58. r DeviceNet Application It is important to understand the sketch development flow Here shows the overall flow chart for utilizing the 8124W 1 N Figure 3 1 Sketch Flow Chart Active l 8124W Module Before using the l 8124W the users should activate it There is an API which is 18124_ActiveModuel to achieve this The detail about this function is described in the next chapter Edit configuration of all Slave Devices It is necessary to provide all slave information to the l 8124W There are two methods to provide the data One is that search all the slave devices by the DNM_UtilityCE Ch5 The other is that calling the corresponding APIs to add the devices which are like 18124_Add and 18124_Remove There are more description in the next chapter By the way there is important information Finish editing the slave information the users need not to edit again by using these APIs like 18124_Add and 18124 Remove This information already saved in the l 8124W s EEPROM Even if the users power off the WinPAC or ViewPAC or XPAC controller the information still exists I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 28 3 Start Communicate with all Slave Devices This step is to make the I 8124W to start communicating with all slave devices which have been saved in the EEPROM The I 8124W would act a DeviceNet master to talk to all slave devices The corresponding APIs are I8124W_Start
59. s User s Manual V 1 4 2013 06 11 2 Contents BRE YDS TIO Nicaccces ceva ve saccccceehcecevetiscsccevecsvevetecscccscssccecabisecdvevensteustecesccecbescesedecceacevesseaueteucececes 1 GENERAL INFORMATION ssssssssssessssssssssorsssvesissssssssssssesssssssssooyossvesisssabsssssssbes 1 1 DEVICENET INTRODUCTION ccsssssscsccccccccsssesesccccccccussssesceccecseusuuuaescecceseeeeuaunsneesesess 1 2 DEVICENET APPLICATIONS ccsssesececcccccccscesescececcccceuceusseseeccceseceuusaseeccscsessuuansssesesess 1 3 I 8124W WITH VENDOR S DEVICENET SLAVES eccccccccccsssessececcccccccsussescecccccecsuaunseesesees 1 4 T S124W ARCHITECTURE ucccccccsssssssececcccccssssssecscccccecsuuecceccccsseeuueassesccecsessuuausgssecess 10 1 5 DEVICENET MASTER WORKING PROCEDURE wiceccccccccsssssssececcccccccussssssecccccecsusussnsecesess 11 1 6 I S124W FIRMWARE CHARACTERISTICS scscssseccccccccccsssseececcccscccuaecesesccscssceuauaseeseces 14 ToT FEA TO EA DEAN AESA E AOE OAE AAEE AS 16 1 8 BLOCK DIAGRAM ccccssccccccccccccssssessccecccccccusussecececccssuuueueceeccecsseeauuasncececcssseuuuaeneseses 17 1 9 PRODUCT CHECK LIST vicccccccccccssssessececccccccssusssececccccessuusscscsccscseseuuensssecescseseuauasaeececees 18 2 HARDWARE CONFIGURATION 2 ccccccccscssscssscssscssscssscssssssscsssccccccscesssesses 19 DD BOARD LAV OUT TEE E E atte deastidacsabettderdbtececdaietsdbess2i ded sciedacsie E 19 2 2 JUMPER SELECTION u cccccsssssececcccccccsssnsseecc
60. s a high performance DeviceNet master module In the l 8124W there is a firmware which implements DeviceNet protocol automatically when it is active The firmware always listens to the bus and receives the messages at the same time It works as shown in Figure 1 6 Explicit Bit Strobe Poll cos Cyclic C onnection C onnection Connection Connection Connection Figure 1 6 Message Router I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 14 The 8124W firmware has a ScanList which is used for store the remote slave devices information After adding or removing a slave device into firmware by APIs the firmware will save immediately this information into ScanList and update the EEPROM information You don t need to reboot for this operation When you reboot I 8124W next time it will load the ScanList information from EEPROM again and run with the slaves by following the ScanList information Users can easily use the DLL functions or Utility tools to configure it by calling add device or remote device functions It works as following Figure 1 7 ScanList om lt Eo Figure 1 7 ScanList data structure I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 15 1 7 Features Hardware Features CPU 80186 80 MHz or compatible CAN Port 5 pin screwed terminal block CAN_L CAN_GND CAN_H N A for others CAN Controller NXP SJA1000T with
61. slave device is malfunction 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 24 2 6 Update the I 8124W s firmware Generally it is not necessary to update the firmware of I 8124W If you need some special functions or there is a bug in firmware it may be needed When users want to download the new firmware into the I 8124W they could achieve it by the following description A Preparing the l 8120W Software Utility i8120w_utility exe The users could download form the FTP below For WinCE 5 ftp ftp icodas com pub cd fieldbus_cd can slotmodule i_8120w tools wince5d For WinCE 6 ftp ftp icodas com pub cd fieldbus_cd can slotmodule i_8120w tools wince6 For XPe ftp ftp icodas com pub cd fieldbus_cd can slotmodule i_8120w tools xpe B Preparing the new I 8124W firmware 8124Vxx exe xx is version No The users could download form the FTP below ftp ftp icodas com pub cd fieldbus _cd devicenet master i 8124w firmware C Configuring the jumpers of I 8124W The users should unlock the flash protection jumper shown below JP2JP3 E ee Ea I 8124W Connector I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 25 D Updating the firmware 1 Open the i8120w_utility 549 xa E Be i8120 i8120w_u 1 8120W Utility Ver 1 00 Filter Setting Hex Baud Setting Hex Msg Format ae v Acc Code Joooacaca Baud 125Kbps v Hex Dec Update Firmwar
62. slot number which the I 8124W is plugged in Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 58 4 3 12 18124 GetSlaveStatus e Description This function gets the remote the communication status of the specific slave device e Syntax DWORD 18124 GetSlaveStatus BYTE cSlot BYTE DesMACID e Parameter cSlot input The slot number which the I 8124W is plugged in DesMACID input The remote slave s MAC ID 0 63 e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 59 4 3 13 18124 StartDevice e Description This function is used to start to communicate with the specific device which is applied by users e Syntax DWORD 18124 StartDevice BYTE cSlot BYTE DesMACID e Parameter cSlot input The slot number which the I 8124W is plugged in DesMACID input The remote slave s MAC ID 0 63 e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 60 4 3 14 18124 StopDevice e Description This function is used to stop to communicate with the destination device which is appointed by users e Syntax DWORD 18124 StopDevice BYTE cSlot BYTE DesMACID e Parameter cSlot input The slot number which the I 8124W is plug
63. t 0 amp Device 30 A COS Input 2 Output 0 B E Device 33 Poll Input 1 Output 1 Del Strobe Input 1 COS Input 1 Output 0 4 If the procedure is successful users would see the successful message below You can find the selected item which has been added into the EEPROM field ox x Total Module ft Firmware Ver poo Master ID o Yv Slot No B Master Status 0 Baud Rate 125k v Active Reset Search Start All Stop All Clear All Module Firmware Network Device Device Device Remote Devices Configuration Remote Devices 1 0 Monitor J Searched Devices Devices in EEPROM E Device 11 B L Device 30 RZ Poll Input 2 Output 2 Strobe Input 2 COS Input 2 Output 0 Device 33 Poll Input 1 Output 1 3 Strobe Input 1 COS Input 1 Output 0 i Device 11 DNM_UtilityGE tell Device 30 eo Device 33 I 33 Device add OK Del lt lt I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 102 5 2 5 Howto remove I O information from the EEPROM 1 Please activate your module Refer to section 5 2 2 for more information 2 Please select one of the device items in the EEPROM field and then click the Del lt lt button DNM_UtilityCE v2 0 Ox fx Total Module f1 TEPON foo Master ID 0 g J Slot No 3 Master Status 0 Baud Rate 125k
64. ta from the beginning of the input area DataLen 4 4 4 6 6 The sum of all slave s input length 18124 ReadIinputArea cSlot Offset DataLen DataArray DataArray The whole input data of all slave devices Read input data of the slave device which ID 5 Offset 4 4 Read the data from the beginning of the ID 5 DataLen 4 The input length of the ID 5 18124 ReadIinputArea cSlot Offset DataLen DataArray DataArray The input data of the slave device which ID 5 I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 91 4 3 44 18124 WriteOutputArea Advanced Option e Description This function can write the bulk data to the output area memory The DeviceNet slave will change the output status of the DeviceNet slaves according to the data located in the output area memory Users can use this function to write a large amount of the output data It provides effective method to change bulk data in one command If the users need to write the output data of all slave devices they need to call the 18124 WriteOutputData for each slave device in general By calling the advanced function 18124 WriteOutputArea the whole output data would be wrote once in this function call Please refer to the section 3 7 for more description e Syntax DWORD 18124 WriteOutputArea BYTE cSlot WORD Offset WORD DataLen BYTE DataArray e Parameter cSlot input The slot number
65. taLen BYTE DATA e Parameter cSlot input The slot number which the l 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 DataLen output The length of the attribute value in byte DATA output The attribute value that returned from the slave device e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 88 4 3 42 18124 ReadbackOutputData e Description The function will read the data according with the consumed connection path of the specific MAC ID device via the I O connection e Syntax DWORD 18124 ReadbackOutputData BYTE cSlot BYTE DesMACID BYTE ConType WORD lOLen BYTE IODATA e Parameter cSlot input The slot number which the l 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 ConType input The connection type of the remote slave 0 Explicit connection type Poll connection type Bit Strobe connection type COS connection type Cyclic connection type A O N gt lOLen output The length of the I O data In byte IODATA output The remote I O data e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 89 4 3 43 18124 ReadinputArea Advanced Option e Description This function read the bulk data from the input area memor
66. the 1 8124W ha searched completely or not Get the result of the searching command 18124_GetSearchedDevices and retrieve the slave s I O information Table 4 1 6 Functions Table I O Functions Read the input data via I O connection 18124 ReadIinputData such as Poll Strobe COS Cyclic Write the output data via I O connection 18124 WriteOutputData such as Poll COS Cyclic The Strobe doesn t support this operation Read back the output data via connection such as Poll COS Cyclic The Strobe doesnt support thi operation Read the bulk data from the input area 18124 ReadIinputArea memory Write the bulk data to the output area 18124_WriteOutputArea memory Read back the bulk data from the output 18124 ReadbackOutputArea area memory I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 43 18124 ReadbackOutputData 4 2 Function Return Code Table 4 2 1 Interpretation of the return code General Error 1 2 Return Comment Code ideal 10003 18120 SlotNumberError The slot number is incorrect 10007 18120 InitError Hardware initialize error 10021 18120 SoftBufferlsEmpty CAN buffer has no data 10022 18120 SoftBufferlsFull CAN buffer is full a eN ine Ta Denon us POTRAT ores i Rebar Roomnand wn Do TRA No firmware exist Downloading firmware 10041 18120_SlotNotinit The slot has not been initialized wee Paes i I 8124W DeviceNet Master
67. the modification enable 5 3 11 Change Baud Rate Baud Rate 125k v If users want to change the baud rate of the network you can select your own setting and then press the Set button After changing the baud rate please reset firmware the make the modification enable 5 3 12 Firmware Version Firmware Ver 2 00 This filed shows the firmware version 5 3 13 Master Status Master Status fo This filed shows the current status of the I 8124W Please refer to the chapter 4 2 the function return code to explain the meanings of this field I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 108
68. tion status of all slave devices The detail about these functions is described in the next chapter Figure 3 2 Searching Flow Chart I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 30 3 2 Flow Chart for Slave Configuration After getting the DeviceNet I O information of the slave devices by the APIs or the utility tool the information needs be saved into the EEPROM of the I 8124W The users could follow the flow chart to save the parameters into the EEPROM of the I 8124W module The firmware in the I 8124W module will load the previous configuration from the EEPROM in the next boot up When the arrangement of the devices in the DeviceNet network is changed users must reconfigure to fit the application The configuration flow chart is shown in Figure 3 3 More information about these functions is presented in the next chapter Store into EEPROM Figure 3 3 Slave Configuration Flow Chart I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 31 3 3 Flow Chart for On line Adding Removing Device l 8124W provides the on line adding removing slave device functions Users don t need to break the communication of the slave devices when adding or removing the slave devices Follow the steps to achieve this function The steps are shown in Figure 3 6 and Figure 3 7 1 On line Adding Devices PY ay EESEESD SEBEB EB BEES ornnnnnnnnnnnnng tannuunnnuunnnnnut tannnnnn
69. to send e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 73 4 3 27 18124 _IsSetAttributeOK e Description This function is used to get the response value after executing the 18124 SetAttributeW function e Syntax DWORD 18124 _IsSetAttributeOK BYTE cSlot BYTE DesMACID e Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote slave device s MAC ID 0 63 e Return Please refer to the chapter 4 2 for the function return code I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 74 4 3 28 18124 ClearAllConfig e Description This function will clear all configurations in the EEPROM of the l 8124W e Syntax DWORD 18124 ClearAllConfig BYTE cSlot e Parameter cSlot input The slot number which the l 8124W is plugged in e Return Please refer to the chapter 4 2 for the function return code 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 75 4 3 29 18124 SearchAllDevices e Description This function is used to retrieve all devices in DeviceNet network This function makes the I 8124W to start the searching process The users need to check whether the process is complete or not by calling the 18124 IsSearchOkK After completing the search process the users could call the 18124 _GetSearched
70. ure2 1 1 8124W Board LAYOUT I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 19 2 2 Jumper Selection The following table shows the definition of jumpers Users need to refer to this table to configure the I 8124W hardware Description Flash Protection If you need to update the firmware you should unlock it before you download the firmware The default is lock Lock Unlock Resistor Switch CAN Port 1200 terminal resistor Table 2 1 Jumper selections 1 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 20 2 3 Connector Pin Assignment The l 8124W is equipped with one 5 pin screwed terminal connector for wire connection of the CAN bus The connector s pin assignment is specified as follows The 5 pin screwed terminal connector of the CAN bus interface is shown in Figure 2 5 and the corresponding pin assignments are given in Table 2 2 Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Figure2 5 5 pin screwed terminal connector Pin No Signal Description 1 N A No use 2 CAN_H CAN_H bus line dominant high 3 N A No use 4 CAN_L CAN_L bus line dominant low 5 CAN_GND Ground Table 2 2 Pin assignment of the 5 pin screwed terminal connector I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 21 2 4 Wire connection In order to minimize the reflection effects on the CAN bus line the CAN bus line has to be t
71. utput Area Please refer to the Figure 3 10 Device 1 I 8124W PISO DNM100 U Memory Map Device 3 Device n Figure 3 10 The Memory Mapping of the I 8124W Users can read a bulk data from Remote Input Area in the I 8124W This bulk data contains multiple devices input statuses If one of the input status of the remote DeviceNet slave changes the corresponding data located in the Remote Input Area would change immediately Oppositely the Remote Output Area contains multiple devices output data Users may change the output value of a certain device by changing the corresponding data located in the Remote Output Area There is another important thing Uses need to know what the arrangement of those data The data of the slave with the smallest DeviceNet MAC ID would be located in the most front of the Remote Input Output Area The data of the salve with the following MAC ID would be located in the following section and so on The data of the salve with the largest MAC ID would be located in the last section of the Remote Input Output Area Here shows three examples about the arrangement rule of the I 8124W I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 36 Example 1 ID 2 ID 3 ID 5 ID 8 ID 9 Input 4 bytes Input 4 bytes Input 4 bytes Input 6 bytes Input 6 bytes Output 5 bytes Output 4 bytes Output 5 bytes
72. y Users can use this function to read all the input data quickly It provides effective method to read the bulk data in one command If the users need to read the input data of all slave devices they need to call the 18124 ReadInputData for each slave device in general By calling the advanced function I18124 ReadIinputArea the whole input data would be read once in this function call Please refer to the section 3 7 for more description e Syntax DWORD 18124 ReadinputArea BYTE cSlot WORD Offset WORD DataLen BYTE DataArray e Parameter cSlot input The slot number which the l 8124W is plugged in Offset input The offset of the input area memory DataLen input The length in byte which the users want to read DataArray output The data pointer of the obtained data from the input area memory e Return Please refer to the section 4 2 for the return code e Example I 8124W DeviceNet Master API functions User s Manual V 1 4 2013 06 11 90 Example 1 ID 2 ID 3 ID 5 ID 8 ID 9 Input 4 bytes Input 4 bytes Input 4 bytes Input 6 bytes Input 6 bytes Output 5 bytes Output 4 bytes Output 5 bytes ff Output 8 bytes Output 7 bytes Input Area Output Area BYTE cSlot 0 Assume that the l 8124 was plugged in the slot 0 WORD Offset 0 WORD DataLen 0 BYTE DataArray 512 0 Read whole input data of all slave devices Offset 0 Read the da

Download Pdf Manuals

image

Related Search

Related Contents

(Guía de la Operación)(PDF/2.29MB)  nCounter® Gene Expression Assay  SpectraLayers 2.1 User Manual  Solutions globales Heraklith® Laine de bois – Gamme 2010  

Copyright © All rights reserved.
Failed to retrieve file