background image

I-8124W DeviceNet Master API functions User’s Manual (V 1.6)      2021/10/04 

74 

4.3.26    I8124_SetAttributeW 

 

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 “I8124_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 “I8124_SetAttribute”.

 

 

Syntax:   

DWORD I8124_SetAttributeW (BYTE cSlot, BYTE DesMACID,   

WORD

 ClassID, 

WORD

 InstanceID,   

BYTE AttributeID, WORD DataLen, 

BYTE *DATA)

 

 

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(

WORD

InstanceID:

 

[input] The remote slave device’s InstanceID(

WORD

AttributeID:

 

[input] The remote slave device’s AttributeID 

DataLen:

 [input] The length of the attribute value (in byte). 

DATA:

 [input] The attribute value that the users want to send. 

 

Return: 

Please refer to the chapter 4.2 for the function return code. 

 

 

 

Summary of Contents for I-8124W

Page 1: ...ges 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 Howev...

Page 2: ...in description and CAN bus wire connection 1 4 1 8 2013 06 11 Johney Add new function 1 I8124_GetAttributeW 2 I8124_SetAttributeW 3 I8124_SendExplicitMSG_W 1 3 1 7 2012 01 04 Johney Fix function I8124...

Page 3: ...MPER SELECTION 20 2 3 CONNECTOR PIN ASSIGNMENT 21 2 4 WIRE CONNECTION 22 2 5 INDICATOR LED 24 2 5 1 NS LED Red 24 2 5 2 RUN LED Green 24 2 5 3 MS LED Yellow 25 2 6 UPDATE THE I 8124W S FIRMWARE 26 3 F...

Page 4: ...6 I8124_StopAllDevice 64 4 3 17 I8124_AddDevice 65 4 3 18 I8124_RemoveDevice 66 4 3 19 I8124_AddIOConnection 67 4 3 20 I8124_RemoveIOConnection 68 4 3 21 I8124_GetAttribute 69 4 3 22 I8124_GetAttribut...

Page 5: ...e Information 101 5 2 2 How to start using the utility 102 5 2 3 How to search the slave devices 103 5 2 4 How to add I O information into the EEPROM 105 5 2 5 How to remove I O information from the E...

Page 6: ...ystem 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 pr...

Page 7: ...tiple 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 I 8124W is a Device...

Page 8: ...systems The main DeviceNet application fields include the applications shown below For more information please refer to www odva org Production cell builds and tests CPUs Dinnerware production Beer br...

Page 9: ...t I O modules BECKHOFF BK5250 series DeviceNet I O modules MKS 683 series DeviceNet exhaust throttles MKS MFC Mass Flow Controller series DeviceNet devices MKS DELTA II FRC Flow Ratio Controller serie...

Page 10: ...chitecture 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 yo...

Page 11: ...duce the complexity of user s 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 devic...

Page 12: ...provide one explicit message connection and 4 I O connections as depicted in Figure 1 4 Figure 1 4 DeviceNet Messaging The DeviceNet Communication Protocol is based on the concept of connections meth...

Page 13: ...onding 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...

Page 14: ...tics The I 8124W is a high performance DeviceNet master module In the I 8124W there is a firmware which implements DeviceNet protocol automatically when it is active The firmware always listens to the...

Page 15: ...ediately 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 EEPRO...

Page 16: ...minator 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 Feat...

Page 17: ...ROM The EEPROM stores the configuration information While activating the I 8120W the ScanList will be loaded from EEPROM automatically 3 CPU This CPU is for implementing the DeviceNet protocol and com...

Page 18: ...read the release note first All of the important information needed will be provided in the release note as follows Where you can find the software driver utility and demo programs How to install sof...

Page 19: ...anual V 1 6 2021 10 04 19 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...

Page 20: ...ows the definition of jumpers Users need to refer to this table to configure the I 8124W hardware Jumper Description Status JP1 Flash Protection If you need to update the firmware you should unlock it...

Page 21: ...ssignment The I 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 connect...

Page 22: ...as in the following figure According to the ISO 11898 2 spec each terminal resistance is 120 or between 108 132 The length related resistance should have 70 m m Users should check the resistances of t...

Page 23: ...O 11898 2 The following table can be used as a good reference Bus Length meter Bus Cable Parameters Terminal Resistance Length Related Resistance m m Cross Section Type 0 40 70 0 25 23AWG 0 34mm 2 22A...

Page 24: ...he 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 RU...

Page 25: ...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...

Page 26: ...lity i8120w_utility exe The users could download form the FTP below For WinCE 5 ftp ftp icpdas com pub cd fieldbus_cd can slotmodule i_8120w tools wince5 For WinCE 6 ftp ftp icpdas com pub cd fieldbus...

Page 27: ...W DeviceNet Master API functions User s Manual V 1 6 2021 10 04 27 D Updating the firmware 1 Open the i8120w_utility 2 Select the slot number which the I 8124W plugged in 3 Click the Update Firmware b...

Page 28: ...s Manual V 1 6 2021 10 04 28 4 Click the Update button to select the I 8124W firmware 5 Click OK button to start downloading the firmware E Configuring the jumpers of I 8124W again The users should l...

Page 29: ...uration of all Slave Devices It is necessary to provide all slave information to the I 8124W There are two methods to provide the data One is that search all the slave devices by the DNM_UtilityCE Ch5...

Page 30: ...s 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 sl...

Page 31: ...tion 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 t...

Page 32: ...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 Whe...

Page 33: ...24W 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 t...

Page 34: ...I 8124W DeviceNet Master API functions User s Manual V 1 6 2021 10 04 34 2 On line Removing Devices Figure 3 7 On line Remove Device Flow Chart...

Page 35: ...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...

Page 36: ...Thirdly users can set the initial output value by calling I8124_WriteOutputData before starting the specific slave device If users do not initialize the output value the firmware default output value...

Page 37: ...t 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 val...

Page 38: ...I 8124W DeviceNet Master API functions User s Manual V 1 6 2021 10 04 38 Figure 3 11 The example of the I 8124W memory mapping Figure 3 12 The example of the I 8124W memory mapping...

Page 39: ...et a bulk data to the Remote Output Area Please refer to the section 4 3 41 for more information 3 I8124_ReadbackOutputArea Call this function to get a bulk data from Remote Output Area Please refer t...

Page 40: ...0 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 i...

Page 41: ...g table Keyword Set parameter by user before calling this function Get the data from this parameter after calling this function input Yes No output No Yes Table 4 1 1 Functions Table Module Functions...

Page 42: ...tatus 7 I8124_StartDevice I 8124W will start to communicate with the specific slave device 8 I8124_StopDevice I 8124W will stop to communicate with the specific slave device 9 I8124_StartAllDevice I 8...

Page 43: ...ice 22 I8124_IsSetAttributeOK Check whether the slave has replied for the setting command or not 23 I8124_GetDeviceInfoFromScanLi st Get specific slave device s I O information form the Scan List with...

Page 44: ...of the searching command and retrieve the slave s I O information Table 4 1 6 Functions Table I O Functions No Function Name Description 1 I8124_ReadInputData Read the input data via I O connection s...

Page 45: ...24 I8120_SetCyclicMsgFailure Cyclic Message Error 10025 I8120_DpramOverRange Dual Port RAM over range 10026 I8120_NoDpramCmd No command within Dual Port RAM 10027 I8120_ModeError Mode Error 10030 I812...

Page 46: ...N bus 1003 DNMXS_Booting The I 8124W is still booting 1050 DNMXS_MACIDError The MAC ID is exceed the range 0 63 1051 DNMXS_BaudRateError The baud rate is exceed the range 0 2 1052 DNMXS_ConnectionType...

Page 47: ...onnection is not established 1103 DNMXS_COSNotAllocate The COS connection is not established 1104 DNMXS_CyclicNotAllocate The Cyclic connection is not established 1105 DNMXS_PollAlreadyExist The Poll...

Page 48: ...DNMXS_WaitForSlaveResp The I 8124W is waiting for the response form the slave device 1152 DNMXS_SlaveRespError The slave replied some errors 1153 DNMXS_OutputDataLenError The output length of the I O...

Page 49: ...ion can get the count of total I 8124W modules in the user s WP 8000 or XPAC 8000 series MCU Syntax DWORD I8124_Total I8124Module BYTE TotalModules BYTE SlotNoList Parameter TotalModules output The am...

Page 50: ...er 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 functi...

Page 51: ...cription 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 Syntax DWORD I8124_CloseModule BYTE cSlot Parameter cSl...

Page 52: ...The function can obtain the version information of I8124_eVC DLL or I8124_DotNET DLL Syntax DWORD I8124_GetDLLVersion void Parameter None Return The DLL version information For example If 100 hex is r...

Page 53: ...formation of the firmware inside the I 8124W module Syntax DWORD I8124_GetFirmwareVersion BYTE cSlot Parameter cSlot input The slot number which the I 8124W is plugged in Return The firmware version i...

Page 54: ...hanged 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 make the firmw...

Page 55: ...etMasterMACID Description The function can get the MAC ID of the DeviceNet master I 8124W Syntax DWORD I8124_GetMasterMACID BYTE cSlot Parameter cSlot input The slot number which the I 8124W is plugge...

Page 56: ...ter calling this function users must call I8124_ResetFirmware to make the modification enabled It will save the information in the EEPROM of the I 8124W Syntax DWORD I8124_SetMasterMACID BYTE cSlot BY...

Page 57: ...the I 8124W Syntax DWORD I8124_GetBaudRate BYTE cSlot Parameter cSlot input The slot number which the I 8124W is plugged in Return The CAN bus baud rate information in the I 8124W If the value is 0 th...

Page 58: ...fter calling this function you must call I8124_ResetFirmware to reset the firmware to make change enabled Syntax DWORD I8124_SetBaudRate BYTE cSlot BYTE BaudRate Parameter cSlot input The slot number...

Page 59: ...sed 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 I8124_GetMasterStatus BYTE cSlot Parame...

Page 60: ...nction gets the remote the communication status of the specific slave device Syntax DWORD I8124_GetSlaveStatus BYTE cSlot BYTE DesMACID Parameter cSlot input The slot number which the I 8124W is plugg...

Page 61: ...is used to start to communicate with the specific device which is applied by users Syntax DWORD I8124_StartDevice BYTE cSlot BYTE DesMACID Parameter cSlot input The slot number which the I 8124W is p...

Page 62: ...ed to stop to communicate with the destination device which is appointed by users Syntax DWORD I8124_StopDevice BYTE cSlot BYTE DesMACID Parameter cSlot input The slot number which the I 8124W is plug...

Page 63: ...tAllDevice Description This function is used to start to communicate with all slave devices in the ScanList Syntax DWORD I8124_StartAllDevice BYTE cSlot Parameter cSlot input The slot number which the...

Page 64: ...lDevice Description This function is used to stop to communicate with all destination devices in the ScanList Syntax DWORD I8124_StopAllDevice BYTE cSlot Parameter cSlot input The slot number which th...

Page 65: ...Before communicating with any slave device users should call this function to add the slave device Syntax DWORD I8124_AddDevice BYTE cSlot BYTE DesMACID WORD Explicit_EPR Parameter cSlot input The slo...

Page 66: ...cified slave device from the ScanList in the I 8124W and the information of the device in the EEPROM is erased at the same time Syntax DWORD I8124_RemoveDevice BYTE cSlot BYTE DesMACID Parameter cSlot...

Page 67: ...AddIOConnection BYTE cSlot BYTE DesMACID BYTE ConType WORD DeviceInputLen WORD DeviceOutputLen WORD EPR Parameter cSlot input The slot number which the I 8124W is plugged in DestMACID input The remote...

Page 68: ...emoveIOConnection BYTE cSlot BYTE DesMACID BYTE ConType 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 re...

Page 69: ...ge returned from the remote slave device This old function will be removed in the future Please use the new function which is I8124_GetAttributeW Syntax DWORD I8124_GetAttribute BYTE cSlot BYTE DesMAC...

Page 70: ...is 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 I8124_GetAttribute Syntax DWORD I8124_GetAttributeW BYTE...

Page 71: ...ot After checking the response message you should execute the I8124_GetAttributeValue to get the response message returned from the remote slave device Syntax DWORD I8124_IsGetAttributeOK BYTE cSlot B...

Page 72: ...function users should call I8124_GetAttributeW to send request command first Syntax DWORD I8124_GetAttributeValue BYTE cSlot BYTE DesMACID WORD DataLen BYTE DATA Parameter cSlot input The slot number...

Page 73: ...lease use the new function which is I8124_SetAttributeW Syntax DWORD I8124_SetAttribute BYTE cSlot BYTE DesMACID BYTE ClassID BYTE InstanceID BYTE AttributeID WORD DataLen BYTE DATA Parameter cSlot in...

Page 74: ...the W The user could use this function instead of the I8124_SetAttribute Syntax DWORD I8124_SetAttributeW BYTE cSlot BYTE DesMACID WORD ClassID WORD InstanceID BYTE AttributeID WORD DataLen BYTE DATA...

Page 75: ...is function is used to get the response value after executing the I8124_SetAttributeW function Syntax DWORD I8124_IsSetAttributeOK BYTE cSlot BYTE DesMACID Parameter cSlot input The slot number which...

Page 76: ...ig 4 3 28 I8124_ClearAllConfig Description This function will clear all configurations in the EEPROM of the I 8124W Syntax DWORD I8124_ClearAllConfig BYTE cSlot Parameter cSlot input The slot number w...

Page 77: ...the process is complete or not by calling the I8124_IsSearchOK After completing the search process the users could call the I8124_GetSearchedDevices to get the searched devices Attention that this fun...

Page 78: ...chOK After completing the search process the users could call the I8124_GetSearchedDevices to get the searched devices Attention This function will terminate all communications with remote devices Thi...

Page 79: ...hOK 4 3 31 I8124_IsSearchOK Description This function will check whether the searching process has finished or not Syntax DWORD I8124_IsSearchOK BYTE cSlot Parameter cSlot input The slot number which...

Page 80: ...ut 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 T...

Page 81: ...r 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 Connecti...

Page 82: ...put 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 ScanLis...

Page 83: ...I 8124W DeviceNet Master API functions User s Manual V 1 6 2021 10 04 83...

Page 84: ...ter 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 T...

Page 85: ...cSlot BYTE DesMACID BYTE ConType WORD IOLen BYTE IODATA 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 c...

Page 86: ...E cSlot BYTE DesMACID BYTE ConType WORD IOLen BYTE IODATA 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...

Page 87: ...removed in the future Please use the new function which is I8124_SendExplicitMSG_W Syntax DWORD I8124_SendExplicitMSG BYTE cSlot BYTE DesMACID BYTE ServiceID BYTE ClassID BYTE InstanceID WORD DataLen...

Page 88: ...on which has the same name without the _W The user could use this function instead of the I8124_SendExplicitMSG Syntax DWORD I8124_SendExplicitMSG_W BYTE cSlot BYTE DesMACID BYTE ServiceID WORD ClassI...

Page 89: ...After checking the response message you should execute the I8124_GetExplicitMSGRespValue to get the response message returned from the remote slave device Syntax DWORD I8124_IsExplicitMSGRespOK BYTE c...

Page 90: ...ould call I8124_SendExplicitMSG_W to send request command first Syntax DWORD I8124_GetExplicitMSGRespValue BYTE cSlot BYTE DesMACID WORD DataLen BYTE DATA Parameter cSlot input The slot number which t...

Page 91: ...DesMACID BYTE ConType WORD IOLen BYTE IODATA 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 t...

Page 92: ...ta for each slave device in general By calling the advanced function I8124_ReadInputArea the whole input data would be read once in this function call Please refer to the section 3 7 for more descript...

Page 93: ...ata from the beginning of the input area DataLen 4 4 4 6 6 The sum of all slave s input length I8124_ReadInputArea cSlot Offset DataLen DataArray DataArray The whole input data of all slave devices Re...

Page 94: ...ut data of all slave devices they need to call the I8124_WriteOutputData for each slave device in general By calling the advanced function I8124_WriteOutputArea the whole output data would be wrote on...

Page 95: ...et 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 I8124_WriteOutputArea cSlot Offset DataLen DataArray Wr...

Page 96: ...he output data of all slave devices they need to call the I8124_ReadbackOutputData for each slave device in general By calling the advanced function I8124_ReadbackOutputArea the whole output data woul...

Page 97: ...ead back the data from the beginning of the output area DataLen 5 4 5 8 7 The sum of all slave s output length I8124_ReadbackOutputArea cSlot Offset DataLen DataArray DataArray The whole output data R...

Page 98: ...process For some slave devices the keep explicit connection is not necessary The users can call this function after the I8124_ActiveModule This disable will NOT keep in I 8124W The users need to call...

Page 99: ...User s Manual V 1 6 2021 10 04 99 5 DNM_UtilityCE for WP 8000 The utility does not work normally if the DeviceNet master series hardware driver is not installed correctly After selecting the I 8124W m...

Page 100: ...tions 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...

Page 101: ...101 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 u...

Page 102: ...DeviceNet master device hardware That would initialize the DeviceNet master device which you have selected in the Slot No field 2 After activating the specific I 8124W the utility will read all confi...

Page 103: ...ess the Search all Devices button shown 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...

Page 104: ...I 8124W DeviceNet Master API functions User s Manual V 1 6 2021 10 04 104 3 Users can expand the device to find out more I O connection information of those devices...

Page 105: ...ore 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 button to add th...

Page 106: ...Manual V 1 6 2021 10 04 106 5 2 5 How to 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 th...

Page 107: ...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 me...

Page 108: ...functions User s Manual V 1 6 2021 10 04 108 4 Users can press the device No to display the device information including the device name and input data 5 Users can press Write button to send the outp...

Page 109: ...f the I 8124W module 5 3 2 Slot Number This shows which slot the I 8124W has been plugged in The drop down list will show the entire slots which the I 8124W module plugged in the WP 8000 5 3 3 Active...

Page 110: ...end default value 0 to the output channels 5 3 7 Stop All Device This button would disconnect the communication with all slave devices which have configured in the EEPROM All remote slave devices will...

Page 111: ...the modification enable 5 3 11 Change Baud Rate 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 r...

Reviews: