Skip to content

Commit 3e55a7d

Browse files
authored
Merge pull request #1359 from arduino/taddy/plcide-content-qolUpdate
[PC-1405] PLC IDE: Documentations QoL Updates
2 parents 428dd37 + 265912b commit 3e55a7d

File tree

8 files changed

+51
-4
lines changed

8 files changed

+51
-4
lines changed

content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials/rtd-thermocouple-pmc/content.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ software:
2121
---
2222

2323
## Introduction
24+
2425
RTDs (Resistance Temperature Detectors) and Thermocouples are used for temperature measurement in various industrial fields. **RTDs** are sensors that change resistance in response to temperature variation. They are used regularly in industries that require precise temperature measurements, such as food processing and pharmaceuticals.
2526

2627
On the other hand, **Thermocouples** are transducers that provide a voltage proportional to the temperature difference between two junctions. They are widely used in industrial applications such as HVAC systems, diesel engines, and power plants.
@@ -30,26 +31,32 @@ Both RTDs and thermocouples have unique characteristics, which make them suitabl
3031
In this tutorial, we will use a two-wire **PT100** RTD to obtain temperature measurements. We will also briefly discuss how to connect a three-wire RTD and a thermocouple.
3132

3233
## Goals
34+
3335
The goals of this tutorial are:
36+
3437
- Learn about the differences between RTD and thermocouples
3538
- Learn how to connect an RTD or thermocouple to the Portenta Machine Control
3639
- Understand the operation of the Portenta Machine Control's Temperature Probe inputs
3740
- Learn about PLC IDE functions and variables
3841
- Read the temperature values using the Arduino PLC IDE
3942

