Modelica_DeviceDrivers.ClockedBlocks.Examples

Executable usage examples for the provided device driver blocks (require Modelica_Synchronous library!)

Information

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

NameDescription
Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackager TestSerialPackager Example for using the SerialPackager
Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackager_UDP TestSerialPackager_UDP Example for combining UDP and SerialPackager blocks
Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackagerBitPack_UDP TestSerialPackagerBitPack_UDP Example for the PackUnsignedInteger and UnpackUnsignedInteger blocks from the SerialPackager
Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackager_SharedMemory TestSerialPackager_SharedMemory Example for combining SharedMemory and SerialPackager blocks
Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputSpaceMouse TestInputSpaceMouse Example for a 3Dconnexion SpaceMouse
Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputJoystick TestInputJoystick Example for a joystick/gamepad
Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputKeyboard TestInputKeyboard Example for keyboard input
Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputKeyboardKey TestInputKeyboardKey Example for keyboard input using the KeyboardKeyInput block
Modelica_DeviceDrivers.ClockedBlocks.Examples.TestRandomRealSource TestRandomRealSource Example for using the RandomRealSource block

Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackager Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackager

Example for using the SerialPackager

Information


The example demonstrates that pack and unpack blocks of the SerialPackager package can be connected directly.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackager_UDP Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackager_UDP

Example for combining UDP and SerialPackager blocks

Information


The uDPSend block sends to the local port 10002. The uDPReceive block starts a background process that listens at port 10002. Consequently, the uDPReceive block receives what the uDPSend block sends.

Note: There is no causality between the uDPSend block and the uDPReceive block. Therefore the execution order of the blocks is not determined. Additionally, the uDPReceive block starts an own receiving thread, so that the time the data was received is not equal to the time the external function within the uDPReceive block was called. This indeterminism may also show up in the plots.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackagerBitPack_UDP Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackagerBitPack_UDP

Example for the PackUnsignedInteger and UnpackUnsignedInteger blocks from the SerialPackager

Information


In particular this model demonstrates how integer values can be packed and unpacked at bit level using the PackUnsignedInteger and UnpackUnsignedInteger blocks.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackager_SharedMemory Modelica_DeviceDrivers.ClockedBlocks.Examples.TestSerialPackager_SharedMemory

Example for combining SharedMemory and SerialPackager blocks

Information


The sharedMemoryWrite block writes to the memory partition with memoryID = "sharedMemory". The sharedMemoryRead block reads from that partition.

Note: There is no causality between the sharedMemoryWrite block and the sharedMemoryRead block. Therefore the execution order of the blocks is not determined. This indeterminism may also show up in the plots.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputSpaceMouse Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputSpaceMouse

Example for a 3Dconnexion SpaceMouse

Information


Basic example of using inputs from a 3Dconnexion SpaceMouse.

Important for Linux users: In order to work under Linux it is needed that the linux drivers provided by 3Dconnexion are installed and running.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputJoystick Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputJoystick

Example for a joystick/gamepad

Information


Basic example of using inputs from a joystick/gamepad device.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputKeyboard Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputKeyboard

Example for keyboard input

Information


Basic example of using a keyboard as input device.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputKeyboardKey Modelica_DeviceDrivers.ClockedBlocks.Examples.TestInputKeyboardKey

Example for keyboard input using the KeyboardKeyInput block

Information


Basic example of using a keyboard as input device. For this example the parameter keyCode is set to the "space" key. Therefore, pressing space while the simulation is running will turn the output of the block to true, otherwise it is false

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica_DeviceDrivers.ClockedBlocks.Examples.TestRandomRealSource Modelica_DeviceDrivers.ClockedBlocks.Examples.TestRandomRealSource

Example for using the RandomRealSource block

Information

Extends from Modelica.Icons.Example (Icon for runnable examples).
Automatically generated Fri Oct 12 11:55:59 2012.