PLC 16 in / 8 rev / an in-out / CAN
Dependencies: PCAL955x mbed mbed-rtos AT45
src/task_ob.cpp@0:d05a7158dbad, 2021-02-07 (annotated)
- Committer:
- Oleg_B
- Date:
- Sun Feb 07 05:08:51 2021 +0000
- Revision:
- 0:d05a7158dbad
main prog for PLC1608
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Oleg_B | 0:d05a7158dbad | 1 | |
Oleg_B | 0:d05a7158dbad | 2 | /******************* организационный блок ************************/ |
Oleg_B | 0:d05a7158dbad | 3 | // формируем условия и порядок вызова логических |
Oleg_B | 0:d05a7158dbad | 4 | // задач пользователя |
Oleg_B | 0:d05a7158dbad | 5 | |
Oleg_B | 0:d05a7158dbad | 6 | // задачи пользователя |
Oleg_B | 0:d05a7158dbad | 7 | #include "task_pb1.h" |
Oleg_B | 0:d05a7158dbad | 8 | #include "task_pb2.h" |
Oleg_B | 0:d05a7158dbad | 9 | #include "task_pb3.h" |
Oleg_B | 0:d05a7158dbad | 10 | |
Oleg_B | 0:d05a7158dbad | 11 | // подключаем глоб. переменные |
Oleg_B | 0:d05a7158dbad | 12 | #include "ext_vars.h" |
Oleg_B | 0:d05a7158dbad | 13 | |
Oleg_B | 0:d05a7158dbad | 14 | |
Oleg_B | 0:d05a7158dbad | 15 | // локальные переменные |
Oleg_B | 0:d05a7158dbad | 16 | int tmp = 0 ; |
Oleg_B | 0:d05a7158dbad | 17 | |
Oleg_B | 0:d05a7158dbad | 18 | |
Oleg_B | 0:d05a7158dbad | 19 | int task_ob() |
Oleg_B | 0:d05a7158dbad | 20 | { |
Oleg_B | 0:d05a7158dbad | 21 | int sts=0 ; |
Oleg_B | 0:d05a7158dbad | 22 | |
Oleg_B | 0:d05a7158dbad | 23 | |
Oleg_B | 0:d05a7158dbad | 24 | if(x16==0){ |
Oleg_B | 0:d05a7158dbad | 25 | task_pb1(); |
Oleg_B | 0:d05a7158dbad | 26 | task_pb2(); |
Oleg_B | 0:d05a7158dbad | 27 | }else{ |
Oleg_B | 0:d05a7158dbad | 28 | task_pb3(); |
Oleg_B | 0:d05a7158dbad | 29 | } |
Oleg_B | 0:d05a7158dbad | 30 | |
Oleg_B | 0:d05a7158dbad | 31 | |
Oleg_B | 0:d05a7158dbad | 32 | |
Oleg_B | 0:d05a7158dbad | 33 | sts=1; |
Oleg_B | 0:d05a7158dbad | 34 | return sts; |
Oleg_B | 0:d05a7158dbad | 35 | } |
Oleg_B | 0:d05a7158dbad | 36 |