This is a remote control tester, it uses a CNC, Ethernet Communication with a JAVAFX interface and a PLC in order to control some valves.

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of CNC_CONTROLLER by Lahis Almeida

Revision:
0:7cedfb720712
Child:
1:ef18c260ce02
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EixoMonitoring.h	Wed Jun 07 13:31:02 2017 +0000
@@ -0,0 +1,50 @@
+#ifndef EIXO_MONITORING_H
+#define EIXO_MONITORING_H
+
+#include "mbed.h" 
+#include "rtos.h"
+#include "Debug.h"
+
+
+//#define DELAY_TIMER 500
+
+class EixoMonitoring {
+    
+    public:
+             int    delayTimer; 
+             int    hitSensor;
+       Debug* debug;  
+             
+    
+       // Variáveis e Controle do Movimento do Eixo
+             static bool stopAll;  // false: n calibrado       true: calibrado, cnc está no estágio de teste
+             static bool isCalibrated;  // false: n calibrado       true: calibrado, cnc está no estágio de teste
+       bool stopMoviment;         // false: gira motor        true: pára motor
+       bool stopMonitoring;       // false: executa threads   true: pára threads 
+    
+       // Switches e seu vetor de leitura
+             int sensorInput_End;  
+             DigitalIn*  sensor_End;
+             int sensorInput_Origin;  
+             DigitalIn*  sensor_Origin;
+            
+            
+             // Threads
+         Mutex stdioMutex;                   // controle de Acesso Mútuo
+             Thread sensorThread_End;             // threads de leitura dos sensores
+             Thread handleSensorThread_End;       // threads para lidar com a leitura dos sensores
+             Thread sensorThread_Origin;             // threads de leitura dos sensores
+             Thread handleSensorThread_Origin;       // threads para lidar com a leitur
+        
+             EixoMonitoring(PinName, PinName);
+             void startThreads();
+         void stopThreads();
+             void readSensor_End();       
+            
+             void handleReadSensor_End(); 
+             void readSensor_Origin();
+             void handleReadSensor_Origin(); 
+};
+
+#endif
+