Proyecto de Tesis en Mecatrónica. Universidad Técnica del Norte. Ernesto Palacios <mecatronica.mid@gmail.com>
Dependencies: EthernetNetIf HTTPServer QEI_hw RPCInterface mbed
Diff: setup.cpp
- Revision:
- 34:bdf918bc9b59
- Parent:
- 33:e6ff02c3e0f5
- Child:
- 35:92b0f1b75a51
- Child:
- 36:a99dcd4d8f65
- Child:
- 37:20f4a737cc13
--- a/setup.cpp Tue Jun 24 17:42:25 2014 +0000 +++ b/setup.cpp Sat Jul 05 04:11:35 2014 +0000 @@ -856,7 +856,31 @@ } - +void getALM_eth ( char * input, char * output ) +{ + + if( pin_alm == 0 ) + { + if ( limite_2 == 1 ) // Alarma muy cerca al encoder + { + sprintf( output,"A2\r\n" ); + } + if ( limite_3 == 1 ) // Alarma muy cerca al encoder + { + sprintf( output,"A1\r\n" ); + } + if ( limite_1 == 1 || limite_4 == 1 ) // ERROR DE POSICION + { + sprintf( output,"A0\r\n" ); + } + + else + sprintf( output,"OK\r\n" ); + } + else + sprintf( output,"AL" ); + +} /* LEGACY FUNCTIONS