May 29, 2014

SCADA WITH ARDUINO OR ENERGIA

XScada one of open source scada .we can easily interface it with microcontroller. Here i have written an simple program  to send 1 at starting then 2 after one second. This program has written in energia by using msp430 launch pad (controller--MSP430G2553). This code is  also same for arduino and ARM M4 - TIVA C SERIES - TM4C123G. Serial data from msp430 launch pad is received from COM4.Here data send in a particular format .data after 'W' and ';' will only see in scada.
download Xscada program here







void setup()
{
    Serial.begin(9600); // starts serial communication @ baud rate of 9600
    Serial.print("[1;1;W;1]");
   delay(1000);
}
void loop() {

  Serial.print("[1;1;W;");
  Serial.write('2');
  Serial.print("]");
  delay(1000); // delay in between reads for stability
}