Skip to content

Commit 8510c0a

Browse files
committed
Input/output timing added
1 parent 61f9da2 commit 8510c0a

File tree

1 file changed

+80
-34
lines changed
  • content/hardware/07.opta/opta-family/opta/tutorials/01.user-manual

1 file changed

+80
-34
lines changed

content/hardware/07.opta/opta-family/opta/tutorials/01.user-manual/content.md

Lines changed: 80 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,6 +1850,15 @@ Analog/digital input terminals are mapped as described in the following table:
18501850
| I15 | 14 |
18511851
| I16 | 15 |
18521852

1853+
The **reading time** of digital and analog inputs is detailed in the table below:
1854+
1855+
| **Channel type** | **Number of inputs** | **Function** | **Time** | **Notes** |
1856+
|:----------------:|:--------------------:|:------------------------------:|:--------:|:-----------------------------------------------------------------------------------------------------:|
1857+
| Digital | All at once | `digitalRead(pin, true)` | ~580 µs | This function even if used to read a "single pin" actually updates the value of all the digital pins. |
1858+
| Digital | All at once | `updateDigitalInputs()` | ~580 µs | This function is also included in the measure `digitalRead(0, false)` |
1859+
| Analog | One | `getAnalogRead(channel, true)` | ~600 µs | Time does not change converting the value to physical unit (i.e. using `pinVoltage()`) |
1860+
| Analog | All at once | `updateAnalogInputs()` | ~1.28 ms | This function is also included in the measure `getAnalogRead(0, false)` |
1861+
18531862
#### Digital
18541863

18551864
| **Characteristics** | **Details** |
@@ -1858,6 +1867,7 @@ Analog/digital input terminals are mapped as described in the following table:
18581867
| Digital Input voltage logic level | VIL Max: 4 VDC. VHL Min: 5.9 VDC |
18591868
| Digital Input current | 4.12mA at 24V \| 2.05mA at 10V |
18601869
| Digital Input frequency | 300 Hz |
1870+
| All inputs at once reading time | ~580 µs |
18611871

18621872
The state of an input terminal, configured as digital, can be read using the built-in function `digitalRead()` as shown below:
18631873

@@ -2006,13 +2016,15 @@ LL LL LL LL LL HH LL LL LL LL LL LL LL LL LL LL
20062016

20072017
#### Analog
20082018

2009-
| **Characteristics** | **Details** |
2010-
|:-----------------------:|:-----------:|
2011-
| Analog Input voltage | 0...24V |
2012-
| Analog Input resolution | 14 bits |
2013-
| Analog Input LSB value | 1.733 mV |
2014-
| Accuracy | +/- 5% |
2015-
| Repeatability | +/- 2% |
2019+
| **Characteristics** | **Details** |
2020+
|:-------------------------------:|:-----------:|
2021+
| Analog Input voltage | 0...24V |
2022+
| Analog Input resolution | 14 bits |
2023+
| Analog Input LSB value | 1.733 mV |
2024+
| Accuracy | +/- 5% |
2025+
| Repeatability | +/- 2% |
2026+
| One input reading time | ~600 µs |
2027+
| All inputs at once reading time | ~1.28 ms |
20162028

20172029
The state of an input terminal, configured as analog, can be read using the built-in function `analogRead()` as shown below:
20182030

@@ -2159,6 +2171,7 @@ Expansion[0]: type DIGITAL [Mechanical], I2C address: 11
21592171

21602172
![Analog Input wiring example](assets/analog-inputs.png)
21612173

2174+
21622175
#### Outputs
21632176

21642177
The Opta™ Expansions have **8 relay outputs** accessible through terminals pairs `1` to `8`.
@@ -2480,16 +2493,28 @@ Input terminals are mapped as described in the following table:
24802493
| I6 | 6 or OA_CH_6 |
24812494
| O2 | 7 or OA_CH_7 |
24822495

