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/07.opta/opta-family/opta/tutorials/18.opta-analog-expansion-plc-ide/content.md
+58-6Lines changed: 58 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ Insert the following variable with it respective _type_ to store the input volta
151
151
| :------: | :------: |
152
152
| V_IN1 | REAL |
153
153
154
-

154
+

155
155
156
156
- In the main code editor add the following formula to convert the ADC raw reading to a voltage and store it in the `V_IN1` variable.
157
157
@@ -177,13 +177,13 @@ Now you can easily read this input current in your program. For example in a **S
177
177
178
178

179
179
180
-
Insert the following variable with it respective _type_ to store the input voltage:
180
+
Insert the following variable with it respective _type_ to store the input current:
181
181
182
182
|**Name**|**Type**|
183
183
| :------: | :------: |
184
184
| I_IN1 | REAL |
185
185
186
-

186
+

187
187
188
188
- In the main code editor add the following formula to convert the ADC raw reading to a current and store it in the `I_IN1` variable.
189
189
@@ -199,19 +199,71 @@ I_IN1 := IN1*25.0/65535.0;
199
199
200
200
### Analog RTD Input Mode
201
201
202
-
To set up an input in RTD mode for termperature measurement, navigate to **Programmable Channels** under your desired expansion in the left **Resources** menu. Define a variable name, `IN1` in this case and set the **IOType** to `Input - RTD 3 Wires` or `Input - RTD 2 Wires` .
202
+
To set up an input in RTD mode for termperature measurement, navigate to **Programmable Channels** under your desired expansion in the left **Resources** menu. Define a variable name, `IN1` in this case and set the **IOType** to `Input - RTD 2 Wires` or `Input - RTD 3 Wires` .
***Channels I1 and I2 support 3 Wires RTD and 2 Wires RTD, all other channels only support 2 Wires RTD. If a 3 Wires RTD is defined, you need to set a current in mA for it, see your RTD datasheet.***
207
+
208
+
Now you can easily read this input resistance in your program. For example in a **Structured Language** program using a **PT100** sensor:
209
+
210
+
- Open your project main program navigating to the **Project** tab in the left panel, select **Main** in the project tree, and right-click on the **Local variables** window to insert a variable.
211
+
212
+

213
+
214
+
Insert the following variables with their respective _type_ and _attribute_:
***The analog channel in RTD mode can measure up to 1 MΩ and to convert the resistive value of it into temperature, the above quadratic equation is needed.***
233
+
234
+
- Upload the program to your Opta and enable the **Live Debug Mode** to see the temperature readings updating in real-time.
235
+
236
+

207
237
208
238
## Programmable Outputs
209
239
240
+
The Opta™ Analog Expansion has **8x analog programmable outputs** accessible through terminals `I1` to `I6` and `O1` to `O2` that can be used as:
***Due to power dissipation limitations, it is recommended to have up to 2 channels set at output at the same time. At 25°C of ambient temperature, all the 8x channels set as outputs have been tested at the same time while outputting more than 24 mA at 10 V each (>0.24W per channel).***
248
+
210
249
### Analog Voltage Output Mode
211
250
251
+
212
252
### Analog Current Output Mode
213
253
214
254
### PWM Output
255
+
The Analog Expansion has 4x PWM output channels **(P1...P4)**. They are software configurable and for them to work you must provide the **V<sub>PWM</sub>** pin with the desired voltage.
0 commit comments