|| Back to Support & Help Documentation ||

LoRa Family I/Os

General I/Os Features

LoRa A Zone.

  • Connections:




LoRa B Zone:

  • Analog Shield (B Zone):

                

  • Relay Shield (B Zone):

LoRa C Zone:

  • Analog Shield (C Zone):


  • Relay Shield (C Zone):


LoRa D Zone:

  • Analog Shield (D Zone):


  • Relay Shield (D Zone):



Switch configuration

A Zone. Communications

Note: Although the Serigraphy of the Switches will only reference to the Analog Shields, if a Relay Shield is connected the IX.6 changes for IX.1 and the IX.5 changes for IX.0. Being X a value inside of [0...2].

  • TOP SWITCH:


4. SCL/I2.6: Choosing between SCL or the input I2.6. If this switch is ON, it enables the I2.6 input and disables the SCL. If this switch is OFF, it enables SCL and disables I2.6. If it is a Relay Shield I2.6 is changed for I2.1

3. SDA/I2.5: Choosing between SDA or the input I2.5. If this switch is ON, it enables the I2.5 input and disables the SDA. If this switch is OFF, it enables SDA and disables I2.5. If it is a Relay Shield I2.5 is changed for I2.0

2. LoRa: Always at off position

1. LoRa: Always at off position


  • BOTTOM SWITCH:

     


4. Pin 3/I0.6: Choosing between Pin 3 or the input I0.6. If this switch is ON, it enables the I0.6    input and disables the Pin 3. If this switch is OFF, it enables Pin 3 and disables I0.6. If it is a Relay Shield I0.6 is changed for I0.1.

3. LoRa: Always at of position.

2. D53(SD): If this Switch is OFF, it enables the Chip Select of the microSD socket and disables Q2.0. If this switch is ON, it enables the Q2.0 output. If the switch is in ON mode the microSD can’t be used.

*If the D Zone is an Analog Shield, Q2.0 is also related with D53. Being D53 in ON Mode the SD card MUST NOT be used because it can corrupt the microSD. 

*If the D Zone is a Relay Shield there is no problem and it can be set always to OFF. Q2.0 of the Relay Shield is related with D12, so it doesn’t affect in any case to the microSD. The pin53 is not connected at all to any input/output, it is only connected to the uSD chip select.

1. FD RS-485 HD: Choosing between FD or HF. If this switch is ON, it enables the Half Duplex (HD) option and disables the FD. If this switch is OFF, it enables Full Duplex (FD) and disables HD.


Left Zone. Communications 

      1. RTC SDA: This switch enables the communication to communicate with the RTC using I2C. Having this switch in ON mode it actives this communication, whereas if it is in OFF mode it disables the I2C to reach the RTC. 

2. TC SCL: This switch enables the communication to communicate with the RTC using I2C. Having this switch in ON mode it actives this communication, whereas if it is in OFF mode it disables the I2C to reach the RTC. 

3. NC: Not connected. This switch is not connected to anything, it doesn’t matter if it is in ON mode or OFF mode.
4. NC: Not connected. This switch is not connected to anything, it doesn’t matter if it is in ON mode or OFF mode.


Analog Shield:

For the Analog Shield if a switch is set to ON, it can only act as Digital Output. If it is set to OFF it can only act as an Analog Output.  

If it is desired to use a Digital Output the pin must be set to ON and the pin that will provide this digital output is represented with QX.X, being X any number of the tables above. 

If it is desired to use an Analog Output the pin must be set to OFF and the pin that will provide this analog output is represented with AX.X, being X any number of the tables above.  


Relay Shield:

For the Relay Shield if a switch is set to ON, it can only act as Digital Output. If it is set to OFF it can only act as an Analog Output.

If it is desired to use a Digital Output the pin must be set to ON and the pin that will provide this digital output is represented with QX.X, being X any number of the tables above. 

If it is desired to use an Analog Output the pin must be set to OFF and the pin that will provide this analog output is represented with AX.X, being X any number of the tables above.  


                                                                                                                                SOFTWARE

IMPORTANT: Make sure to download the Arduino based PLC boards for Arduino IDE.


In this section we proceed to test digital and analog I/Os. These tests are prepared to make writings and readings in analog and digital pins.


Reading a Digital Input: 


Next is showed the syntax:

digitalRead(pin);

Pin: Could be any industrial shields equipment pin or any Arduino board pin that you wish to set.

The function for reading from a digital input using Arduino IDE is DigitalRead().  This function is used to read a digital signal (high or low).

 On Industrial Shields equipments is followed with the corresponding pinout. This functions are normally used inside the loop() function.

void setup() {

    pinMode(I0_2, INPUT);

}

void loop() {

    digitalRead(I0_2);

}

Writing in a Digital Output: 

Next is showed the syntax:

DigitalWrite(pin, value);

Pin: Could be any industrial shields equipment pin or any Arduino board pin that you wish to set. 

Value: HIGH or LOW (See more information on Arduino references)

Code Example, blinking of one digital output:

void setup() {
  pinMode(Q0_1, OUTPUT);
}

void loop() {
  digitalWrite(Q0_1, HIGH);
  delay(1000);             // delay 1s

  digitalWrite(Q0_1, LOW);
  delay(1000);
}


Reading an Analog Input:

Next is showed the syntax:

analogRead(pin);

Pin: Could be any industrial shields equipment pin or any Arduino board pin that you wish to set. 

Code Example, reading from an analoglRead:

void setup() {

    pinMode(I0_2, INPUT);
}

void loop() {
    analogRead(I0_2);
}



Writing in an Analog Output: 

Next is showed the syntax:

AnalogWrite(pin, value);

Pin: Could be any industrial shields equipment pin or any Arduino board pin that you wish to set. 

Value: 0 to 255(See more information on Arduino references)

Code Example, blinking of an analog output:

void setup() {
  pinMode(A0_5, OUTPUT); // configure A0.5 as OUTPUT
}

void loop() {
  analogWrite(A0_5, 0);
  delay(1000);             // delay 1s
  digitalWrite(A0_5, 255); 
  delay(1000);
}

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.


By following these steps carefully, you will be able to achieve the use of the I/Os using the Industrial Shields equipments.








1 Star 2 Star 3 Star 4 Star 5 Star