Skip to content

Commit 84c3dff

Browse files
committed
PMC and PLC IDE code bash patch
1 parent 1d065c7 commit 84c3dff

File tree

5 files changed

+10
-8
lines changed
  • content
    • hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials
    • software/plc-ide/tutorials

5 files changed

+10
-8
lines changed

content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials/pmc-opta-temp-ctrl/content.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Inside the `Project` window, double-click on the `Main` program located under `T
153153

154154
In the code section, you have to write the following code:
155155

156-
```
156+
```cpp
157157
temp0 := sysTempProbes[0].temperature;
158158
temp_send := temp0 * 100.00;
159159
```
@@ -262,7 +262,7 @@ Now that we have created the global variable where we are going to store the tem
262262

263263
In the code window, paste the next code:
264264

265-
```
265+
```cpp
266266
//Set the temperature threshold to trigger on the relay
267267

268268
threshold := 30.00;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ If everything is correct, when you double-click on **Global_vars**, a table with
187187

188188
Now that we have created the variables, we have to make it work by defining the variables in the **main** program code. To do this, double-click on "main" and write the next lines in the code box:
189189

190-
```
190+
```cpp
191191
TP00 := sysTempProbes[0];
192192
temp0:= systempProbes[0].temperature;
193193
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ The PLC program will do the following processes:
405405

406406
The following code delivers the previous tasks:
407407

408-
```
408+
```cpp
409409
cnt := cnt + 1;
410410
out_counter := cnt;
411411

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ We will assign to the **Digital Output pin 2** the name **`digitalOut01`**
7979

8080
To interact with the digital output pin you can use this code:
8181

82-
```
82+
```cpp
8383
// Set the Digital Output 01 to HIGH
8484

8585
digitalOut01 := 1;
@@ -102,7 +102,7 @@ Now on the popup menu, you can set the name of the variable, then select the typ
102102

103103
As it is an array you will be able to access its pin in a **For loop** like the following:
104104

105-
```
105+
```cpp
106106
// Set all the Digital Outputs to HIGH
107107

108108
FOR pinNumber := 0 TO 7 DO

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ There are 5 languages available:
159159
### Structured Text
160160

161161
This language is similar to C, the code to assign a value to a variable is the following:
162-
```
162+
163+
```cpp
163164
count := count + addition;
164165
```
165166

@@ -170,7 +171,8 @@ count := count + addition;
170171
This programming language is similar to Assembly programming.
171172

172173
The code for a counter script is:
173-
```
174+
175+
```cpp
174176
LD count
175177
ADD addition
176178
ST count

0 commit comments

Comments
 (0)