The document provides the source code and explanation for implementing data acquisition from an Arduino device using PLX-DAQ. The source code shows the setup and loop functions used to initialize serial communication, clear existing data, label columns, reset the timer, and output time and sensor variable data in a comma separated format for each loop iteration.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
9 views
Source Code For PLX DAQ
The document provides the source code and explanation for implementing data acquisition from an Arduino device using PLX-DAQ. The source code shows the setup and loop functions used to initialize serial communication, clear existing data, label columns, reset the timer, and output time and sensor variable data in a comma separated format for each loop iteration.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
ASSOCIATED CONTENT
Supporting Information Source code and it’s explanation for implementing PLX-DAQ for your Arduino-based device and it’s source code.
Source Code Explanation
void setup() { Initializing Arduino device.
Serial.begin(9600); Opening the serial communication. The number
sets the bauderate ( = Symbols sent per second). The same bauderate must be set in PLX-DAQ starting window.
Serial.println("CLEARDATA"); Enabling the “Clear Columns” option of the
interface.
Serial.println("LABEL,Time,Variable a, Writing “LABEL” and Excel will set the
Variable b,..."); description of the columns.
Serial.println("RESETTIMER"); Enabling the “Reset Timer” option of the
} interface. PLX-DAQ is always measuring time, while serial communication is enabled. For enabling the communication use “Connect”. In doing so the serial port will open.
Serial.print("DATA,TIME,"); Writing “DATA” and Excel will print the time
since the serial port is open and the Serial.print(Variablea); measurements of variable (e.g. pH, temperature, conductivity…) per cell. Serial.print(Variableb);
Serial.println(); Setting a new line for a new row in Excel.
delay(1000); Put a delay (here 1000 ms) according to your