Herunterladen Inhalt Inhalt Diese Seite drucken

JÄGER ADwin-Pro II Systembeschreibung Seite 280

Programmierung in adbasic
Vorschau ausblenden Andere Handbücher für ADwin-Pro II:
Inhaltsverzeichnis

Werbung

Pro II: Flexray
P2_FlexRay_Init
276
Beispiel
#Include
ADwinPro_All.inc
Dim
fr_datatable[150]
Dim
value,
status
As Long
Init:
Rem initialize communication to the FlexRay controller
P2_FlexRay_Init(1, fr_datatable, status)
If
(status
<> 0)
Then Exit
Event:
Rem read address 210h from controller 1
value
= P2_FlexRay_Read_Word(fr_datatable,1,210h,status)
If
(status
<> 0)
Then End
If
(value
= 15)
Then
Rem read address 220h from controller 1
value
= P2_FlexRay_Read_Word(fr_datatable,1,220h,status)
Else
Rem write value to address 192h of controller 1
P2_FlexRay_Write_Word(fr_datatable,1,192h,value,status)
EndIf
Finish:
If
(status
<> 0)
Then
Rem set Par_1 to error number
Par_1
=
status
EndIf
As Long
ADwin-Pro II Software, Handbuch Version 1.6, Januar 2010
ADwin

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis