Browsed by
Category: Ethernet PLC (M-Duino)

Ethernet PLC (M-Duino) blog information

RS-485 TEST ON M-DUINO PLUS

RS-485 TEST ON M-DUINO PLUS

In this post it is showed how to test the RS-485 on M-Duino PLUS version.

The first thing that you need to know is that the  RS-485 PLUS version have full and half duplex communication. Controlling the dip switch you must select if you want to work on full or half duplex. There is internally installed a half duplex Max485 and Max485 transmitter. If you are working on full duplex you will use the Max485 half duplex to receive data and Max485 transmitter to send the data.

If you are working half duplex or full duplex the mapping is:

Read More Read More

Ethernet test on M-Duinos PLUS version

Ethernet test on M-Duinos PLUS version

In this post it is showed how to test Ethernet communication on M-Duino PLUS version

It’s necessary to install Arduino Ethernet2 library. See more infromation about Ethernet library functions on Arduino Reference.

Connecting an M-Duino to a router through Ethernet and uploading the test sketch, the M-Duino is able to complete the test.  

Next is showed the code:

Read More Read More

RS-232 Test on M-Duino PLUS

RS-232 Test on M-Duino PLUS

In this post it is showed how to test the RS-232 M-Duino PLUS version.

Connecting an M-Duino with other equipment through RS-232. On the code is showed that you must send a 0xA5 thought RS-232 to complete this test.

Next is showed the code:

/////////////////////////////////////////////////////////////////////////////
void setup() {
  Serial.begin(9600L);
  Serial.println("mduino-plus test RS-232 started");
  Serial2.begin(9600L);
}
/////////////////////////////////////////////////////////////////////////////
void loop() {
  while (Serial2.available()) {
    Serial2.read();
  }
  Serial2.write(0xa5);
  
  delay(50);
  
  if (Serial2.read() == 0xa5) {
    Serial.println("RS232 (Serial2) OK");
  } else {
    Serial.println("RS232 (Serial2) FAIL");
  }
  
  delay(1000);
}

M-Duino 21/42/58 PLUS version Mapping

M-Duino 21/42/58 PLUS version Mapping

On this post it is showed the M-Duino mapping pin of the PLUS version. On the future, using our boards it won’t be necessary to know the mapping. But until the boards are not updated it is necessary to know it for programming the M-Duino PLUS version

M-Duino PLUS 21/42/58 Comunication Area:

Base (common unit)
A Zone
M-DUINO Connector Arduino Pin Function
SCL 21 I2C/SS
SDA 20 I2C/SS
RX0 1 RX0/SS
TX0 0 TX0/SS
RX1 19 RX1/SS
TX1 18 TX1/SS
RX 17 RX2(serial 2)
TX 16 TX2(serial 2)
Z- RS485
Y+ RS485
B- RS485
A+ RS485
PIN3 3 Arduino Pin/ Select SPI
50 SO 50 SPI
51 SI 51 SPI
52 SCK 52 SPI
RESET RESET SPI
Vin 5 Vin 5 SPI
PIN2 2 Arduino Pin / Select SPI
GND GND
GND GND
24 Vdc    
Base (common unit)
A Zone
M-DUINO Connection Arduino Pin Function
AREF AREF Arduino PIN
IOREF2 IOREF2 Arduino PIN
IOREF1 IOREF1 Arduino PIN
7  Vdc 7  Vdc
GND GND GND
3.3 Vdc 3.3 Vdc Arduino PIN
GND GND GND
5 Vdc 5 Vdc
GND GND GND

 

M-Duino PLUS 21/42/58

