First Steps - Example
Mapping The BK9105 can be mapped as short integer (byte), integer (word), or double integer (double word). In the following description it is mapped as double integer! |
Process Image
The figure below illustrates the hardware of the Beckhoff node in this example.
The process image table (I/O map) is displayed in double word format below the figure.
In order to properly configure the Ethernet Bridge, the process image of the Beckhoff BK9105 node must be determined. When the coupler is powered up, it automatically addresses the I/O modules of the node. The data for complex modules (modules using 2 or more bytes) are mapped first in the process image in the order of their physical position after the coupler. As such, they start at Double word 3. Following this, the digital modules are grouped into the next available Integer. The bits are arranged in the order of the modules location. When the number of digital points exceeds 32 (1-double integer), the coupler automatically starts the next Double Integer.
Note: The modules can be mapped as Byte, Word, or Double Word. The example below maps them as Double Word, using 2 digital input cards (KL1104, KL1408), 2 digital output cards (KL2134, KL2408), 1 four channel analog input card (KL3064), 1 two channel analog output card (KL4002), and 1 High speed counter card (KL5101).
Input Process Image
- Double Word 0: BK9105 Status
- Double Word 1: Channel 1 KL3064 (High Word) and Status (Low Word)
- Double Word 2: Channel 2 KL3064 (High Word) and Status (Low Word)
- Double Word 3: Channel 3 KL3064 (High Word) and Status (Low Word)
- Double Word 4: Channel 4 KL3064 (High Word) and Status (Low Word)
- Double Word 5: Channel 1 KL4002 (High Word) and Status (Low Word)
- Double Word 6: Channel 2 KL4002 (High Word) and Status (Low Word)
- Double Word 7: Data In(0) (High Word) and Status (Low Word)
- Double Word 8: KL1104 bit 16-19, KL14008 bit 20-27 the remainder bits are not used (High Word) and Data In (1) KL1501(Low Word)
Output Process Image
- Double Word 0: BK9105 Control
- Double Word 1: Channel 1 KL3064 (High Word) and Status (Low Word)
- Double Word 2: Channel 2 KL3064 (High Word) and Status (Low Word)
- Double Word 3: Channel 3 KL3064 (High Word) and Status (Low Word)
- Double Word 4: Channel 4 KL3064 (High Word) and Status (Low Word)
- Double Word 5: Channel 1 KL4002 (High Word) and Status (Low Word)
- Double Word 6: Channel 2 KL4002 (High Word) and Status (Low Word)
- Double Word 7: Data Out (0) (High Word) and Status (Low Word)
- Double Word 8: KL1104 bit 16-19, KL14008 bit 20-27 the remainder bits are not used (High Word) and Data (1) KL1501(Low Word)
This is what the Controller Tags should look like. The graphic below illustrates exactly where one would look to find the Data In (1) KL1501 as well as the third digital output, KL2134 channel 3.
Open RSLogix 5000 and create a new PLC project
When creating a new project make sure to select the correct controller type and controller settings. This example uses a SoftLogix Virtual Chasis, with the BK9105 (Beckhoff EthernetIP Bus coupler).
Add an Ethernet IP Module
Add the main communications module. Be sure to know the IP address of the card that is setup as the Ethernet IP card. That address will have to be set in the module settings along with the slot the card is in.
Add an Ethernet IP Box
When adding the BK9105 box, select the "ETHERNET-MODULE", since it is a generic Ethernet/IP device, and it will be configured to work with the BK9105.
Configuring the BK9105 in RSLogix
The example uses two KL1012 terminals and two KL2032 terminals. These cards gave 2 total words of input and output data. On the properties dialog, change some of the box settings. Please read the following for recommendations on settings:
- IP Address (Refer to IP Address section of documentation)
- The Assembly Instances will be as follows:
- Input: 101
- Output: 102
- Configuration: 100
- Things to keep in mind when entering the data size for I/O:
- There will always be 4 bytes of input and 4 bytes of output data used.
- Digital IO: Each channel will consume 1 bit of process data.
- Complex IO: Please refer to terminal documentation for consumed data size.
Working with IO data
Download the code to the controller unit. Go online to toggle IO. Keep in mind that the first DINT is the Status for both the input and output data. At this point, if the controller is in RUN mode, toggle inputs to see the value in "bk9105:I.Data[1]" change. One should be able to update the values in "bk9105:O.Data[1]" and see the outputs change.