![Reliance electric 57C409 Скачать руководство пользователя страница 22](http://html1.mh-extra.com/html/reliance-electric/57c409/57c409_instruction-manual_1436351022.webp)
4Ć6
4.3.2
Control Block Task Example
This example will read an analog input from channel 1 every 55
milliseconds and store the inverted value in the symbol READING%.
The analog value will be digitized every 500 microseconds.
1003 ! common data declarations
1004 !
1005 COMMON ANALOG INPUT 1%
\!Data from channel 1
1010 COMMON CCLK ENABLE 0@
\!Common clock enable Ć 0
1020 COMMON CCLK ENABLE 1@
\!Common clock enable Ć 1
1030 COMMON UPDATE TIME 1%
\!Update period for channel 1
1040 COMMON INPUT 1 FILTER%
\!Input filter for channel 1
1400 !
1450 ! local data declarations
1475 !
1500 LOCAL READING%
\!Current negative value of input
1600 !
1900 ! task initialization
1950 !
2000 INPUT 1 FILTER% = 0
\!300 rad/sec crossover frequency
2010 UPDATE TIME 1% = 1
\!500 microsecond conversion
2020 CCLK ENABLE 0@ = TRUE
\!Turn on the clock
2030 CCLK ENABLE 1@ = TRUE
\!Must turn on both outputs
4000 !
4001 ! Place any additional initialization statements here
4002 !
4900 ! The rest of the task is run every 55 milliseconds
4950 !
5000 CALL SCAN LOOP( TICKS=10)
5010 CALL INVERTER( INPUT= ANALOG INPUT 1%, &
OUTPUT=READING%)
10000 END
The symbolic names defined as COMMON" reference the inputs
defined in the configuration. The symbolic name READING%" is
local to the BASIC task and does not have I/O associated with it.
4.4
Using Interrupts in Application Tasks
Interrupts are used to synchronize software tasks with the analog to
digital conversion. This input module supports separate interrupts for
each A/D channel. The update period may be specified from 500
microseconds up to a maximum of 32.7675 seconds in increments of
500 microseconds.
In order to use interrupts on the input module, it is necessary to
assign symbolic names to the interrupt control registers. In AutoMax
Version 2.1 and earlier, this is accomplished with IODEF statements in
the configuration task. See Appendix E for an example. In AutoMax
Version 3.0 and later, you assign symbolic names using the
Programming Executive.
Only one task may act as a receiver for a particular hardware
interrupt. That task should declare the symbolic names assigned to
the interrupt control registers on the input module as COMMON.
Содержание 57C409
Страница 1: ......
Страница 2: ......
Страница 3: ......
Страница 4: ......
Страница 5: ......
Страница 6: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd...
Страница 7: ......
Страница 8: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd...
Страница 9: ......
Страница 10: ......
Страница 11: ......
Страница 12: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd...
Страница 13: ......
Страница 14: ......
Страница 15: ......
Страница 16: ......
Страница 17: ......
Страница 18: ......
Страница 19: ......
Страница 20: ......
Страница 21: ......
Страница 22: ......
Страница 23: ......
Страница 24: ......
Страница 25: ......
Страница 26: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd...
Страница 27: ......
Страница 28: ......
Страница 29: ......
Страница 30: ......
Страница 31: ......
Страница 32: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd...
Страница 33: ......
Страница 34: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd...
Страница 35: ......
Страница 36: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd...
Страница 37: ......
Страница 38: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd...
Страница 39: ......
Страница 40: ......
Страница 41: ......
Страница 42: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd...
Страница 43: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd...