You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials/rtd-thermocouple-pmc/content.md
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ software:
21
21
---
22
22
23
23
## Introduction
24
+
24
25
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.
25
26
26
27
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
30
31
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.
31
32
32
33
## Goals
34
+
33
35
The goals of this tutorial are:
36
+
34
37
- Learn about the differences between RTD and thermocouples
35
38
- Learn how to connect an RTD or thermocouple to the Portenta Machine Control
36
39
- Understand the operation of the Portenta Machine Control's Temperature Probe inputs
37
40
- Learn about PLC IDE functions and variables
38
41
- Read the temperature values using the Arduino PLC IDE
- The [Arduino PLC IDE](https://www.arduino.cc/pro/software-plc-ide) (Including Arduino PLC IDE Tools)
48
54
- 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)
49
55
50
56
## Temperature Sensors
51
57
52
58
### RTD
59
+
53
60
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.
54
61
55
62
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
69
76
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.
70
77
71
78
### Two Wires RTD Connection
79
+
72
80
The 2-wire RTD configuration is the simplest of the RTD circuit designs, but is more prone to errors.
73
81
74
82
| 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**
82
90

83
91
84
92
### Three Wires RTD Connection
93
+
85
94
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.
86
95
87
96
| 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
97
106
### Thermocouples Connection
98
107
99
108
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
+
100
110
The thermocouples supported by the Portenta Machine Control are:
111
+
101
112
- Thermocouple Type K, non-grounded
102
113
- Thermocouple Type J, non-grounded
103
114
@@ -106,7 +117,6 @@ The thermocouples supported by the Portenta Machine Control are:
106
117
| Connect the positive pin to TP0 | Connect the positive pin to TP1 | Connect the positive pin to TP2 |
107
118
| Connect the negative pin to TN0 | Connect the negative pin to TN1 | Connect the negative pin to TN2 |
108
119
109
-
110
120
***Do not connect any pin to GND***
111
121
112
122

