![Jäger ADwin-Gold II Скачать руководство пользователя страница 191](http://html1.mh-extra.com/html/jager-0/adwin-gold-ii/adwin-gold-ii_manual_3209266191.webp)
ADwin-Gold II
, Manual February 2013
185
EtherCAT interface
ECAT_Run
ADwin
ECAT_Run
ECAT_Run
exchanges data with the EtherCAT interface.
Syntax
#Include
ADwinGoldII.inc
ret_val
=
ECAT_Run
(
in_pd_arr
[],
in_pd_arr_len
,
out_pd_arr
[],
out_pd_arr_len
,
work_arr
[])
Parameters
Notes
ECAT_Run
should be processed in a program section with low priority,
because of the long processing time. Using the instruction in a (non-in-
terruptable) 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-EtherCAT
See also
Example
see
T11
i n _ p d _
arr
[]
Array from which the EtherCAT interface reads
data and writes them to the EtherCAT bus.
ARRAY
LONG
i n _ p d _
arr_len
Number of input bytes (1…254), 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
ECAT_Init
.
LONG
o u t _ p d _
arr
[]
Array into which the EtherCAT slave writes data,
which are read by the EtherCAT bus.
ARRAY
LONG
o u t _ p d _
arr_len
Number of output bytes (1…254), 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
ECAT_Init
.
LONG
work_arr
[]
Array holding data for operation of the EtherCAT
slave, see
ECAT_Init
.
ARRAY
LONG
ret_val
Bit pattern holding the state of operation of the
EtherCAT slave. Only bits Bits 0…2 are important:
000b
: Interface is being initiallized.
010b
: Interface inactive and waiting.
100b
: Interface is active and runs correcty.
110b
,
111b
: Error, please check configuration.
LONG