Programming Arduino on Industrial Environments:

                                 

Course 10 Chapters of General Content [IS.AC001.GC]

HANDY MATERIAL TO DEVELOP AN INDUSTRIAL PROJECT USING ARDUINO

I imagine that you already know what Arduino is, so in this course, we will focus on how to use Arduino boards and Arduino based PLCs in industrial environments to execute projects 30% faster.

Using different simple and free tools you will become a high-performance Arduino programmer, capable to develop an Arduino project. The time in an industrial project is money, so we are going to show you save 30% of your time.

  1. Check and evaluate the different variables and signals connected to the PLC with a graphical interface.
  2. Use examples already developed, so you don’t have to start from scratch. (Yes, examples! it is not necessary that you write the full code). There are many valuable examples to develop your projects).
  3. Use libraries for your standard functions.

(Remember: For us, a PLC works like an individual Arduino board. Our PLCs use original Arduino boards inside it, so you can practice the examples showed on this course using original Arduino boards).

Install the following material on your computer to start the chapter #1 next week.  

Using a simple graphical platform you can display the PLC status easily and in a friendly way. You can also use it as a SCADA in your project and you can integrate it into your projects as a Human-Machine-Interface. Simple, easy and free. We recommend using an Open Source platform called PROCESSING. (The Arduino IDE is based on this platform, so you will find it very familiar).

Use the original Arduino IDE to program your PLC. Review the different examples from the Arduino IDE and avoid to have to start your project from scratch. It is necessary to select the Arduino board in the right USB port where the Arduino board is connected to the computer.

To configure the different inputs and outputs from the Industrial Shields PLC is easy. You can also use the library from GitHub and forget the pinout checking. See how to upload the library from our blog.

CONNECT AN ARDUINO BOARD TO THE LAPTOP

It is necessary to know 2 essentials things:

Using Processing it is available to have a Graphical Interface done easily and simple which let us monitoring and interact with the PLC and controlling all your installation.

The Arduino IDE let us use libraries where calling our standard algorithms and develop a structured program. We encourage you to see the current version of the original Industrial Shields library from GitHub so you can see how the folders are structured. In the following chapters, we will see how to develop a library and how to call them using the Arduino IDE.

(Remember: Industrial Shields PLCs are working as Original Arduino boards. Our PLCs have original Arduino boards assembled inside. Then, you can practice the course using an Original Arduino board).

Useful Links:

Material to do practices:

  • Arduino Leonardo or Arduino Mega (You also can use an Arduino UNO if you get it).

(The devices used with the Arduino Mega and Arduino Leonardo assembled inside have been: From the Ethernet PLCs; the M-duino21. From the 20I/Os PLC; The Ardbox Relay  ).

INPUTS

It is necessary to know some essentials things:

You can do the course practices using an original Arduino board. In fact, our PLCs have an original Arduino board assembled inside, So, it is not necessary to do practices using our devices if you don’t want. You can use an Arduino Leonardo board, which is the board used in our 20I/Os PLCs (they are called: Ardbox) and you also can use an Arduino Mega which is used inside the Ethernet family of PLCs (called M-duino).

Connection Alert:

It is important to note that Arduino works at 5Vdc, then you can not connect industrial sensors directly on an Input on the Arduino board because industrial sensors usually work at 24Vdc. On the other hand, all Arduino based PLCs can be connected to an industrial sensor because all digital inputs can run from 5Vdc to 24Vdc.

(Remember: Industrial Shields PLCs are working as Original Arduino boards. Our PLCs have original Arduino boards assembled inside. Then, you can practice the course using an Original Arduino board)

If you need to connect analog sensors, remember that the analog inputs from the Arduino boards work from 0 to 5Vdc. And you can not connect higher voltages. On the other hand in the industry, it is usually to use analog sensors which work at 4-20mA or 0-10Vdc. Then, convert the current signal to voltage is very easy if you use the Ohm formula: V=IxR, you can see an example of how to convert 4-20mA to 0-10Vdc at our blog.

Useful Links:

Material to do practices:

  • Arduino Leonardo or Arduino Mega (You also can use an Arduino UNO if you get it).

(The devices used with the Arduino Mega and Arduino Leonardo assembled inside have been: From the Ethernet PLCs; the M-duino21. From the 20I/Os PLC; The Ardbox Relay  )

OUTPUTS

Basic skills:

