How to Configure RevPi Gate for DeviceNet (Core)

Setting MAC-ID and Bitrate

The MAC-ID and bitrate are assigned in binary format.

You can set the MAC ID via the DIP switches 1-32, and via switches S1 and S2 you can set the bitrate.

Set an address switch to “OFF” to switch bit value 0 or to “ON” to switch bit value 1.

Valid value range for the bitrate:

Valid value range for the MAC-ID: 0-63

Switch SettingValue
Switch 1: OFF,
Switch 2: OFF
125 kbit/s
Switch 1: ON,
Switch 2: OFF
250 kbit/s
Switch 1: OFF,
Switch 2: ON
500 kbit/s
Switch 1: ON,
Switch 2: ON
Automatic bit rate detection

Example: Here, you can see the switch setting for the MAC address 42 and the bitrate 500 kBit/s.

DesignationS2S132168421
Switch settingonoffonoffonoffonoff

DeviceNet Objects

To configure the gateway component, you have to make the appropriate settings in the DeviceNet objects with the configuration software of your Device master.

Object structure

DeviceNetTM uses the application layer CIPTM (Common Industrial Protocol) that was specified by the ODVA (Open DeviceNet Vendor Association – http://www.odva.org). Physically based DeviceNet on CAN (Controller Area Network).

CIP is a connection oriented protocol. It allows the exchange of I/O data via cyclical I/O messages and the exchange of general data for configuration, diagnosis and Management via explicit messages. For this purpose, CIP defines 4 essential functions:

  • Uniform object model for addressing data
  • Uniform communication model for exchanging data
  • Uniform configuration methods
  • Uniform device profiles

Each DeviceNet device is characterized by a collection of objects. Each object has a defined behavior. Each object belongs to a class. Objects belonging to the same class are called instances of this class. Data elements within an object are called attributes. All attributes can be addressed with class, instance and attribute IDs. Services are explicit tasks that an object can execute.

The following sections describe which objects, attributes and services are supported by the gateway component.
Class Code 0x01Hex

This class contains information about the identification of the module.

The gateway component supports the following functions in this class:

Get Attribute Single (0x0e): 
This function returns the content of certain attributes.
Reset Service (0x05):

  • Type 0: The module restarts the DeviceNet Software.
  • Type 1: The module is reset to the original settings.

The RevPi Gate supports the following services in the instances:
Instance 0

#NameAccessTypeValue
1RevisionGetUINT0x1

Instance 1

#NameAccessTypeDescription
1Vendor IDGetUINT1168 (KUNBUS GmbH Industrial Communication)
2Device TypeGetUINT0x00c
3Product CodeGetUINT0x0049 (73)
4RevisionGetSTRUCTof:Version number
MajorUSINTMain version
MinorUSINTSub-version number
5StatusGetWORDs. Table Device Status
6Serial numberGetUDINTAssigned by KUNBUS during the production process.
7Product nameGetSHORT_STRINGKUNBUS-mGate DeviceNet

 

Bit(s) Name
0These is a connection to the master/scanner
1Reserved (set to 0)
2Configured (always set to 0)
3Reserved (set to 0)
4-7

0000b

0010b

0011b

0100b

0110b

0111b

Others

Extended Device Status

Unknown

Timeout

No IO connection established

Not implemented

Connection in Run mode

Connection in idle mode

Reserved

8A recoverable error has occurred
9An unrecoverable error has occurred
10A serious recoverable error has occurred
11A serious unrecoverable error has occurred
12-15Reserved (set to 0)

Table “Device Status”
Class Code 0x02 Hex

This class represents a communication connecting point. This allows a service to be triggered in any class or instance.
Class Code 0x03 Hex

In this class you will find information about the configuration and status of a DeviceNet port.The gateway component supports the following functions in this class:
Class Services

  • Get Attribute Single (0x0e)

Instance Services

  • Get Attribute Single (0x0e)
  • Set Attribute Single (0x10)
  • Allocate Master/Slave Connection Set (0x4b)
  • Release Master/Slave Connection Set (0x4c)

RevPi Gate supports the following data in this class:
Instance 0

#NameAccessTypeValue
1RevisionGetUINT0x2

Instance 1

#NameAccessTypeDescription
1MAC IDGetUSINTValue range 0–63.

Default value: 63

You can set the MAC-ID on the DIP Switches.

2Bit rateGetUSINTValue Range

0 = 125 kBit/s

1 = 250 kBit/s

2 = 500 kBit/s

3 = Automatic bitrate detection

Default value: 125 kBit/s

You can set the bitrate on the DIP Switches.

3BOIGet/SetBOOLBus–Off Interrupt
4Bus–Off CounterGet/SetUSINTThis value indicates how often the module changes to the Off state.

Value range 0-255

5Allocation InformationGetSTRUCTof:You can find further information in the DeviceNet specifications volume 3, in section 5.11.
Allocation Choice ByteBYTE
Master’s MAC IDUSINTValue range 0–63, 255 MAC ID from the master Change is only possible by allocation from the master.
6MAC ID Switch ChangedGetBOOLThis value indicates whether the node ID has been changed since the last restart.

0 = No change

1 = Change since the last start

7Bit Rate Switch ChangedGetBOOLThis value indicates whether the bitrate has been changed since the last restart

0 = No change

1 = Change since the last start

8MAC ID Switch ValueGetUSINTCurrent values of the switches for the node ID Value range 0-99
9Bit Rate Switch ValueGetUSINTCurrent values of the switches for the bitrate.

Value range 0–9

10Quick_ConnectGet/SetBOOLActivates or deactivates Quick Connect.

0 = Deactivated

1 =Activated

Class Code 0x04 Hex

This object enables you to access the input and output data.The gateway component supports the following functions in this class:

Class Services
• Get Attribute Single (0x0e)
Instance Services
• Get Attribute Single (0x0e)
• Set Attribute Single (0x10)
RevPi Gate supports the following data in this class:
Instance 0

#NameAccessTypeValue
1VersionGetUINT0x0001

Instance 0x64

#NameAccessTypeValue
3DataGetArray of BYTEEnables access to the input data area
4LenghGetUNITLength of the input and output data area

Instance 0x96

#NameAccessTypeValue
3DataGet/SetArray of BYTEEnables access to the output data area

Class Code 0x05 Hex

The gateway component supports the following functions in this class:
Class Services
• Get Attribute Single (0x0e)
Instance Services
• Get Attribute Single (0x0e)
• Set Attribute Single (0x10)

The gateway component supports the following data in this class:

Instance 0

#NameAccessTypeValue
1VersionGetUINT0x0002

Instance 1

#NameAccessTypeDescription
1StateGetUSINTState of the object

3: Established

5: Delete latent objects

2Instance typeGetUSINTIndicates whether it is an I/O connection or explicit Connection.
3TransportClass triggerGetBYTEDefines the behavior of the connection
4DeviceNet produced connection idGetUINTPositioned in CAN identifier field if data is transmitted via the existing connection in a DeviceNet- Subnet.
5DeviceNet consumed connection idGetUINTValue is in the CAN Identifier field. It signals that messages can be received.
6DeviceNet  initial comm characteristicsGetBYTEDefines the message group of this connection based on production and consumption.
7Produced connection sizeGetUINTMaximum number of bytes that were transmitted via this connection
8Consumed connection sizeGetUINTMaximum number of bytes that were received via this connection
9Expected packet rateGet/SetUINTDefines the timing of the current connection
12Watchdog timeout actionGet/SetUSINTControls the behavior during inactivity and Watchdog Timeouts
13Produced connection path lengthUINTNumber of bytes of the attribute “Produced_connection_path”
14Produced connection pathPacked EPATHDisplays the application object(s) whose data was produced in the current Connection.
15Consumed connection path lengthUINTNumber of bytes of the attribute “Consumed_connection_path”
16Consumed connection pathPacked EPATHDisplays the application object(s) whose data was used in the current Connection.

Instance 2

#NameAccessTypeDescription
1StateGetUSINTState of the object

3: Established

5: Delete latent objects

2Instance typeGetUSINTIndicates whether it is an I/O connection or explicit Connection.
3TransportClass triggerGetBYTEDefines the behavior of the connection
4DeviceNet produced connection idGetUINTPositioned in CAN identifier field if data is transmitted via the existing connection in a DeviceNet- Subnet.
5DeviceNet consumed connection idGetUINTValue is in the CAN Identifier field. It signals that messages can be received.
6DeviceNet initial comm characteristicsGetBYTEDefines the message group of this connection based on consumption and production.
7Produced connection sizeGetUINTMaximum number of bytes that were transmitted via this connection
8Consumed connection sizeGetUINTMaximum number of bytes that were received via this connection
9Expected packet rateGet/SetUINTDefines the timing of the current connection
12Watchdog timeout actionGet/SetUSINTControls the behavior during inactivity and Watchdog Timeouts
13Produced connection path lengthUINTNumber of bytes of the attribute “Produced_connection_path”
14Produced connection pathPacked EPATHDisplays the application object(s) whose data was produced in the current Connection.
15Consumed connection path lengthUINTNumber of bytes of the attribute “Consumed_connection_path”
16Consumed Connection pathPacked EPATHDisplays the application object(s) whose data was used in the current Connection.

Instance 3

#NameAccessTypeDescription
1StateGetUSINTState of the object

3: Established

5: Delete latent objects

2Instance typeGetUSINTIndicates whether it is an I/O connection or explicit Connection.
3TransportClass triggerGetBYTEDefines the behavior of the connection
4DeviceNet produced connection idGetUINTPositioned in CAN identifier field if data is transmitted via the existing connection in a DeviceNet- Subnet.
5DeviceNet consumed connection idGetUINTValue is in the CAN Identifier field. It signals that Messages can be received.
6DeviceNet initial comm characteristicsGetBYTEDefines the message group of this connection based on consumption and production.
7Produced connection sizeGetUINTMaximum number of bytes that were transmitted via this connection
8Consumed connection sizeGetUINTMaximum number of bytes that were received via this connection
9Expected packet rateGet/SetUINTDefines the timing of the current connection
12Watchdog timeout actionGet/SetUSINTControls the behavior during inactivity and Watchdog Timeouts
13Produced connection path lengthUINTNumber of bytes of the attribute “Produced_connection_path”
14Produced connection pathPacked EPATHDisplays the application object(s) whose data was produced in the current Connection.
15Consumed connection path lengthUINTNumber of bytes of the attribute “Consumed_connection_path”“
16Consumed connection pathPacked EPATHDisplays the application object(s) whose data was used in the current Connection.

Instance 4

#NameAccessTypeDescription
1StateGetUSINTState of the object

3: Established

5: Delete latent objects

2Instance typeGetUSINTIndicates whether it is an I/O connection or explicit Connection.
3TransportClass triggerGetBYTEDefines the behavior of the connection
4DeviceNet produced connection idGetUINTPositioned in CAN identifier field if data is transmitted via the existing connection in a DeviceNet- Subnet
5DeviceNet consumed connection idGetUINTValue is in the CAN Identifier field. It signals that messages can be received.
6DeviceNet initial comm characteristicsGetBYTEDefines the message group of this connection based on consumption and production.
7Produced connection sizeGetUINTMaximum number of bytes that were transmitted via this connection
8Consumed connection sizeGetUINTMaximum number of bytes that were received via this connection
9Expected packet rateGet/SetUINTDefines the timing of the current connection
12Watchdog timeout actionGet/SetUSINTControls the behavior during inactivity and Watchdog Timeouts
13Produced connection path lengthUINTNumber of bytes of the attribute “Produced_connection_path”
14Produced connection pathPacked EPATHDisplays the application object(s) whose data was produced in the current Connection.
15Consumed connection path lengthUINTNumber of bytes of the attribute “Consumed_connection_path”
16Consumed connection pathPacked EPATHDisplays the application object(s) whose data was used in the current Connection.
17Production inhibit timeUINTDefines the minimum time between the data productions. This attribute is necessary for all I/O client connections. Excluded from this are connections with cyclical production Triggers.

Instance 10-12

#NameAccessTypeDescription
1StateGetUSINTState of the object

3: Established

5: Delete latent objects

2Instance typeGetUSINTIndicates whether it is an I/O connection or explicit connection.
3TransportClass triggerGetBYTEDefines the behavior of the connection.
4DeviceNet produced connection idGetUINTPositioned in CAN identifier field if data is transmitted via the existing connection in a DeviceNet- Subnet.
5DeviceNet consumed connection idGetUINTValue is in the CAN Identifier field. It signals that messages can be received.
6DeviceNet initial comm characteristicsGetBYTEDefines the message group of this connection based on consumption and production.
7Produced connection sizeGetUINTMaximum number of bytes that were transmitted via this connection
8Consumed connection sizeGetUINTMaximum number of bytes that were received via this connection
9Expected packet rateGet/SetUINTDefines the timing of the current connection
12Watchdog timeout actionGet/SetUSINTControls the behavior during inactivity and Watchdog Timeouts

Class Code 0x2b Hex – Acknowledge Handler Object

The gateway component supports the following functions in this class:
Class Service

  • Get Attribute Single (0x0e): This function resets the content of certain attributes.

Instance Services

  • Get Attribute Single (0x0e): This function resets the content of certain attributes.
  • Set Attribute Single (0x10): This function changes the value of an attribute

The gateway component supports the following data in this class:

Instance 0

#NameAccess TypeValue
1VersionGetUINT0x0001
2Max InstanceGetUINT0x0001

Instance 1

#NameAccess TypeDescriptionValue
1Acknowledge TimerGet/SetUINTWaiting time for the acknowledgementValue range 1-65, 535 ms 0=invalid default value: 16
2Retry LimitGet/SetUSINTNumber of timeouts to be expected. Afterwards, a message is sent to the controller reporting that the repetition limit was exceededDefault value: 1
3Producing Connection InstanceGet/SetUINTConnection instance containing the path of the production data which have sent an acknowledge to the Controller.Default value: 4
4Ack List SizeGetBYTEMaximum number of participating instances in the acknowledge list.1
5Ack ListGetArray of USINTList of all active connection instances containing acknowledges.N/A
6Data with Ack Path List SizeGetBYTEMaximum number of participants from the attribute “Data with Ack Path List”1
7Data with Ack Path ListGetArray of USINTList of all connection participants. Used to forward data that was received with an acknowledgeN/A

Class Code Hex 0xa0 – I/O Data Input Mapping

In this object you have the option to access the I/O data. The process data input area is distributed here to the various attributes in instance 1 of this class.

You can also access these values via class 3, instance 0x96-0x9a.

The gateway component supports the following functions in this class:

Class Services
•Get Attribute Single (0x0e): This function resets the content of certain attributes
Instance Services
•Get Attribute Single (0x0e): This function resets the content of certain attributes.

The gateway component supports the following data in this class:
Instance 0

#NameAccess TypeValue
1VersionGetUINT0x0001

Instance 1

#NameAccess TypeValue
1DataGet/SetArray of USINTThe first 64 bytes of the process data input area

Also available in instance 0x64

2-8DataGet/SetArray of USINTNot used

Class Code Hex 0xa1 – I/O Data Input Mapping

In this object you have the option to access the I/O data. The process data output area is distributed here to the various attributes in instance 1 of this class.

You can also access these values via the assembly object.

The gateway component supports the following functions in this class:
Class Services
•Get Attribute Single (0x0e): This function resets the content of certain attributes.
Instance Services
•Get Attribute Single (0x0e): This function resets the content of certain attributes.

The gateway component supports the following data in this class:
Instance 0

#NameAccess TypeValue
1VersionGetUINT0x0001

Instance 1

#NameAccess TypeDescription
1DataGet/SetArray of USINTThe first 64 bytes of the process data input area

Also available in instance 0x64

2-8DataGet/SetArray of USINTNot in use

Class 0xa2 – I/O Data Output Mapping

With this object you can poll data via the partner gateway component.

The gateway component supports the following functions in this class:
Class Services

  • Get Attribute Single (0x0e)

Instance Services

  • Get Attribute Single (0x0e)
  • Set Attribute Single (0x10)

The gateway component supports the following data in this class:
Instance 0

#NameAccess TypeValue
1VersionGetUINT0x0001

Instance 1

#NameAccess TypeDescription
1Type IDGetArray of USINTType ID of the partner gateway
2Input SizeGetArray of USINTInput size of the Partner gateway
3Output SizeGetArray of USINTOutput size of the partner gateway
4Bus StateGetArray of USINTState of the fieldbus connection of the partner gateway component

0: No physical connection to the fieldbus. Check that the connectors are properly connected.

1: The module is correctly connected, but not yet ready for communication with the fieldbus. Check that the communication parameters are set correctly

2: The module is ready for communication, but does not currently exchange cyclic data with the fieldbus.

3: Cyclic data Exchange

Not valid, if a RevPi Core is used as a partner module.