Herunterladen Inhalt Inhalt Diese Seite drucken

JÄGER ADwin-Gold II Handbuch Seite 189

Vorschau ausblenden Andere Handbücher für ADwin-Gold II:
Inhaltsverzeichnis

Werbung

ADwin
Beispiel
#Include
ADwinGoldII.INC
#Define
out_arr
Data_2
#Define
in_arr
Data_3
Dim
out_arr[76]
As Long At DM_Local
Dim
in_arr[76]
As Long At DM_Local
Dim
conf_arr[4096]
As Long At DM_Local
Dim
i
As Long
Dim
state
As Long
LowInit:
Processdelay
=
3000000
Rem initialize Profinet interface: 38 input data areas of 2 byte
Rem and 76 output data bytes of 1 Byte
error
= Init_ProfinetIO(38,2,76,1,conf_arr)
Event:
Rem set data in out_arr[] to be transferred
For
i
=
1
To
76
out_arr[i] = (out_arr[i] + i)
Next
i
Rem send and read data (output bytes: 76; input bytes: 76)
state
=
Run_ProfinetIO(out_arr,76,in_arr,76,conf_arr)And
Par_2
=
state
Rem here the received data in in_arr[] can be processed
ADwin-Gold II, Handbuch Dez. 2018
'set to 100 Hz
And
0FFh
Profinet-Schnittstelle
Init_ProfinetIO
7h
183

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis