blob: 6f51d6214c9c3e1d86777ac5cdeb71d1e21b9319 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
\name
TIME_SAMPLE
\palette
Arduino
\smalldescription
Set the control duration and the sampling time
\description
This block is \bold{compulsory} to be placed in the xcos model to use this toolbox.
It defines the simulation time of the model as well as the sampling time used for the model (each block is sampled by this step).
Due to the limitation of serial communication the sampling time is about 8 ms (it is possible to go down to 4 ms) per block.
For the complex model, do make sure that the sampling is sufficient for the execution. This could be done by measuring the simulation time is the actual time (10 s simulation should last 10 s). Otherwise, increase the sampling period to suit the need of the model.
\dialogbox
\image{TIME_SAMPLE_dialogbox.png}
The simulation time (positive) must be specified.
The sampling time must be set completed according to the complexity of the model
\example1
The example below shows the use of the block to blink the LED on port 13 of the UNO card set on the communication port 5. All blocks are using the default settings, except for the PULSE block the standard palette of which the phase shift is set to 0.
\image{ARDUINO_SETUP_example.png}
\seealso
ARDUINO_SETUP
|