Herunterladen Inhalt Inhalt Diese Seite drucken

JÄGER ADwin-Pro II Systembeschreibung Seite 63

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

Werbung

ADwin
wartet, bis das Einschwingen des Multiplexers auf dem angegebenen
P2_Wait_Mux
Modul abgeschlossen ist.
Syntax
#Include
ADwinPro_All.Inc
P2_Wait_Mux
module
(
Parameter
Eingestellte Moduladresse (1...15).
module
Bemerkungen
Wenn Sie den Multiplexer mit
dauert es eine bestimmte Zeit, bis der Multiplexer eingeschwungen ist. Der Be-
fehl
wartet auf diesen Zeitpunkt, so dass Sie direkt anschließend
P2_Wait_Mux
eine Signalwandlung starten können.
Wenn der Multiplexer auf den gleichen Kanal eingestellt ist wie bei der vorheri-
gen Wandlung, oder wenn der Multiplexer bereits eingeschwungen ist, entfällt
die Wartezeit automatisch.
Siehe auch
P2_ADC, P2_ADC24, P2_Set_Mux, P2_Start_Conv,
Gültig für
AIn-16/18-8B Rev. E, AIn-16/18-C Rev. E, AIn-32/18-D Rev. E, AIn-32/18-D-Ti-
Co Rev. E, AIn-8/18 Rev. E, AIn-8/18-8B Rev. E, AIn-8/18-TiCo Rev. E, MIO-4
Rev. E, MIO-4-ET1 Rev. E
Beispiel
#Include
ADwinPro_All.Inc
#Define
module
1
Init:
P2_Seq_Init(module,0,0,0,0)
P2_Set_Mux(module,0b)
P2_Wait_Mux(module)
P2_Start_Conv(module)
Processdelay=30000
Event:
P2_Set_Mux(module,0100000001b)
P2_Wait_EOC(module)
Par_1
= P2_Read_ADC(module)
P2_Wait_Mux(module)
P2_Start_Conv(module)
P2_Set_Mux(module,0b)
P2_Wait_EOC(module)
Par_2
= P2_Read_ADC(module)
P2_Wait_Mux(module)
P2_Start_Conv(module)
ADwin-Pro II Software, Handbuch Apr. 2021
)
auf einen neuen Kanal einstellen,
P2_Set_Mux
'switch off sequential control mode
'set multiplexer to input 1, gain 1
'start AD conversion
'cycle-time 0.1 ms
'set MUX to input 2, gain 2
'wait for end of conversion
'read channel value 1 from the ADC
'wait for end of settling time
'start AD conversion
'set MUX to input 1, gain 1
'wait for end of conversion
'read channel value 2 from the ADC
'wait for end of settling time
'start AD conversion
LONG
P2_Read_ADC
Pro II: Analoge Eingänge
P2_Wait_Mux
P2_Wait_Mux
59

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis