The text of a spec sheet · part 2 of 2
DO135, pages 7 to 12
Pages 7 to 12 of 12
The original document is the PDF (452 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the B & R Automation DO135
Page 7
8.6.9 Access Using CAN IDs Access via CAN Identifiers is used if the slave is being controlled by a device from another manufacturer. Access via CAN Identifiers is described in an example in Chapter 4, "Module Addressing". The transfer modes are explained in Chapter 5, "CAN Bus Controller Functions". Input Data (switching phase counter) The switching phase counter can be transferred packed or unpacked in pulse width modulation operating mode. CAN objects can only be sent back in packed mode. 1)
Slot 1
542
1)
ScrM 1L
Slot 2
ScrM 1H
ScrM 2L
Slot 3
ScrM 2H
ScrM 3L
543 free
544 free
545 free
ScrM 3H
Slot 4 ScrM 4L
ScrM 4H
Chapter 3 B&R 2003 Modules
CAN ID
CAN ID = 542 + (nd - 1) x 16 + (ma - 1) x 4 nd ..... Node number of the CAN slave = 1 ma .... Module address of the AF101 = 1
Four CAN objects can be sent back in unpacked mode.
1)
1)
Slot
CAN ID
Word 1
Word 2
Word 3
1
542
ScrM 1L
ScrM 1H
Not used (2 byte objects)
2
543
ScrM 2L
ScrM 2H
Not used (2 byte objects)
3
544
ScrM 3L
ScrM 3H
Not used (2 byte objects)
4
545
ScrM 4L
ScrM 4H
Not used (2 byte objects)
Word 4
CAN ID = 542 + (nd - 1) x 16 + (ma - 1) x 4 + (sl - 1) nd ..... Node number of the CAN slave = 1 ma .... Module address of the AF101 = 1 sl ....... Slot number of the screw-in module on the AF101 (1 - 4)
B&R 2003 Modules
DO135
191
Page 8
Output Data It is not possible to pack output data with the DO135. Therefore one CAN object is transferred per screwin module. If an adapter module AF101 is equipped with a four DO135 modules, the CAN object has the following structure:
1)
1)
Slot
CAN ID
1
1054
Chan. 1L
Word 1 Chan. 1H
Chan. 2L
Word 2 Chan. 2H
Chan. 3L
Word 3 Chan. 3H
Chan. 4L
Word 4 Chan. 4H
2
1055
Chan. 1L
Chan. 1H
Chan. 2L
Chan. 2H
Chan. 3L
Chan. 3H
Chan. 4L
Chan. 4H
3
1056
Chan. 1L
Chan. 1H
Chan. 2L
Chan. 2H
Chan. 3L
Chan. 3H
Chan. 4L
Chan. 4H
4
1057
Chan. 1L
Chan. 1H
Chan. 2L
Chan. 2H
Chan. 3L
Chan. 3H
Chan. 4L
Chan. 4H
CAN ID = 1054 + (nd - 1) x 16 + (ma - 1) x 4 + (sl - 1) nd ..... Node number of the CAN slave = 1 ma .... Module address of the AF101 = 1 sl ....... Slot number of the screw-in module on the AF101 (1 - 4)
B&R 2000 users have to exchange the data so that the high data is first (Motorola format)! For more information on ID allocation, see Chapter 5, "CAN Bus Controller Functions". 8.6.10 Description of Data and Configuration Words Data Word 0 (read) The switching phase of all channels in the pulse width modulation mode are counted with a 16-bit switching phase counter. The counter value can be read from data word 0. It operates like a free running counter. This means that after reaching its highest value of 65535, the counter resets and begins again from 0. The switching phase the output is currently in can be determined using the counter value. Even Counter Value: Odd Counter Value:
Switch-on phase Switch-off phase
Switching Phase In the switch-on phase (counter value is even), the output changes from OFF to ON. In the switch-off phase (counter value is odd), the output changes from ON to OFF. The switching time is determined by the pulse width ratio. 192
DO135
Chapter 3
Page 9
Data words 0, 1, 2, 3 (write) The output status and the pulse width ratio are defined with these data words according to the operating mode set. Normal Operation Bit 0 corresponds to the output state. Output 1 = 0 ............. Data word 0 = $0000 Output 1 = 1 ............. Data word 0 = $0001 : : Output 4 = 0 ............. Data word 3 = $0000 Output 4 = 1 ............. Data word 3 = $0001
Chapter 3 B&R 2003 Modules
Pulse Width Modulation This operating mode defines the pulse width ratio. 32767 ($7FFF) ....... 100 % 0 ($0000) ........... 0 % Neg. Values ........... 0 % Example Outputs 3 and 4 use operating mode pulse width modulation. The following pulse width ratios are defined: Output 3 ......... 25 %
=>
25 % of 32767 = 8192 ($2000) in data word 2
Output 4 ......... 75 %
=>
75 % of 32767 = 24575 ($5FFF) in data word 3
B&R 2003 Modules
DO135
193
Page 10
Configuration Word 8 (write) The period time is defined with configuration word 8. The period time depends on the factor used (see configuration word 9). The standard value for the factor is 4. This results in the definition of the period time in milliseconds (0 - 65535). If the period time is set to 0, the outputs keep their value after the current period has passed (normally log 0, only log 1 with a pulse width ratio of 100%). The period counter is then cleared and remains 0. If the period time is changed to a value between 1 and 65535, the period counter will be stopped, cleared and restarted with the new value after the current period of the period counter. Period Time Unit The period time unit is calculated with the following formula: Period time unit = 250 µs * factor Example A factor of 4 gives the following period time unit: Period time unit= 250 µs * 4 = 1 ms Configuration Word 9 (write) The factor for the period time is defined with configuration word 9 (see configuration word 8). The standard value for the factor is 4. This results in the definition of the period time in milliseconds. The range of values lays between 1 and 256. Larger values are limited to 256. 0 will be set to 256!
Pulse Width Modulation Resolution Pulse width modulation resolution is calculated using the following formula: PWM resolution = 125 µs * factor The PWM resolution corresponds to the smallest pulse time.
194
DO135
Chapter 3
Page 11
Example A typical module frequency range between 0.1Hz and 10 Hz results in the following resolution with a factor of 4: Frequency
Period Time
Resolution
Smallest Pulse Width Ratio
0.1 Hz
10 s
20000 Ticks
0005 %
10 Hz
0.1 s
200 Ticks
0.5 %
To double the resolution with the same effective value, the factor can be divided in half. Configuration word 12 (read)
Bit 8 - 15 x x x x x x x x 15
Chapter 3 B&R 2003 Modules
Configuration word 12 contains the module status. Description x .... Not defined, masked out
7
0.... Supply voltage ≤30 V 1.... Supply voltage >30 V
6
0.... Supply voltage ≥10.5 V 1.... Supply voltage <10.5 V or current limitation has responded
5
0.... Half-period counter for pulse width modulation is counting 1.... Half-period counter for pulse width modulation is not counting
4 x .... Not defined, masked out
3
Switching level output 4
2
Switching level output 3
1
Switching level output 2
0
Switching level output 1 x
8 7
0
Configuration Word 14 (read) The High Byte of configuration word 14 defines the module code. Bit
Description
8 - 15
Module code = $14
0-7 x ....Not defined, masked out
0 0 0 1 0 1 0 0 x x x x x x x x 15
8 7
B&R 2003 Modules
0
DO135
195
Page 12
Configuration Word 14 (write) The module is configured using configuration word 14. Channel is not active All outputs are tristate when they are all set to operating mode "channel not active". TPU Operation The output state is defined with LTX functions (e.g. LTXdo0()) for outputs with this operating mode. Bit
Description
8 - 15
0
6-7
Operating mode for output 4 0.... Channel is not active 1.... Normal operation 2.... Pulse width modulation 3.... TPU operation
4-5
Operating mode for output 3 0.... Channel is not active 1.... Normal operation 2.... Pulse width modulation 3.... TPU operation
2-3
Operating mode for output 2 0.... Channel is not active 1.... Normal operation 2.... Pulse width modulation 3.... TPU operation
0-1
Operating mode for output 1 0.... Channel is not active 1.... Normal operation 2.... Pulse width modulation 3.... TPU operation
0 0 0 0 0 0 0 0 15
196
8 7
0
DO135
Chapter 3