Base (common unit)
M-DUINO Connection Arduino Pin Function
GND GND GND
A.0.7* 6 Analog OUT
A.0.6* 5 Analog OUT
A.0.5* 4 Analog OUT
Q/Vdc External Isolated Out Vdc
24 Vdc External Isolated Out GND
Q.0.7 6 Digital Out/PWM Out
Q.0.6 5 Digital Out/PWM Out
Q.0.5 4 Digital Out/PWM Out
Q.0.4 40 Digital Out
Q.0.3 39 Digital Out
Q.0.2 38 Digital Out
Q.0.1 37 Digital Out
Q.0.0 36 Digital Out
Base (common unit)
M-DUINO Connection Arduino Pin Function 2
I 0.12 A5 Analog/Digital In
I 0.11 A4 Analog/Digital In
I 0.10 A3 Analog/Digital In
I 0.9 A2 Analog/Digital In
I 0.8 A1 Analog/Digital In
I 0.7 A0 Analog/Digital In
(-) I0.6/INT1 NC GND I0.6
I0.6/INT1 3 Interrupt 1 In
(-) I0.5/INT0 NC GND I0.5
I0.5/INT0 2 Interrupt 0 In
(-) I0.4 NC GND I0.4
I0.4 26 Digital Input
(-) I0.3 NC GND I0.3
I0.3 25 Digital Input
(-) I0.2 NC GND I0.2
I0.2 24 Digital Input
(-) I0.1 NC GND I0.1
I0.1 23 Digital Input
(-) I0.0 NC GND I0.0
I0.0 22 Digital Input

 

M-Duino PLUS 42/58

Base (common unit)
M-DUINO Connection Arduino Pin Function 2
I 1.12 A11 Analog/Digital In
I 1.11 A10 Analog/Digital In
I 1.10 A9 Analog/Digital In
I 1.9 A8 Analog/Digital In
I 1.8 A7 Analog/Digital In
I 1.7 A6 Analog/Digital In
(-) I1.6/INT4 NC GND I1.6
I1.6/INT4 19 Interrupt 1 In
(-) I1.5/INT5 NC GND I1.5
I1.5/INT5 18 Interrupt 0 In
(-) I1.4 NC GND I1.4
I1.4 31 Digital Input
(-) I1.3 NC GND I1.3
I1.3 30 Digital Input
(-) I1.2 NC GND I1.2
I1.2 29 Digital Input
(-) I1.1 NC GND I1.1
I1.1 28 Digital Input
(-) I1.0 NC GND I1.0
I1.0 27 Digital Input

Base (common unit)

M-DUINO Connection Arduino Pin Function
GND GND GND
A.1.7* 7 Analog OUT
A.1.6* 9 Analog OUT
A.1.5* 8 Analog OUT
Q/Vdc External Isolated Out Vdc
COM (-) External Isolated Out GND
Q.1.7 7 Digital Out/PWM Out
Q.1.6 9 Digital Out/PWM Out
Q.1.5 8 Digital Out/PWM Out
Q.1.4 45 Digital Out
Q.1.3 44 Digital Out
Q.1.2 43 Digital Out
Q.1.1 42 Digital Out
Q.1.0 41 Digital Out

 

M-Duino PLUS 58

Base (common unit)
M-DUINO Connection Arduino Pin Function 2
I 2.12
I 2.11
I 2.10 A15 Analog/Digital In
I 2.9 A14 Analog/Digital In
I 2.8 A13 Analog/Digital In
I 2.7 A12 Analog/Digital In
(-) I2.6/INT2 NC GND I2.6
I2.6/INT2 21 Interrupt 2 In
(-) I2.5/INT3 NC GND I2.5
I2.5/INT3 20 Interrupt 3 In
(-) I2.4
I2.4
(-) I2.3 NC GND I2.3
I2.3 35 Digital Input
(-) I2.2 NC GND I2.2
I2.2 34 Digital Input
(-) I2.1 NC GND I2.1
I2.1 33 Digital Input
(-) I2.0 NC GND I2.0
I2.0 32 Digital Input
Base (common unit)
M-DUINO Connection Arduino Pin Function
GND GND GND
A.2.7*
A.2.6* 13 Analog OUT
A.2.5* 12 Analog OUT
Q/Vdc External Isolated Out Vdc
COM (-) External Isolated Out GND
A.2.7
A.2.6 13 Digital Out/PWM Out
A.2.5 12 Digital Out/PWM Out
A.2.4
A.2.3 49 Digital Out
A.2.2 48 Digital Out
A.2.1 47 Digital Out
A.2.0 53 Digital Out
M-DUINO 19R I/O PINOUT