4043
## Hardware and Software Requirements
44+
4145
### Hardware Requirements
46+
4247
- [Portenta Machine Control](https://store.arduino.cc/products/arduino-portenta-machine-control) (x1)
4348
- Micro-USB cable (x1)
4449
- PT100 RTD (x1)
4550

4651
### Software Requirements
52+
4753
- The [Arduino PLC IDE](https://www.arduino.cc/pro/software-plc-ide) (Including Arduino PLC IDE Tools)
4854
- If you have not done so, set up and activate the Portenta Machine Control license following the steps of [this tutorial](https://docs.arduino.cc/tutorials/portenta-machine-control/plc-ide-setup-license)
4955

5056
## Temperature Sensors
5157

5258
### RTD
59+
5360
A **Resistance Temperature Detector**, or **RTD**, is a temperature sensor that works by measuring the variation in the electrical resistance of a metallic element as a function of the temperature changes. The most commonly used metal for RTDs is platinum: one common type of RTD sensor is the PT100, where PT stands for platinum and 100 refers to the nominal resistance of the sensor at 0°C.
5461

5562
As the temperature increases, the resistance of the metal element in the RTD increases predictably and linearly. The resistance variation can be measured using an external circuit or measuring instrument and converted into a temperature reading, using a calibration curve or formula putting into relation the resistance value with the temperature.
@@ -69,6 +76,7 @@ Thermocouples are used in a wide range of applications where temperature measure
6976
Depending on the sensor you use, you will need to perform different connection settings. Find below three tables showing how to connect a two-wire RTD (PT100), a three-wire RTD (PT100) or a thermocouple.
7077

7178
### Two Wires RTD Connection
79+
7280
The 2-wire RTD configuration is the simplest of the RTD circuit designs, but is more prone to errors.
7381

7482
| Channel 0 | Channel 1 | Channel 2 |
@@ -82,6 +90,7 @@ In this tutorial, we will use a two-wire RTD, so we will configure **channel 0**
8290
![Two Wires Connection to Channel 0](./assets/two-wire-connection.png)
8391

8492
### Three Wires RTD Connection
93+
8594
The 3-wire RTD configuration is the most commonly used RTD circuit design. In this configuration, two wires link the sensing element to the monitoring device on one side of the sensing element, and one links it on the other side.
8695

8796
| Channel 0 | Channel 1 | Channel 2 |
@@ -97,7 +106,9 @@ The 3-wire RTD configuration is the most commonly used RTD circuit design. In th
97106
### Thermocouples Connection
98107

99108
Connect **only non-grounded thermocouples** (grounded thermocouples are not supported). Do not connect both a thermocouple and a PT100 to a single same channel.
109+
100110
The thermocouples supported by the Portenta Machine Control are:
111+
101112
- Thermocouple Type K, non-grounded
102113
- Thermocouple Type J, non-grounded
103114

@@ -106,7 +117,6 @@ The thermocouples supported by the Portenta Machine Control are:
106117
| Connect the positive pin to TP0 | Connect the positive pin to TP1 | Connect the positive pin to TP2 |
107118
| Connect the negative pin to TN0 | Connect the negative pin to TN1 | Connect the negative pin to TN2 |
108119

109-
110120
***Do not connect any pin to GND***
111121

112122
![Thermocouple Connection to Channel 0](./assets/thermocouple-connection.png)
@@ -181,6 +191,7 @@ Now that we have created the variables, we have to make it work by defining the
181191
TP00 := sysTempProbes[0];
182192
temp0:= systempProbes[0].temperature;
183193
```
194+
184195
Next, plug in your device, make sure it is connected to the Arduino PLC IDE and click the compile button to make sure there are no errors in the code.
185196

186197
If you are not sure about how to connect your device, you can check it on [the setup tutorial](https://docs.arduino.cc/tutorials/portenta-machine-control/plc-ide-setup-license#5-connect-to-the-device).
@@ -198,13 +209,15 @@ To visualize the values once we have downloaded the code into the Portenta Machi
198209
![Watch Variables](./assets/watch-variables.gif)
199210

200211
## Conclusion
212+
201213
RTDs are best for high-accuracy temperature measurements within a narrow range of up to 600°C. Thermocouples are better for high-temperature applications up to 2300°C, fast response times, and harsh environments. RTDs are used in laboratories and industrial process control, while thermocouples are used in industrial applications like furnaces and aerospace.
202214

203215
We have learned how to connect RTD and Thermocouple sensors to a Portenta Machine Control and how to monitor the temperature values through the Arduino PLC IDE.
204216

205217
We have also learned that there are many different types of RTDs and thermocouples and that we have to choose one according to our needs.
206218

207219
## Next Steps
220+
208221
Now that we know how to use these temperature sensors, we can implement them in a real industrial or domestic environment, such as an ambient temperature monitoring project.
209222

210223
- For more information on programming in the Arduino PLC IDE using IEC-61131-3 languages, please refer to the tutorial [Introduction to Programming with the Arduino PLC IDE](https://docs.arduino.cc/tutorials/portenta-machine-control/plc-programming-introduction) tutorial.

content/software/plc-ide/tutorials/modbus-setup/content.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,15 @@ Then you can attach some functions to the Generic Modbus item, they will appear
5454
![Modbus catalog select new item](assets/modbusCatalog-add-prompt.png)
5555

5656
#### Mode
57+
<br></br>
5758

5859
* Not used
5960
* Modbus RTU Master
6061
* Modbus RTU Slave
6162

6263
#### Baud Rate
64+
<br></br>
65+
6366

6467
Baud rate, options:
6568
* 600
@@ -73,6 +76,7 @@ Baud rate, options:
7376
* 115200
7477

7578
#### Serial Mode
79+
<br></br>
7680

7781
| Name | Parity | data bits | stop bits |
7882
| ------- | ----------- | --------- | ----------|
@@ -83,13 +87,15 @@ Baud rate, options:
8387
| O, 8, 2 | Odd parity | 8 | 2 |
8488

8589
#### Slave Settings
90+
<br></br>
8691

8792
(Only available on slave mode)
8893

8994
* Modbus address
9095
Address of the device: from 1 to 247. It can not be repeated within the same Modbus net.
9196

9297
#### Modbus Node Configuration
98+
<br></br>
9399

94100
Once you have configured your device as a **Modbus Master** you can attach some blocks to configure it, you can see them while you have the **RS485 SerialPort** on the **Catalog Tile Window**
95101
![Modbus catalog](assets/modBusCatalog.png)

content/software/plc-ide/tutorials/plc-ide-cloud-support/content.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ The PLC IDE configuration will play an important role in establishing successful
205205
Thus, you will learn to configure the 'Shared variables' based on the peripherals and tasks you may assign to Opta™.
206206

207207
#### Shared Variables Configuration
208+
<br></br>
208209

209210
The successful communication between Opta™ configured with PLC IDE and Arduino IoT Cloud relies on the 'Shared variables'. The 'Shared variables' is defined by heading to `Resources > Opta > Shared variables`. It will then offer two additional tabs: 'Inputs' and 'Outputs'.
210211

@@ -238,6 +239,7 @@ Depending on the project's development requirements, you can add all the variabl
238239
We will now configure Opta™ device's features to link all these shared variables.
239240

240241
#### Analog Port Configuration
242+
<br></br>
241243

242244
The analog port is configured using the following properties under: `Resources > Opta > Local IO Mapping > Programmable Inputs`.
243245

@@ -254,6 +256,7 @@ The 'Programmable inputs mapping' table should look as the following image:
254256
You can also change the analog resolution if needed between 12, 14, or 16 bits.
255257

256258
#### User Programmable LED Configuration
259+
<br></br>
257260

258261
The user programmable LED of Opta™ is configurable under `Resources > Opta > Local IO Mapping > LED Outputs`. To use the user programmable LED, you will need to assign a variable that will represent the 'LB' row as it can be seen in the following image:
259262

@@ -262,6 +265,7 @@ The user programmable LED of Opta™ is configurable under `Resources > Opta > L
262265
In this case, the `userLed` is assigned as the variable that will represent the user programmable LED of Opta™ that emits blue light. The `userLed` is a boolean type variable as well as the `in_cloudButton`. It will be matched inside the PLC program to pass the boolean state per the command sent from the Arduino IoT Cloud dashboard.
263266

264267
#### Library Components
268+
<br></br>
265269

266270
The Library section would be where you could find various pre-written codes or functions specific to PLC operations. It could include libraries for handling several industrial protocols, dealing with specific types of I/O, or even specialized functions for certain control systems. It makes the development process more efficient by providing ready-to-use codes, saving time and effort.
267271

@@ -285,6 +289,7 @@ These libraries are indexed, thus they are certified guaranteeing optimized perf
285289
***For more information about managing libraries inside PLC IDE, please have a look at ["Library Management"](https://docs.arduino.cc/software/plc-ide/tutorials/plc-programming-introduction#library-management) section from the [Programming Introduction with Arduino PLC IDE](https://docs.arduino.cc/software/plc-ide/tutorials/plc-programming-introduction).***
286290

287291
#### Arduino Sketch
292+
<br></br>
288293

289294
We can now build the Arduino sketch that will be used to establish communication with the Arduino IoT Cloud and manage data traffic. The base sketch will be needed and can be found as discussed in the ['Setting Up the Arduino IoT Cloud'](#setting-up-the-iot-cloud) section.
290295

@@ -386,6 +391,7 @@ void onCloudButtonChange() {
386391
The `NETWORK_SSID` and `NETWORK_PASS` requires to be manually defined. Please replace these parameters to establish a connection with the desired network. Also, the parameters must be defined in between the quotation marks, replacing `NETWORK_SSID` and `NETWORK_PASS` fields.
387392

388393
#### PLC Program
394+
<br></br>
389395

390396
The Arduino sketch is ready and now we need a PLC program that will control the onboard features of Opta™ and data readings.
391397

content/software/plc-ide/tutorials/plc-ide-pin-mapping/content.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ To create a variable for a **pin map** you have two options:
6767
***By default they are not available as variables, in any case, you can get the values by accessing their memory registers, which is not as easy as having variables with the data.***
6868

6969
#### Single Variable
70+
<br></br>
7071

7172
Double-click the **Pin Map** that you want to edit, for example, the **Digital Output table**.
7273

@@ -85,6 +86,7 @@ digitalOut01 := 1;
8586
```
8687

8788
#### Array
89+
<br></br>
8890

8991
Go to your project tile window, and right-click on the **Global Variable** element.
9092

content/software/plc-ide/tutorials/plc-ide-setup-license/assets/IdeDownloadPage.svg

Lines changed: 9 additions & 0 deletions
Loading

content/software/plc-ide/tutorials/plc-ide-setup-license/content.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To get the Arduino PLC IDE software, go to the [official software website of the
4949
* Arduino PLC IDE Tools
5050
* Arduino PLC IDE
5151

52-
![Arduino IDE Download page](assets/IdeDownloadPage.png)
52+
![Arduino IDE Download page](assets/IdeDownloadPage.svg)
5353

5454
The software requires **Windows 10** or a newer operating system version for the x64 architecture.
5555

@@ -73,9 +73,9 @@ Once the installation has finished, all the required drivers, libraries, and Ard
7373

7474
When you download the Arduino PLC IDE executable, the file naming scheme is as follows:
7575

76-
`Setup_Arduino PLC IDE_X.X.X.X_20230329`
76+
`Setup_Arduino PLC IDE_X.X.X.X_{ReleaseDate}`
7777

78-
If you have got the correct IDE software, it should follow the previous naming scheme with the `X.X.X` that represents the version of the IDE software and its latest version release date.
78+
If you have the correct IDE software, its name should include the version format `X.X.X.X`, with the associated release date in the `{ReleaseDate}` field. For instance, a release date might look like `20230329`.
7979

8080
Run the Arduino PLC IDE installer after you have installed the Arduino PLC IDE Tools. If you have not installed the PLC IDE tools, please check [Arduino® PLC IDE Tools Setup section](#1-arduino-plc-ide-tools-setup) before proceeding as it needs to have the tools set before IDE software installation.
8181

@@ -134,6 +134,7 @@ Click OK to save the settings and press the connect button on **On-line > Connec
134134
If the communication is successful the main panel will show the license section to be filled in and a status indicator.
135135

136136
#### Online Activation
137+
<br></br>
137138

138139
To use your product license, paste the key in the blank next to **Product Key** and press the **Activate** button.
139140

@@ -146,6 +147,7 @@ After you click the **Activate** button, the IDE will bind the license to the ha
146147
Once the product has been activated, it is recommended to get the **Hardware-ID** of your device.
147148

148149
#### Offline Activation
150+
<br></br>
149151

150152
To activate the product **Offline**, deselect the "Online" slider and the scenario below will show up:
151153

content/software/plc-ide/tutorials/plc-programming-introduction/content.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ There are 2 types of variables:
3838
* Local variables: Only one program has access to it.
3939

4040
#### Global Variable
41+
<br></br>
4142

4243
Click inside the **Project** tab and click the **Global_vars** section, a table is available to see the full list of global variables on your project.
4344

@@ -53,6 +54,7 @@ You will see a list with all the global variables in the **Global_vars** section
5354
![Using a global variable inside a program](assets/usingGlobalVariable.png)
5455

5556
#### Local Variable
57+
<br></br>
5658

5759
Go inside the **Project** tab and select a program by double-clicking it, once it has been opened you will see a **Local Variables** table on the top panel.
5860
![Default Ladder Diagram Program](assets/default_LD_program.png)
@@ -78,6 +80,7 @@ Once you drag and drop it on your canvas it will generate a block with some inpu
7880
Once you have your programs you can attach them to a task inside the runtime.
7981

8082
There are 4 Tasks:
83+
8184
* Init: Single execution of the assigned programs, done on the initialization
8285
* Fast: Loop that executes the attached programs, every 10ms by default (it can be changed)
8386
* Slow: Loop that executes the attached programs, every 100ms, can not be changed
@@ -183,6 +186,7 @@ This is how a counter program looks:
183186
![Ladder Diagram counter program](assets/LDprogram.png)
184187

185188
Here is a video doing that from scratch:
189+
186190
<iframe width="100%" height="415" src="https://www.youtube.com/embed/0EdATSgIc9o" title="YouTube video player" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
187191

188192
### Sequential Function Chart
@@ -192,6 +196,7 @@ This language approaches the script in a similar way as a flowchart, meaning you
192196
SFC language can not interact directly with the machine, meaning you can not make an output be OFF directly, to do so you will need to create **actions**
193197

194198
#### Actions
199+
<br></br>
195200

196201
An action is a script in another language (i.e. structured text) that performs the work, this will get triggered depending on the chart.
197202

@@ -200,6 +205,7 @@ To create one go to your project tree, right-click the SFC script and click the
200205
![Creating new action](assets/newAction.png)
201206

202207
#### SFC Program
208+
<br></br>
203209

204210
You have blocks available by right-clicking inside the canvas or on the top bar, you can drag and drop them.
205211

@@ -213,6 +219,7 @@ The counter program should look like the following picture. Note the action insi
213219
![Sequential Function Chart counter program](assets/SFCprogram.png)
214220

215221
Here is a video doing that from scratch:
222+
216223
<iframe width="100%" height="415" src="https://www.youtube.com/embed/olQooS4bX4A" title="YouTube video player" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
217224

218225
### Functional Block Diagram
@@ -225,13 +232,15 @@ This is how the counter program looks:
225232
![Functional Block Diagram](assets/FBDprogram.png)
226233

227234
Here is a video doing that from scratch:
235+
228236
<iframe width="100%" height="415" src="https://www.youtube.com/embed/l1L4jzDVKyE" title="YouTube video player" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
229237

230238
***In the previous programs, we used local variables, remember to select the program's specific variables to be watched, or you will not see any data***
231239

232240
## Conclusion
233241

234242
You have:
243+
235244
* Created a simple counter with each language
236245
* Learned how to watch live variable's value
237246
* Attached a program to a task

0 commit comments

Comments
 (0)