Example project for the Rioux Chem control box

Dependencies:   mbed MODSERIAL

Dependents:   screentest

Rioux Chem Control Box

/media/uploads/emh203/ccb.jpg

This is the example project for the Rioux Chem Control Box. I have posted some youtube videos to guide you through the hardware and software:

Rioux Chem Control Box - Hardware

http://www.youtube.com/watch?v=MoZ92GRYa4s

Rioux Chem Control Box - Software - Part I

http://www.youtube.com/watch?v=_MwaTLL4dyA==

Rioux Chem Control Box - Software - Part II

http://www.youtube.com/watch?v=j_P89izfgoQ

Files at this revision

API Documentation at this revision

Comitter:
wavenumber
Date:
Sun Sep 12 20:53:43 2021 +0000
Parent:
5:b56a4592aac0
Child:
7:de452fceafc1
Commit message:
Added a simple P0 and P1 command for the pumps

Changed in this revision

DRIVERS/CHEM_BOX_COMMON.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/DRIVERS/CHEM_BOX_COMMON.cpp	Sun Sep 12 20:14:44 2021 +0000
+++ b/DRIVERS/CHEM_BOX_COMMON.cpp	Sun Sep 12 20:53:43 2021 +0000
@@ -134,6 +134,11 @@
     Thermocouple_OC= 0;     
 
     InitTerminal();
+    
+    RS232_0.baud(19200);
+  
+    RS232_1.baud(19200);
+    
 
 }
 
@@ -550,6 +555,8 @@
 void TerminalCmd_ECHO_OFF(char *arg);
 void TerminalCmd_BPOUT(char *arg);
 void TerminalCmd_BPIN(char *arg);
+void TerminalCmd_P0(char *arg);
+void TerminalCmd_P1(char *arg);
 
 //Populate this array with the callback functions and their terminal command string
 TerminalCallbackRecord MyTerminalCallbackRecords[] ={   {"reset",TerminalCmd_Reset,"Resets the CHEM box"},
@@ -598,6 +605,10 @@
                                                     
                                                         {"BPIN",TerminalCmd_BPIN,"Reads the Back pressure regulator feedback.   I.E. BPIN "},
                                                     
+                                                        {"P0",TerminalCmd_P0,"Sends a command over RS232 port 0 to the Pump.  A carriage return will be added automatically."},
+                                                  
+                                                        {"P1",TerminalCmd_P1,"Sends a command over RS232 port 0 to the Pump.   A carriage return will be added automatically."},
+                                                    
                                                         
                                                         {"ECHO_OFF",TerminalCmd_ECHO_OFF,"Disables echoing of characters"}
                                                     };
@@ -622,6 +633,18 @@
     TerminalEcho = 0;
 }
 
+
+void TerminalCmd_P0(char *arg)
+{
+    RS232_0.printf("%s\r",arg);
+}
+
+void TerminalCmd_P1(char *arg)
+{
+    RS232_1.printf("%s\r",arg);
+}
+
+
 void TerminalCmd_MFCI(char *arg)
 {
     int Channel = -1;