Go Down

Topic: Arduino for Simple-Scada (Read 207 times) previous topic - next topic

emoxristov

Feb 04, 2017, 07:19 pm Last Edit: Feb 04, 2017, 07:52 pm by emoxristov
What needs to change in the code to have a digital input to use in Scada ?

Code :


bool func_D2(const char *itemID, const opcOperation opcOP, const bool value){
  static bool ledValue_D2 = false;
   if (opcOP == opc_opwrite) {
    ledValue_D2 = value;
    if (ledValue_D2) 
      digitalWrite(pin_D2, LOW);
    else
      digitalWrite(pin_D2, HIGH);
  }
  else
    return ledValue_D2; 
}


Robin2

Image from Original Post so we don't have to download it. See this  Image Guide



...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Robin2

What needs to change in the code to have a digital input to use in Scada ?
What exactly does the bold part mean?

Are you referring to a specific Scada program or function? If so post a link so we can read its specification.

In an Arduino a digital input is usually detected with digitalRead()

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy