Herunterladen Inhalt Inhalt Diese Seite drucken

JÄGER ADwin-X-A20 Handbuch Seite 187

Inhaltsverzeichnis

Werbung

ADwin
Beispiel
REM Example process for ADwin-X-A20 and 2 modules HSM-24V
REM Set process to low priority!
#Include
ADwin-X.inc
Init:
Processdelay
=
4000000
REM settings for LS module 1
Par_1
= LS_DIO_Init(1)
REM enable watchdog with 1.1 s
Par_2
= LS_Watchdog_Init(1, 1, 1100)
REM set LS channels 1...32 as outputs
Par_3
= LS_Digprog(1, 01111b)
REM settings for LS module 3
Par_11
= LS_DIO_Init(3)
REM enable watchdog with 1.1 s
Par_12
= LS_Watchdog_Init(3, 1, 1100)
REM set LS channels 1...32 as inputs
Par_13
= LS_Digprog(3, 0h)
Event:
REM check for over-current
Par_5
= LS_Get_Output_Status(1) + LS_Get_Output_Status(3)
If
(Par_5
> 0)
Then End
REM set one channel to high, rotating from 1 To 32
Inc
Par_15
If
(Par_15
>= 32)
Par_16
= Shift_Left(1, PAR_15)
REM set LS channels of module 1
LS_Digout_Long(1, Par_16)
REM read LS channels of module 3
Par_17
= LS_Digin_Long(3)
REM reset watchdog
LS_Watchdog_Reset()
ADwin-X-A20, Handbuch Sep. 2019
'10Hz HP
'over-current: Exit program
Then
Par_15
=
0
LS-Bus + ADwin-X-A20
LS_Get_Output_Status
181

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis