Help

Welcome!

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

Work with M-Duino Relay

Avatar
Mike W. R

Hi,

We bought an mduino 19 R + but we do not have clear how to work with the relay inputs.

Any advice?

thanks

Avatar
Discard
1 Answer
1
Avatar
Bernat Garcia
Best Answer

Hi,

I guess that you mean, how to use relay outputs... This unit doesn't have any relay input.

First of all, we recommend to use Industrial Shields boards in your Arduino IDE:

https://www.industrialshields.com/blog/industrial-shields-blog-1/post/installing-the-industrial-shields-boards-in-the-arduino-ide-63

After that you just can power supply the PLC and use this example code to switch the relay every half second.

Writing in a Relay:

In this example relay output R0_1 is switched ON (switch closed) and switched OFF (switch opened).

void setup() {
}  
void loop() { 
    digitalWrite(R0_1,HIGH); // opens the relay switch
    delay(500); // wait 500ms
    digitalWrite(R0_1,LOW); // closes the relay switch
    delay(500);
}

* The relays of our equipment have a switching frequency of 120 operations/min.

Avatar
Discard