2496+
The **reading time** of digital and analog inputs is detailed in the table below:
2497+
2498+
| **Channel type** | **Number of inputs** | **Function** | **Time** | **Notes** |
2499+
|:----------------:|:--------------------:|:------------------------:|:--------:|:-----------------------------------------------------------------------------------------------------:|
2500+
| RTD | One | `getRtd(channel)` | ~600 µs | |
2501+
| Analog | One | `getAdc(channel)` | ~550 µs | Time does not change converting the value to physical unit (i.e. using `pinVoltage()`) |
2502+
| Analog | All at once | `updateAnalogInputs()` | ~890 µs | This function is also included in the measure `getAdc(0, false)` |
2503+
| Digital | All at once | `digitalRead(pin, true)` | ~480 µs | This function even if used to read a "single pin" actually updates the value of all the digital pins. |
2504+
| Digital | All at once | `updateDigitalInputs()` | ~480 µs | This function is also included in the measure `digitalRead(0, false)` |
2505+
2506+
24832507
#### Digital Input Mode
24842508

24852509
The Analog Expansion input channels can be configured as digital inputs to read 0-10 V or 0-24 V digital sensors:
24862510

2487-
| **Characteristics** | **Details** |
2488-
|:-----------------------:|:-----------------------------------------:|
2489-
| Digital input voltage | 0...24 V |
2490-
| Configurable threshold | Yes (for supporting 0...10 V logic level) |
2491-
| Digital input current | 4.12mA at 24V \| 2.05mA at 10V |
2492-
| Digital input frequency | 300 Hz |
2511+
| **Characteristics** | **Details** |
2512+
|:-------------------------------:|:-----------------------------------------:|
2513+
| Digital input voltage | 0...24 V |
2514+
| Configurable threshold | Yes (for supporting 0...10 V logic level) |
2515+
| Digital input current | 4.12 mA at 24V \| 2.05 mA at 10V |
2516+
| Digital input frequency | 300 Hz |
2517+
| All inputs at once reading time | ~480 µs |
24932518

24942519
The state of an input terminal configured as digital can be read using the built-in function `digitalRead()` as shown below:
24952520

@@ -2636,14 +2661,16 @@ DI channel 7 value 0
26362661

26372662
The Analog Expansion input channels can be configured for 0-10 V analog sensors.
26382663

2639-
| **Characteristics** | **Details** |
2640-
|:-----------------------:|:------------------------------------------------------:|
2641-
| Analog input voltage | 0...10 V |
2642-
| Analog Input resolution | 16 bits |
2643-
| Analog input LSB value | 152.59 uV |
2644-
| Accuracy | +/- 1% |
2645-
| Repeatability | +/- 1% |
2646-
| Input impedance | Min: 175 kΩ (when internal 200 kΩ resistor is enabled) |
2664+
| **Characteristics** | **Details** |
2665+
|:-------------------------------:|:------------------------------------------------------:|
2666+
| Analog input voltage | 0...10 V |
2667+
| Analog Input resolution | 16 bits |
2668+
| Analog input LSB value | 152.59 uV |
2669+
| Accuracy | +/- 1% |
2670+
| Repeatability | +/- 1% |
2671+
| Input impedance | Min: 175 kΩ (when internal 200 kΩ resistor is enabled) |
2672+
| One input reading time | ~550 µs |
2673+
| All inputs at once reading time | ~890 µs |
26472674

26482675
The raw value of an input terminal configured as analog can be read using the built-in function `analogRead()` as shown below:
26492676

@@ -2836,6 +2863,8 @@ The Analog Expansion input channels can be configured for current loop instrumen
28362863
| Programmable current limit (per channel) | 0.5 mA to 24.5 mA (loop powered) |
28372864
| Accuracy | +/- 1% |
28382865
| Repeatability | +/- 1% |
2866+
| One input reading time | ~550 µs |
2867+
| All inputs at once reading time | ~890 µs |
28392868

28402869
The current of an input terminal configured in current mode can be read using the built-in function `pinCurrent()` as shown below:
28412870

@@ -3152,10 +3181,12 @@ Setting DAC output to 11 V on expansion n. 0
31523181

31533182
The Analog Expansion input channels can be used for temperature metering with **PT100** RTDs.
31543183

3155-
| **Characteristics** | **Details** |
3156-
|:-------------------:|:-----------:|
3157-
| Input range | 0...1 MΩ |
3158-
| Bias voltage | 2.5 V |
3184+
| **Characteristics** | **Details** |
3185+
|:----------------------:|:-----------:|
3186+
| Input range | 0...1 MΩ |
3187+
| Bias voltage | 2.5 V |
3188+
| One input reading time | ~600 µs |
3189+
31593190

