PLC 16 in / 8 rev / an in-out / CAN
Dependencies: PCAL955x mbed mbed-rtos AT45
src/task_pb2.cpp@2:439534d6bb89, 2021-02-12 (annotated)
- Committer:
- Oleg_B
- Date:
- Fri Feb 12 10:55:27 2021 +0000
- Revision:
- 2:439534d6bb89
- Parent:
- 0:d05a7158dbad
files move to f
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Oleg_B | 0:d05a7158dbad | 1 | |
Oleg_B | 0:d05a7158dbad | 2 | /******************* логическая задача 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 | // подключаем глоб. переменные |
Oleg_B | 0:d05a7158dbad | 8 | #include "ext_vars.h" |
Oleg_B | 0:d05a7158dbad | 9 | |
Oleg_B | 0:d05a7158dbad | 10 | |
Oleg_B | 0:d05a7158dbad | 11 | // локальные переменные |
Oleg_B | 0:d05a7158dbad | 12 | int test2 = 0 ; |
Oleg_B | 0:d05a7158dbad | 13 | |
Oleg_B | 0:d05a7158dbad | 14 | |
Oleg_B | 0:d05a7158dbad | 15 | int task_pb2() |
Oleg_B | 0:d05a7158dbad | 16 | { |
Oleg_B | 0:d05a7158dbad | 17 | int sts=0 ; |
Oleg_B | 0:d05a7158dbad | 18 | |
Oleg_B | 0:d05a7158dbad | 19 | |
Oleg_B | 0:d05a7158dbad | 20 | // test |
Oleg_B | 0:d05a7158dbad | 21 | if(x01==1){ |
Oleg_B | 0:d05a7158dbad | 22 | test2=20; |
Oleg_B | 0:d05a7158dbad | 23 | }else{ |
Oleg_B | 0:d05a7158dbad | 24 | test2=0; |
Oleg_B | 0:d05a7158dbad | 25 | } |
Oleg_B | 0:d05a7158dbad | 26 | |
Oleg_B | 0:d05a7158dbad | 27 | |
Oleg_B | 0:d05a7158dbad | 28 | |
Oleg_B | 0:d05a7158dbad | 29 | sts=1; |
Oleg_B | 0:d05a7158dbad | 30 | return sts; |
Oleg_B | 0:d05a7158dbad | 31 | } |
Oleg_B | 0:d05a7158dbad | 32 |