DeviceNet interface
Init_DeviceNet
ADwin
178
ADwin-Gold II
, Manual February 2013
Init_DeviceNet
Init_DeviceNet
initializes the DeviceNet Slave.
Syntax
#Include
ADwinGoldII.Inc
ret_val
=
Init_DeviceNet
(
dev_adr
,
baudrate
,
in_mod_cnt
,
in_mod_type
,
out_mod_cnt
,
out_mod_type
,
work_arr
[],
info
[])
Parameters
Notes
This instruction must be processed before working with DeviceNet
Slave.
Init_DeviceNet
should be processed in a program section with low
priority, because of the long processing time (about 2-3 seconds). Using
T11
dev_adr
Slave node address / station address (1…125) on
the DeviceNet.
LONG
baudrate
Key number for the baudrate, the DeviceNet bus
is run with:
0: 125 kBit
1: 250 kBit
2: 500 kBit
3: automatic adaption to the current baudrate of
the DeviceNet bus (autobaud).
LONG
i n _ m o d _
cnt
Number (1…255) of input areas in the DeviceNet
Slave. The max. number depends on
in_mod_
type
.
LONG
i n _ m o d _
type
Key number (1…3, 16) for the length of input
areas:
1: 1 Byte; max. value for
in_mod_cnt
: 255.
2: 2 Byte; max. value for
in_mod_cnt
: 127.
3: 4 Byte; max. value for
in_mod_cnt
: 63.
16:8 Byte; max. value for
in_mod_cnt
: 31.
LONG
o u t _ m o d _
cnt
Number (0…76) of output areas in the DeviceNet
Slave. The max. number depends on
out_mod_
type
.
LONG
o u t _ m o d _
type
Key number (1…3, 16) for the length of output
areas:
1: 1 Byte; max. value for
out_mod_type
: 255.
2: 2 Byte; max. value for
out_mod_type
: 127.
3: 4 Byte; max. value for
out_mod_type
: 63.
16:8 Byte; max. value for
out_mod_type
: 31.
LONG
w o r k _
arr
[]
Array to store data for operation of the DeviceNet
Slave. The array must have at least 200 elements.
ARRAY
LONG
info
[]
Array holding data about the DeviceNet Slave.
The array must have at least 10 elements.
The elements
info
[
1
]
and
info
[
2
]
contain the
production type of the DeviceNet Slave:
info
[
1
]
=1,
info
[
2
]
=4
ARRAY
LONG
ret_val
State of initialization:
0: no error.
≠
0: Error; please contact the support of Jäger
Messtechnik.
LONG