You can do the course practices using an original Arduino board. In fact, our PLCs have an original Arduino board assembled inside, So, it is not necessary to do practices using our devices if you don’t want. You can use an Arduino Leonardo board, which is the board used in our 20I/Os PLCs (they are called: Ardbox) and you also can use an Arduino Mega which is used inside the Ethernet family of PLCs (called M-duino).

Connection Alert:

The outputs from the PLCs provide Voltaje when the state is defined as a HIGH level. Then it is necessary to keep in mind the polarity of the different types of devices connected to the outputs. The voltage provided from the none Optoisolation outputs is the same voltage connected at the PLC as a powering. It means that if the PLC is powered at 12Vcc the outputs work at 12Vcc and 24Vcc if the power supply is 24Vcc. It is also important to join the negative signal as shown on the PLC. To define the level of the outputs it is necessary to use the sentence: DigitaWrite().

(Remember: Industrial Shields PLCs are working as Original Arduino boards. Our PLCs have original Arduino boards assembled inside. Then, you can practice the course using an Original Arduino board) 

The analog outputs are programmed exactly as the PWM outputs. Arduino works at 5Vcc but the outputs from the PLC depends on the Voltage connected to the PLC. The Analog outputs work at 0-10Vdc as standardized on the industry. The analog output resolution is 8 bits then you can configure using the sentence AnalogWrite() a value from 0 to 255.

Material to do practices:

  • Arduino Leonardo or Arduino Mega (You also can use an Arduino UNO if you get it).

(The devices used with the Arduino Mega and Arduino leonardo assembled inside have been: From the Ethernet PLCs; the M-duino21. From the 20I/Os PLC; The Ardbox Relay).

INPUTS & OUTPUTS. SIMULTANEOUS WORK

You have to know some very basic things:

You can practice with an Arduino board. In the different PLCs we use original Arduino boards, for this reason it is not necessary that you practice with our equipment.

Often, when inputs are read in a PLC, their status is stored in a variable. This variable can be used to send its status through some communication system (RS485, RS232, Ethernet, Serial TTL, etc.) or also to perform a series of functions such as filters, working by flanks, counters, etc. To activate an output it is also common to use a series of variables that will be responsible for defining the state of the output in question.

Work for the student:

In this chapter we are going to make you work. Now you should know how to read a digital input and an analog input. You should also know how to activate a digital output and an analog output. (Remember that the analog outputs are programmed the same as the PWM outputs, although some give you a signal by pulses and the other one gives you an analog signal 0-10Vdc depending on the value that according to the 8bits outputs oscillates between 0-255.

(Remember: For us, a PLC works like an Arduino board. Our PLCs use original Arduino boards so you can try this course using original Arduino boards).

Useful Links:

Material to practice:

  • Arduino Leonardo or Arduino Mega (You can also use an Arduino UNO board if you have one).

(The equipment used with the Arduino Mega and Arduino Leonardo boards inside it were: the Ethernet PLC family, the M-duino21 and the basic 20 I / Os PLCs, the Ardbox Relay).

VARIABLES I

When reading this chapter you have to take into account a series of points:

You can practice with an Arduino board. In the different PLCs we use original Arduino boards, for this reason it is not necessary that you practice with our equipment.

In this chapter, we tell you some basic notions of the types of variables that we treat in a program. This is important since using the variable of the appropriate type in a project is key to avoid possible problems when operating with these. It also allows you to optimize well the code thing that you will appreciate when you go to use different systems of communication with the equipment (RS485, RS232, Ethernet, Serial TTL, etc) Everything that we will see in this chapter serves you so much for the programming in General, not only for Arduino programming but it is very important to know and know that there are differences between the different types of Variables. And also certain similarities between one or the other so you will not have to feel overwhelmed to see this agenda. With the different chapters, you will see and assimilate the use of one type and another.

Review of the agenda:

In this chapter we are going, apart from watching the video, we recommend that you read the different types of variables that we are dealing with.

In the video, we show you where you can see this information so that very quickly you can review the agenda of this chapter. The objective is that you can identify the different types of variables treated as well as have an idea of when to use one type or another.

(Remember: For us a PLC works like an Arduino board, our PLCs use original Arduino boards so you can try this course using original Arduino boards).

Useful Links:

Material to practice:

  • Arduino Leonardo or Arduino Mega (You can also use an Arduino UNO board if you have one).

(The equipment used with the Arduino Mega and Arduino Leonardo boards inside it were: the Ethernet PLC family, the M-duino21 and the basic 20 I / Os PLCs, the Ardbox Relay).

Answer this Survey and receive the new lesson!

Coming soon...

Coming soon...

Coming soon...

Coming soon...

Coming soon...