@@ -181,6 +191,7 @@ Now that we have created the variables, we have to make it work by defining the
181
191
TP00 := sysTempProbes[0];
182
192
temp0:= systempProbes[0].temperature;
183
193
```
194
+
184
195
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.
185
196
186
197
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
198
209

199
210
200
211
## Conclusion
212
+
201
213
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.
202
214
203
215
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.
204
216
205
217
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.
206
218
207
219
## Next Steps
220
+
208
221
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.
209
222
210
223
- 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.
Copy file name to clipboardExpand all lines: content/software/plc-ide/tutorials/modbus-setup/content.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -54,12 +54,15 @@ Then you can attach some functions to the Generic Modbus item, they will appear
54
54

55
55
56
56
#### Mode
57
+
<br></br>
57
58
58
59
* Not used
59
60
* Modbus RTU Master
60
61
* Modbus RTU Slave
61
62
62
63
#### Baud Rate
64
+
<br></br>
65
+
63
66
64
67
Baud rate, options:
65
68
* 600
@@ -73,6 +76,7 @@ Baud rate, options:
73
76
* 115200
74
77
75
78
#### Serial Mode
79
+
<br></br>
76
80
77
81
| Name | Parity | data bits | stop bits |
78
82
| ------- | ----------- | --------- | ----------|
@@ -83,13 +87,15 @@ Baud rate, options:
83
87
| O, 8, 2 | Odd parity | 8 | 2 |
84
88
85
89
#### Slave Settings
90
+
<br></br>
86
91
87
92
(Only available on slave mode)
88
93
89
94
* Modbus address
90
95
Address of the device: from 1 to 247. It can not be repeated within the same Modbus net.
91
96
92
97
#### Modbus Node Configuration
98
+
<br></br>
93
99
94
100
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**
Copy file name to clipboardExpand all lines: content/software/plc-ide/tutorials/plc-ide-cloud-support/content.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -205,6 +205,7 @@ The PLC IDE configuration will play an important role in establishing successful
205
205
Thus, you will learn to configure the 'Shared variables' based on the peripherals and tasks you may assign to Opta™.
206
206
207
207
#### Shared Variables Configuration
208
+
<br></br>
208
209
209
210
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'.
210
211
@@ -238,6 +239,7 @@ Depending on the project's development requirements, you can add all the variabl
238
239
We will now configure Opta™ device's features to link all these shared variables.
239
240
240
241
#### Analog Port Configuration
242
+
<br></br>
241
243
242
244
The analog port is configured using the following properties under: `Resources > Opta > Local IO Mapping > Programmable Inputs`.
243
245
@@ -254,6 +256,7 @@ The 'Programmable inputs mapping' table should look as the following image:
254
256
You can also change the analog resolution if needed between 12, 14, or 16 bits.
255
257
256
258
#### User Programmable LED Configuration
259
+
<br></br>
257
260
258
261
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:
259
262
@@ -262,6 +265,7 @@ The user programmable LED of Opta™ is configurable under `Resources > Opta > L
262
265
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.
263
266
264
267
#### Library Components
268
+
<br></br>
265
269
266
270
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.
267
271
@@ -285,6 +289,7 @@ These libraries are indexed, thus they are certified guaranteeing optimized perf
285
289
***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).***
286
290
287
291
#### Arduino Sketch
292
+
<br></br>
288
293
289
294
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.
290
295
@@ -386,6 +391,7 @@ void onCloudButtonChange() {
386
391
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.
387
392
388
393
#### PLC Program
394
+
<br></br>
389
395
390
396
The Arduino sketch is ready and now we need a PLC program that will control the onboard features of Opta™ and data readings.
Copy file name to clipboardExpand all lines: content/software/plc-ide/tutorials/plc-ide-pin-mapping/content.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,7 @@ To create a variable for a **pin map** you have two options:
67
67
***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.***
68
68
69
69
#### Single Variable
70
+
<br></br>
70
71
71
72
Double-click the **Pin Map** that you want to edit, for example, the **Digital Output table**.
72
73
@@ -85,6 +86,7 @@ digitalOut01 := 1;
85
86
```
86
87
87
88
#### Array
89
+
<br></br>
88
90
89
91
Go to your project tile window, and right-click on the **Global Variable** element.
Copy file name to clipboardExpand all lines: content/software/plc-ide/tutorials/plc-ide-setup-license/content.md
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ To get the Arduino PLC IDE software, go to the [official software website of the
49
49
* Arduino PLC IDE Tools
50
50
* Arduino PLC IDE
51
51
52
-

52
+

53
53
54
54
The software requires **Windows 10** or a newer operating system version for the x64 architecture.
55
55
@@ -73,9 +73,9 @@ Once the installation has finished, all the required drivers, libraries, and Ard
73
73
74
74
When you download the Arduino PLC IDE executable, the file naming scheme is as follows:
75
75
76
-
`Setup_Arduino PLC IDE_X.X.X.X_20230329`
76
+
`Setup_Arduino PLC IDE_X.X.X.X_{ReleaseDate}`
77
77
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`.
79
79
80
80
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.
81
81
@@ -134,6 +134,7 @@ Click OK to save the settings and press the connect button on **On-line > Connec
134
134
If the communication is successful the main panel will show the license section to be filled in and a status indicator.
135
135
136
136
#### Online Activation
137
+
<br></br>
137
138
138
139
To use your product license, paste the key in the blank next to **Product Key** and press the **Activate** button.
139
140
@@ -146,6 +147,7 @@ After you click the **Activate** button, the IDE will bind the license to the ha
146
147
Once the product has been activated, it is recommended to get the **Hardware-ID** of your device.
147
148
148
149
#### Offline Activation
150
+
<br></br>
149
151
150
152
To activate the product **Offline**, deselect the "Online" slider and the scenario below will show up:
Copy file name to clipboardExpand all lines: content/software/plc-ide/tutorials/plc-programming-introduction/content.md
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,7 @@ There are 2 types of variables:
38
38
* Local variables: Only one program has access to it.
39
39
40
40
#### Global Variable
41
+
<br></br>
41
42
42
43
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.
43
44
@@ -53,6 +54,7 @@ You will see a list with all the global variables in the **Global_vars** section
53
54

54
55
55
56
#### Local Variable
57
+
<br></br>
56
58
57
59
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.
<iframewidth="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>
187
191
188
192
### Sequential Function Chart
@@ -192,6 +196,7 @@ This language approaches the script in a similar way as a flowchart, meaning you
192
196
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**
193
197
194
198
#### Actions
199
+
<br></br>
195
200
196
201
An action is a script in another language (i.e. structured text) that performs the work, this will get triggered depending on the chart.
197
202
@@ -200,6 +205,7 @@ To create one go to your project tree, right-click the SFC script and click the
200
205

201
206
202
207
#### SFC Program
208
+
<br></br>
203
209
204
210
You have blocks available by right-clicking inside the canvas or on the top bar, you can drag and drop them.
205
211
@@ -213,6 +219,7 @@ The counter program should look like the following picture. Note the action insi
213
219

214
220
215
221
Here is a video doing that from scratch:
222
+
216
223
<iframewidth="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>
217
224
218
225
### Functional Block Diagram
@@ -225,13 +232,15 @@ This is how the counter program looks:
<iframewidth="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>
229
237
230
238
***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***
0 commit comments