31603191
2 wires RTDs can be connected to any of the eight channels as follows:
31613192

@@ -3364,19 +3395,30 @@ PWM output terminals are mapped as described in the following table:
33643395

33653396
![Opta Analog Expansions Outputs](assets/outputs-analog.png)
33663397

3398+
The **writing time** of analog outputs is detailed in the table below:
3399+
3400+
| **Channel type** | **Number of outputs** | **Function** | **Time** | **Notes** |
3401+
|:----------------:|:---------------------:|:--------------------------------:|:--------:|:------------------------------------------------------------------------------------------------------------:|
3402+
| DAC | One | `setDac(channel, value, true)` | ~560 µs | |
3403+
| DAC | All at once | `updateAnalogOutputs()` | ~960 µs | This function is also included in the function `setDac(channel, value, false)` |
3404+
| PWM | One | `setPwm(channel, period, pulse)` | ~700 µs | In case the new setting is equal to the old one no message is sent and the function execution takes a few µs |
3405+
3406+
33673407
#### Analog Voltage Output Mode
33683408

33693409
This output mode lets you control voltage-driven actuators or communicate with other devices through analog voltages.
33703410

3371-
| **Characteristics** | **Details** |
3372-
|:--------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------:|
3373-
| Analog output voltage | 0...11 V |
3374-
| Resistive load range | 500 Ω...100 kΩ |
3375-
| Maximum capacitive load | 2 μF |
3376-
| Short-circuit current per channel (sourcing) | Min: 25 mA, Typ: 29 mA, Max: 32 mA (lower limit bit = 0 (default)), Min: 5.5 mA, Typ: 7 mA, Max: 9 mA (lower limit bit = 1) |
3377-
| Short-circuit current per channel (sinking) | Min: 3.0 mA, Typ: 3.8 mA, Max: 4.5 mA |
3378-
| Accuracy | +/- 1% |
3379-
| Repeatability | +/- 1% |
3411+
| **Characteristics** | **Details** |
3412+
|:--------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------:|
3413+
| Analog output voltage | 0...11 V |
3414+
| Resistive load range | 500 Ω...100 kΩ |
3415+
| Maximum capacitive load | 2 μF |
3416+
| Short-circuit current per channel (sourcing) | Min: 25 mA, Typ: 29 mA, Max: 32 mA (lower limit bit = 0 (default)) \| Min: 5.5 mA, Typ: 7 mA, Max: 9 mA (lower limit bit = 1) |
3417+
| Short-circuit current per channel (sinking) | Min: 3.0 mA, Typ: 3.8 mA, Max: 4.5 mA |
3418+
| Accuracy | +/- 1% |
3419+
| Repeatability | +/- 1% |
3420+
| One output writing time | ~560 µs |
3421+
| All outputs at once writing time | ~960 µs |
33803422

33813423
To set a voltage in an analog output terminal use the built-in function `pinVoltage()` as shown below:
33823424

@@ -3555,6 +3597,8 @@ This output mode lets you control current-driven actuators or communicate with o
35553597
| Output impedance | Min: 1.5 MΩ, Typ: 4 MΩ |
35563598
| Accuracy | 1% in 0-10 mA range, 2% in 10-24 mA range |
35573599
| Repeatability | 1% in 0-10 mA range, 2% in 10-24 mA range |
3600+
| One output writing time | ~560 µs |
3601+
| All outputs at once writing time | ~960 µs |
35583602

35593603
To set a current in an analog output terminal use the built-in function `pinCurrent()` as shown below:
35603604

@@ -3728,6 +3772,8 @@ The Analog Expansion has four PWM output channels **(P1...P4)**. They are softwa
37283772
| Source voltage supported | 8...40 VDC |
37293773
| Period | Programmable |
37303774
| Duty-cycle | Programmable (0-100%) |
3775+
| One output writing time | ~700 µs |
3776+
37313777

37323778
![Wiring to use the PWM outputs](assets/pwm-setup.png)
37333779

0 commit comments

Comments
 (0)