Herunterladen Inhalt Inhalt Diese Seite drucken

JÄGER ADwin-Pro II Systembeschreibung Seite 202

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

Werbung

Pro II: PWM-Ausgänge
P2_PWM_Write_Latch_Block
198
Beispiel
#Include
ADwinPro_All.inc
#Define
module
4
#Define
freq
Data_1
#Define
pw
Data_2
Dim
freq[16]
As Float
Dim
pw[16]
As Float
Dim
channel
As Long
Init:
For
channel
=
1
freq[channel] =
16: 16 KHz
pw[channel] =
Next
P2_PWM_Reset(module,0FFFFh)'stop all channels
For
channel
=
1
P2_PWM_Init(module,channel,0,0,0,0)
Next
P2_PWM_Write_Latch_Block(module, pw, freq, 3)
P2_PWM_Latch(module,0FFFFh)
P2_PWM_Enable(module,0FFFFh)'start output
Event:
P2_PWM_Write_Latch_Block(module, pw, freq, 3)
P2_PWM_Latch(module,11b)
To
16
1000
*
channel
'channel 1: 1 kHz, channel
50
'all channels 50 %
To
16
ADwin-Pro II Software, Handbuch Version 1.6, Januar 2010
ADwin

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis