BK9500 - Bus Coupler for USB

Process data and the process image

After being switched on, the Bus Coupler determines automatically the configuration of the inserted input/output terminals. The assignment of the physical slots for the input/output channels and the addresses in the process image is carried out automatically by the Bus Coupler.

The Bus Coupler creates an internal assignment list, in which the input/output channels have a specific position in the process image of the Bus Coupler. A distinction is made here according to inputs and outputs, and according to bit-oriented (digital) and byte-oriented (analog or complex) signal processing. 

Two groups are created, one for inputs and the other for outputs. Each group has the byte-oriented channels in ascending sequence, starting from the lowest address, and these are followed by the bit-oriented channels.

 

Digital signals (bit-oriented)

The (binary) digital signals are bit-oriented. This means that one bit in the process image is assigned to each channel. The Bus Coupler creates a memory area containing the current input bits, and ensures that the bits in a second (output) memory area dedicated to the output channels are written out immediately, following the update command. The details of the assignment of the input and output channels to the controller's process image is explained fully with the aid of an example in the appendix.

 
 

Analog signals (byte-oriented)

The processing of analog signals is always byte-oriented. Analog input and output values are represented in memory by two bytes each. Values are represented in SIGNED INTEGER format. The number 0 stands for the input/output value 0 V, 0 mA or 4 mA. The maximum value of an output or input value is represented, according to the standard settings, by 0x7FFF. The intermediate values are correspondingly proportional. A range with a resolution of 15 bits is not achieved for all inputs and outputs. If the actual resolution is 12 bits, the last three bits have no effect in outputs, while as inputs they are read as 0. Each channel also has a control and status byte. The control and status byte is the most significant byte in the most significant word. An analog channel is represented by 4 bytes in the process image, of which 3 bytes are used. In the BK3000 and BK4000 only 2 bytes are occupied in the process image of the corresponding bus system for each analog channel. The Bus Terminal's control and status bytes can also be included through appropriate configuration of the Bus Coupler and Bus Terminals.

 
 

Special signals and interfaces

The Bus Coupler supports Bus Terminals with other interfaces such as RS232, RS485, incremental encoder and others. These signals can be considered similarly to the analog signals named above. For some special signals the bit width of 16 is not sufficient. The Bus Coupler can support any byte width. It is necessary to consider how data consistency is ensured when accessing these values. This means that update commands must not be issued nor must the Bus Coupler be placed into the free running mode between the accesses.

 
 

Default assignment of inputs/outputs to the process image

Once it has been switched on, the Bus Coupler finds out how many Bus Terminals are inserted, and creates an assignment list. The analog and digital channels, divided into inputs and outputs, are assembled into separate parts of this list. The assignment starts on the left next to the Bus Coupler. The software in the Bus Coupler collects consecutively the individual entries for each of the channels in order to create the assignment list counting from left to right. Four groups are distinguished in the assignment:

Group
Functional type of the channel
Assignment
1
Analog outputs
byte-wise
2
Digital outputs
bit-wise
3
Analog inputs
byte-wise
4
Digital inputs
bit-wise

All complex Bus Terminals are represented by analog inputs or outputs.

 

Overview of the distribution of the process image within the Bus Coupler

 

Output data in the Bus Coupler

Output data in the Bus Coupler
 
 

Input data in the Bus Coupler

Input data in the Bus Coupler
 
 

Data consistency

Items of data are said to be consistent if their content all belongs together, and if they are transmitted as a single block. Examples of data items that belong together are:

the high and low bytes of an analog value (word consistency)
a control/status byte and the associated parameter word for access to the registers

Data consistency in the interaction of peripheral devices and their controllers is, in a basic sense, only assured for a single byte. In other words, the bits of a byte are written or read together. Byte consistency is sufficient for the transmission of digital (binary) signals.
When transmitting process data with a length greater than 8 bits (e.g. analog values) the consistency must be appropriately extended, bearing in mind any properties relating to data consistency specific to the fieldbus. The TwinCAT driver for process data transmission over the USB always exchanges in the entire BK9500 process image, so that the BK9500 can ensure data consistency when the K-Bus cycles are not free running.