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: Modelica_DeviceDrivers/Blocks/Communication.mo
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1149,9 +1149,9 @@ See <a href=\"modelica://Modelica_DeviceDrivers.Blocks.Examples.TestSerialPackag
1149
1149
<h4>Setup of a virtual CAN interface</h4>
1150
1150
<p>Even if a Linux computer doesn't have a CAN device, it is possible to setup a virtual CAN device that can be used similarly to a physical device. This section discusses the necessary steps to bring up a virtual CAN device (tested with Ubuntu 12.04) which can be used with the <a href=\"Modelica://Modelica_DeviceDrivers.Blocks.Examples.TestSerialPackager_SocketCAN\">SocketCAN example model</a>. Note that this usually requires root rights. Also executing the Modelica example model might require root rights.</p>
1151
1151
<ul>
1152
-
<li>Load the vcan kernel model:<br/><code>sudo modprobe vcan</code></li>
1153
-
<li>Create a virtual CAN device with default name (default name will be "vcan0"):<br/><code>sudo ip link add type vcan</code></li>
1154
-
<li>Bring the device up:<br/><code>sudo ifconfig vcan0 up</code></li>
1152
+
<li>Load the vcan kernel model:<br><code>sudo modprobe vcan</code></li>
1153
+
<li>Create a virtual CAN device with default name (default name will be "vcan0"):<br><code>sudo ip link add type vcan</code></li>
1154
+
<li>Bring the device up:<br><code>sudo ifconfig vcan0 up</code></li>
1155
1155
</ul>
1156
1156
<h4>Setup of a physical CAN interface</h4>
1157
1157
<p>Please have a look in the respective documentation to Socket CAN. A physical CAN interface will require more configuration settings than the virtual interface (e.g., bitrate setting).</p>
Copy file name to clipboardExpand all lines: Modelica_DeviceDrivers/Blocks/HardwareIO.mo
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -62,9 +62,9 @@ package HardwareIO
62
62
textString="%name")}),
63
63
Documentation(info="<html>
64
64
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
65
-
<p>Wraps the Comedi function<code> comedi_data_write(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref</code>.</
65
+
<p>Wraps the Comedi function<code> comedi_data_write(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref</code>.</p>
66
66
<h4>Note</h4>
67
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
67
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
68
68
</html>"));
69
69
end DataWrite;
70
70
@@ -101,7 +101,7 @@ package HardwareIO
101
101
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
102
102
<p>Wraps the Comedi function<code> comedi_data_read(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref</code>.</p>
103
103
<h4>Note</h4>
104
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
104
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
105
105
</html>"));
106
106
end DataRead;
107
107
@@ -156,7 +156,7 @@ package HardwareIO
156
156
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
157
157
<p>Uses the Comedi function<code> comedi_from_phys(..)</code> to support providing a physical value (volts or milliamps) as input to the DAC. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref.</code></p>
158
158
<h4>Note</h4>
159
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
159
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
160
160
</html>"));
161
161
end PhysicalDataWrite;
162
162
@@ -210,7 +210,7 @@ package HardwareIO
210
210
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
211
211
<p>Uses the Comedi function<code> comedi_to_phys(..)</code> to convert a raw input obtained from the ADC to a physical value (volts or milliamps) . See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref.</code></p>
212
212
<h4>Note</h4>
213
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
213
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
214
214
</html>"));
215
215
end PhysicalDataRead;
216
216
@@ -251,7 +251,7 @@ package HardwareIO
251
251
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
252
252
<p>Wraps the Comedi function<code> comedi_dio_write(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice </code>and<code> channel</code>.</p>
253
253
<h4>Note</h4>
254
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
254
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
255
255
</html>"));
256
256
end DIOWrite;
257
257
@@ -292,7 +292,7 @@ package HardwareIO
292
292
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
293
293
<p>Wraps the Comedi function<code> comedi_dio_read(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice </code>and<code> channel</code>.</p>
294
294
<h4>Note</h4>
295
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
295
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
296
296
</html>"));
297
297
end DIORead;
298
298
@@ -307,6 +307,7 @@ package HardwareIO
307
307
annotation (Documentation(info="<html>
308
308
<p>
309
309
Enumeration that defines the available reference channels used in a DAQ-card
Copy file name to clipboardExpand all lines: Modelica_DeviceDrivers/ClockedBlocks/HardwareIO.mo
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ package HardwareIO
64
64
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
65
65
<p>Wraps the Comedi function<code> comedi_data_write(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref</code>.</p>
66
66
<h4>Note</h4>
67
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
67
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
68
68
</html>"));
69
69
end DataWrite;
70
70
@@ -101,7 +101,7 @@ package HardwareIO
101
101
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
102
102
<p>Wraps the Comedi function<code> comedi_data_read(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref</code>.</p>
103
103
<h4>Note</h4>
104
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
104
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
105
105
</html>"));
106
106
end DataRead;
107
107
@@ -163,7 +163,7 @@ package HardwareIO
163
163
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
164
164
<p>Uses the Comedi function<code> comedi_from_phys(..)</code> to support providing a physical value (volts or milliamps) as input to the DAC. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref.</code></p>
165
165
<h4>Note</h4>
166
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
166
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
167
167
</html>"));
168
168
end PhysicalDataWrite;
169
169
@@ -223,7 +223,7 @@ package HardwareIO
223
223
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
224
224
<p>Uses the Comedi function<code> comedi_to_phys(..)</code> to convert a raw input obtained from the ADC to a physical value (volts or milliamps) . See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref.</code></p>
225
225
<h4>Note</h4>
226
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
226
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
227
227
</html>"));
228
228
end PhysicalDataRead;
229
229
@@ -268,7 +268,7 @@ package HardwareIO
268
268
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
269
269
<p>Wraps the Comedi function<code> comedi_dio_write(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice </code>and<code> channel</code>.</p>
270
270
<h4>Note</h4>
271
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
271
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
272
272
</html>"));
273
273
end DIOWrite;
274
274
@@ -315,7 +315,7 @@ package HardwareIO
315
315
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
316
316
<p>Wraps the Comedi function<code> comedi_dio_read(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice </code>and<code> channel</code>.</p>
317
317
<h4>Note</h4>
318
-
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
318
+
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).</p>
319
319
</html>"));
320
320
end DIORead;
321
321
@@ -330,6 +330,7 @@ package HardwareIO
330
330
annotation (Documentation(info="<html>
331
331
<p>
332
332
Enumeration that defines the available reference channels used in a DAQ-card
<p>BlinkGPIO_EXTI is a model configuring interrupt on falling edge on GPIO Line 0. Since Modelica is not able to generate code for the <a href=modelica://Modelica_DeviceDrivers/Resources/Scripts/OpenModelica/EmbeddedTargets/STM32F4/Examples/STM32F4_Discovery/ext_callback.c>callback function</a>, the user has to edit code here manually. In the callback function all User LEDs (port D pin 12 - 15) are toggled. As a result, the LEDs are toggled when the blue user button is released. Use this model to see if your Modelica tool can export code for STM32F4 MCUs..</p>
17
+
<p>BlinkGPIO_EXTI is a model configuring interrupt on falling edge on GPIO Line 0. Since Modelica is not able to generate code for the <a href=\"modelica://Modelica_DeviceDrivers/Resources/Scripts/OpenModelica/EmbeddedTargets/STM32F4/Examples/STM32F4_Discovery/ext_callback.c\">callback function</a>, the user has to edit code here manually. In the callback function all User LEDs (port D pin 12 - 15) are toggled. As a result, the LEDs are toggled when the blue user button is released. Use this model to see if your Modelica tool can export code for STM32F4 MCUs..</p>
18
18
<p>STM digital pins 12 - 15 on port D corresponds to digital pin D12 - D15 on the STM32F4-Discovery. If desired, you can connect an external LEDs to this PINs, with a suitable resistor in-between (perhaps 220Ω). Connect the other PIN on the LED to ground.</p>
19
19
</html>")); /* synchronizeRealtime1.actualInterval is not legal in experiment annotation*/
0 commit comments