M-DUINO 19R I/O PINOUT

M-DUINO 19R I/OS PLC has a diferents types of Inputs and Outputs.

It has 19 input/output signals:

  • 6 Inputs, of which:
    • 4 can be used as Analog/Digital Input 0-10Vdc, 10bits,(using Pins A0, A1, A2, A3). 
    • 2 are Digital Input which can work as a Interrupt Input also. (using Pins 2 and 3).
  • 11 Outputs, of which:
    • 8 are Relay Output (Using Pins  22, 23, 24, 25, 37, 38, 39, 40).
    • 3 are Analog Output 0-10Vdc (Using Pins 4, 5, 6), 8bits. All of them can also work as Digital Output and PWM output.

IMPORTANT: To enable communication connections the switches must be set to “OFF”. Set to “ON” position to enable I/Os terminals. Communications and I/Os terminals on the chart can not work simultaneously. For example if Pin 3 is enabled (OFF), I0.6 will not be disabled. See more on Switch Configuration.

Read More Read More

M-DUINO 38R I/OS PINOUT

M-DUINO 38R I/OS PINOUT

M-DUINO 38R I/OS PLC has a diferents types of Inputs and Outputs.

It has 34 input/output signals:

  • 12 Inputs, of which:
    • 8 can be used as Analog/Digital Input 0-10Vdc, 10bits,(using Pins A0, A1, A2, A3, A6, A7, A8 , A9). 
    • 4 are Digital Input which can work as a Interrupt Input also. (using Pins 2, 3, 19, 18).
  • 22 Outputs, of which:
    • 16 are Relay Output (Using Pins  22, 23, 24, 25, 27, 28, 29, 30, 37, 38, 39, 40, 42, 43, 44, 45).
    • 6 are Analog Output 0-10Vdc (Using Pins 4, 5, 6, 8, 10, 11), 8bits. All of them can also work as Digital Output and PWM output.

IMPORTANT: To enable communication connections the switches must be set to “OFF”. Set to “ON” position to enable I/Os terminals. Communications and I/Os terminals on the chart can not work simultaneously. For example if Pin 3 is enabled (OFF), I0.6 will not be disabled. See more on Switch Configuration.

Read More Read More

M-DUINO 57R I/OS PINOUT

M-DUINO 57R I/OS PINOUT

M-DUINO 57R I/OS PLC has a diferents types of Inputs and Outputs.

It has 49 input/output signals:

  • 18 Inputs, of which:
    • 12 can be used as Analog/Digital Input 0-10Vdc, 10bits,(using Pins A0, A1, A2, A3, A6, A7, A8 , A9, A12, A13, A14, A15). 
    • 6 are Digital Input which can work as a Interrupt Input also. (using Pins 2, 3, 19, 18, 20, 21).
  • 31 Outputs, of which:
    • 23 are Relay Output (Using Pins  22, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35 37, 38, 39, 40, 42, 43, 44, 45, 47, 48, 49).
    • 8 are Analog Output 0-10Vdc (Using Pins 4, 5, 6, 8, 10, 11, 12, 13), 8bits. All of them can also work as Digital Output and PWM output.

IMPORTANT: To enable communication connections the switches must be set to “OFF”. Set to “ON” position to enable I/Os terminals. Communications and I/Os terminals on the chart can not work simultaneously. For example if Pin 3 is enabled (OFF), I0.6 will not be disabled. See more on Switch Configuration.

Read More Read More