DeviceNet interface
Run_DeviceNet
ADwin
180
ADwin-Gold II
, Manual February 2013
Run_DeviceNet
Run_DeviceNet
exchanges data with the DeviceNet Slave.
Syntax
#Include
ADwinGoldII.Inc
ret_val
=
Run_DeviceNet
(
out_pd_arr
[],
out_pd_arr_len
,
in_pd_arr
[],
in_pd_arr_len
,
work_arr
[])
Parameters
Notes
Run_DeviceNet
should be processed in a program section with low
priority, because of the long processing time. Using the instruction in a
(non-interruptable) high priority process, the communication between
PC and
ADwin
system would be interrupted too long and thus produce
an error message (timeout).
Each array element in
in_pd_arr
[]
and
out_pd_arr
[]
contains a
single data byte only (bits 0…7). Data areas of more than one byte
length are saved in the appropriate number of consecutive array ele-
ments. Example: 5 data areas of 4 byte length are stored in 5
×
4=20 ar-
ray elements.
Valid for
Gold II-DeviceNet
See also
Example
T11
o u t _ p d _
arr
[]
Array from which the DeviceNet Slave reads data
and writes them to the DeviceNet.
ARRAY
LONG
o u t _ p d _
arr_len
Number of output bytes (1…255), the data of
which are read from the array
out_pd_arr
[]
.
The number may not be greater than given in
out_mod_cnt
with
Init_DeviceNet
.
LONG
i n _ p d _
arr
[]
Array into which the DeviceNet-Slave writes data,
which are read by the DeviceNet.
ARRAY
LONG
i n _ p d _
arr_len
Number of input bytes (1…255), the data of which
are returned in the array
in_pd_arr
[]
.
The number may not be greater than given in
in_
mod_cnt
with
Init_DeviceNet
.
LONG
w o r k _
arr
[]
Array holding data for operation of the DeviceNet
Slave, see
Init_DeviceNet
.
ARRAY
LONG
ret_val
Key number for the state of operation of the
DeviceNet Slave:
0
: Slave is initialized.
2
: DeviceNet inactive, Slave is waiting.
4
: DeviceNet active.
other values: Error.
LONG