Navegando por
Etiqueta: digital

How to avoid the debouncing when reading a digital input. Library Tools40 Digital Filter

How to avoid the debouncing when reading a digital input. Library Tools40 Digital Filter

In this post it will be shown how to ensure the reading of a digital input using our library Tools40. This library has been developed by Industrial Shields. For more information, check the information of this library in the following post: Tools40 library, useful tool using our equipments First of all it is important to know the purpose of our digital filter. Basically it filters the debounces when a digital input changes from HIGH to LOW or vice versa. When…

Leer más Leer más

Write Digital Outputs Ardbox/MDuino

Write Digital Outputs Ardbox/MDuino

Digital  Ouputs (0-24Vdc): Ardbox Analog: Q0.0, Q0.1, Q0.2 (Digital); Q0.3, Q0.4, Q0.5, Q0.6, Q0.7, Q0.8, Q0.9 (configurable Digital) Relay:  – M-Duino M-Duino 21: Q0.0, Q0.1, Q0.2, Q0.3, Q0.4 (Digital); Q0.5, Q0.6  Q0.7  (configurable Digital). M-Duino 42:  Q0.0, Q0.1, Q0.2, Q0.3, Q0.4, Q1.0, Q1.1, Q1.2, Q1.3, Q1.4 (Digital); Q0.5, Q0.6  Q0.7, Q1.5, Q1.6  Q1.7 (configurable Digital). M-Duino 58: Q0.0, Q0.1, Q0.2, Q0.3, Q0.4, Q1.0, Q1.1, Q1.2, Q1.3, Q1.4, Q2.0, Q2.1, Q2.2, Q2.3, Q2.4(NC) (Digital); Q0.5, Q0.6  Q0.7, Q1.5, Q1.6  Q1.7, Q2.5, Q2.6  Q2.7 (NC) (configurable Digital). M-Duino 19R: Q0.0,…

Leer más Leer más

Read Digital Inputs Ardbox/MDuino

Read Digital Inputs Ardbox/MDuino

Digital  Inputs (0-24Vdc): Ardbox Analog: I0.0 (Digital); I0.1, I0.2, I0.3, I0.4, I0.5, I0.6, I0.7, I0.8, I0.9 (configurable Digital). Relay:  I0.0, I0.1, I0.2, I0.3, I0.4 (Digital); I0.5, I0.6, I0.7, I0.8, I0.9 (configurable Digital). M-Duino M-Duino 21: I0.0, I0.1, I0.2, I0.3, I0.4, I0.5, I0.6 (Digital); I0.7, I0.8, I0.9, I0.10, I0.11, I0.12 (configurable Digital). M-Duino 42:  I0.0, I0.1, I0.2, I0.3, I0.4, I0.5, I0.6, I1.0, I1.1, I1.2, I1.3, I1.4, I1.5, I1.6 (Digital); I0.7, I0.8, I0.9, I0.10, I0.11, I0.12, I1.7, I1.8, I1.9, I1.10, I1.11, I1.12  (configurable Digital). M-Duino 58: I0.0, I0.1, I0.2, I0.3,…

Leer más Leer más

How to write a digital output

How to write a digital output

You can write a Digital Output (0 or 24V) through: … int myDigital; … void setup() { pinMode (5,OUTPUT); } void loop() { digitalWrite(5, HIGH); } With this piece of code you’ll put a voltage to the output PLC pin corresponding to the internal “5” pin. In this case, we put 24Vdc to the output. If we want to put 0Vdc, we have to change the “HIGH” value to the “LOW” value.   Note: The example pin “5”, is only an example….

Leer más Leer más

How to read a digital Input

How to read a digital Input

You can read the data of a Digital Input through: … int myDigital; … void setup() { pinMode (5,INPUT); } void loop() { myDigital = digitalRead(5); } With this piece of code you’ll read the voltage of a PLC pin. As our digital input works between 0-24V, the read value (myDigital) will be a value: 0 or ~24V.   Note: The example pin “5”, is only an example. You need to check in your PLC which pin to use for reading,…

Leer más Leer más