Navegando por
Categoría: How to use

Modbus TCP/IP library for Arduino based PLC’s

Modbus TCP/IP library for Arduino based PLC’s

On this post it’s showed one of the best Modbus TCP/IP libraries. This library has been tasted on Industrial Shields labs and it fits communicating with other Modbus TCP/IP industrial devices.   How to install? Download the zip file on Modbus TCP/IP libraries. Extract the .ZIP file. Copy and paste the mudbus.h and mudbus.cpp in the directory of the sketch that calls the mudbus library. If using the «Ethernet2» library the mudbus.h needs to be modified. Inside the mudbus.h file there…

Leer más Leer más

HOW TO PAUSE THE EXECUTION OF THE CODE WITH ARDUINO IDE

HOW TO PAUSE THE EXECUTION OF THE CODE WITH ARDUINO IDE

In this post it will be seen how to pause the execution code for a certain time.  Basically this function pauses the program for a certain time and after this time it continues as normal.  The function for pause the execution code for a certain time using Arduino IDE is delay().  This function is used to set a time of pause. *With next version of Industrial Shields boards won’t be necessary to configure the pins, just selecting the properly board, I/O’s will…

Leer más Leer más

UPLOADING AN SKETCH TO A PLC USING ETHERNET. STEP 1. ARIADNE BOOTLOADER

UPLOADING AN SKETCH TO A PLC USING ETHERNET. STEP 1. ARIADNE BOOTLOADER

In this sequence of posts we will see how to upload an sketch to a PLC using Ethernet connection instead of using the USB. USB is the most common way to upload an sketch into an Arduino board but it is not always the most comfortable way because you need to bring the PLC near of a PC or vice versa. Before getting into the post it is important to have our boards installed. If you don’t have it please get…

Leer más Leer más

UPLOADING AN SKETCH TO A PLC USING ETHERNET. STEP 2. BINARY FILE

UPLOADING AN SKETCH TO A PLC USING ETHERNET. STEP 2. BINARY FILE

In this post we will see how to take the binary file from an sketch.ino First of all we need to know the differences between uploading a code via USB  and uploading via Ethernet. When a code is uploaded into an Arduino board using the USB, Arduino IDE software automatically does its magic and transforms the code sketch.ino into a file.hex which is the one that gets uploaded automatically. If we want to upload a code via Ethernet we need…

Leer más Leer más

HOW TO RESET A PLC USING THE ETHERNET SHIELD

HOW TO RESET A PLC USING THE ETHERNET SHIELD

In this post it will be seen how to configure the Ethernet Shield to allow the user sending a reset via Ethernet, instead of pressing the button manually. This configuration is useful in order to upload an sketch using the Ethernet shield instead of the USB. Tipically the upload is made via USB, in this case the Arduino IDE sends an order to the Arduino shield to reset it. When it is via Ethernet this is not possible by default….

Leer más Leer más

HOW TO WRITE AN ANALOG OUTPUT. ARDUINO IDE

HOW TO WRITE AN ANALOG OUTPUT. ARDUINO IDE

Before writing an analog output it is needed to set the pin as OUTPUT. See the following post to configure a pin. Function to configure a pin as INput/OUTput. Arduino IDE The function for writing in an analog output using Arduino IDE is AnalogWrite().  This function is used to set an analog output from 0 to 255.  On Industrial Shields equipment’s is followed with the corresponding pinout. This functions are normally used inside the setup() function. *With next version of…

Leer más Leer más

HOW TO READ AN ANALOG INPUT. ARDUINO IDE

HOW TO READ AN ANALOG INPUT. ARDUINO IDE

Before reading an analog input it is needed to set the pin as INPUT. See the following post to configure a pin. The function for reading from a digital input using Arduino IDE is AnalogRead().  This function is used to read an analog signal (from 0 to 255).  On Industrial Shields equipment’s is followed with the corresponding pinout. This functions are normally used inside the setup() function. *With next version of Industrial Shields boards won’t be necessary to configure the…

Leer más Leer más

HOW TO READ A DIGITAL INPUT. ARDUINO IDE

HOW TO READ A DIGITAL INPUT. ARDUINO IDE

Before reading a digital input it is needed to set the pin as INPUT. See the following post to configure a pin. 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 equipment’s is followed with the corresponding pinout. This functions are normally used inside the setup() function. *With next version of Industrial Shields boards won’t be necessary to configure the pins,…

Leer más Leer más

HOW TO WRITE A DIGITAL OUTPUT. ARDUINO IDE

HOW TO WRITE A DIGITAL OUTPUT. ARDUINO IDE

Before writing a digital output it is needed to set the pin as OUTPUT. See the following post to configure a pin. Function to configure a pin as INput/OUTput. Arduino IDE The function for writing in a digital output using Arduino IDE is DigitalWrite().  This function is used to set a digital output to high or low level.  On Industrial Shields equipment’s is followed with the corresponding pinout. This functions are normally used inside the setup() function. *With next version…

Leer más Leer más

Function to configure a pin as INput/OUTput

Function to configure a pin as INput/OUTput

The function to configure a pin as IN/OUT using Arduino IDE is pinMode(). This function is used to configure an Arduino pin as a input or as a output. On Industrial Shields equipment’s is followed with the corresponding Pin-out. This functions is normally used inside the setUp() function. *With next version of Industrial Shields boards won’t be necessary to configure the pins, just selecting the properly board, I/O’s will be automatically configured.    Next is showed the syntax: pinMode(pin, mode);