plc:ferror_implementation
Differences
This shows you the differences between two versions of the page.
plc:ferror_implementation [2018/09/24 21:16] – created skirillov | plc:ferror_implementation [2018/09/24 21:41] (current) – skirillov | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== FERROR implementation ===== | ===== FERROR implementation ===== | ||
+ | |||
+ | <code C FERROR.plc> | ||
+ | main() | ||
+ | { | ||
+ | |||
+ | do{ | ||
+ | |||
+ | |||
+ | ferror=0; | ||
+ | n=0; | ||
+ | a0=gvarget(9016); | ||
+ | a1=gvarget(9017); | ||
+ | a2=gvarget(9018); | ||
+ | a3=gvarget(9019); | ||
+ | a4=gvarget(9020); | ||
+ | a5=gvarget(9021); | ||
+ | |||
+ | |||
+ | if (a0> | ||
+ | if (a1> | ||
+ | if (a2> | ||
+ | if (a3> | ||
+ | if (a4> | ||
+ | if (a5> | ||
+ | |||
+ | |||
+ | if (ferror!=0) //turn off ALL the servos | ||
+ | { | ||
+ | | ||
+ | }; | ||
+ | |||
+ | }while(1); | ||
+ | |||
+ | exit(99); | ||
+ | }; | ||
+ | |||
+ | </ | ||
plc/ferror_implementation.txt · Last modified: 2018/09/24 21:41 by skirillov