block_setpoint_generator_1d.test.ctrl 2.39 KB
Newer Older
Jeroen Vreeken's avatar
Jeroen Vreeken committed
1

2
3
4
5
trigger {
	{ "immediate" }
}

Jeroen Vreeken's avatar
Jeroen Vreeken committed
6
blocks (10.0, 0.0) {
Jeroen Vreeken's avatar
Jeroen Vreeken committed
7
8
9
10
11
12
13
14
	{ "setpoint_generator_1d", "spg", "spg", "na" }

	{ "test_input_bool",  "reset"   }
	{ "test_input_float", "reset_x" }

	{ "test_output_float", "setpoint" }
	{ "test_output_float", "x"        }
	{ "test_output_float", "v"        }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
15
	{ "test_output_uint32", "id"      }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
16
17
18
19
20
21
22
23
24
25
26

	{ "test_command", "command" }
}

links {
	{ "reset",   "value", "spg", "reset",   true }
	{ "reset_x", "value", "spg", "reset_x", true }
	
	{ "spg", "x", "x", "value", true }
	{ "spg", "v", "v", "value", true }
	{ "spg", "setpoint", "setpoint", "value", true }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
27
	{ "spg", "id", "id", "value", true }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
}

set SETPOINT		4
set SPEED		5
set SETPOINT_TIME 	6

params {
	{ "spg", "min_x", (float) -100.0 }
	{ "spg", "max_x", (float)  200.0 }
	{ "spg", "max_v", (float)  20.0  }

	{ "command", "command", "spg", $[SETPOINT_TIME], 123,   80.0, 0, 500000000 }
	{ "command", "command", "spg", $[SETPOINT],      124, -110.0 }
	{ "command", "command", "spg", $[SETPOINT],      125,  300.0 }
	{ "command", "command", "spg", $[SETPOINT],      126,   61.0 }
	{ "command", "command", "spg", $[SPEED],         200,   11.0 }
	{ "command", "command", "spg", $[SETPOINT_TIME], 127,  -95.0, 1, 100000000 }
	{ "command", "command", "spg", $[SPEED],         201,  -33.0 }

	{ "reset",   "value", 12, 
		(int)   { true, false, false, false, false, false, false, false, false, false, 
		          true, false	} }
	{ "reset_x", "value", 11, 
		(float) { 50.0, 33.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
		         -94.0  } }
	
	{ "setpoint", "value", 10,
		(float) { 50.0, 56.0, 62.0, 68.0, 74.0, 80.0, -100.0, 200.0, 61.0, 62.1 },
		(float) {  0.0,  0.0, 0.0, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0  }
	}
	{ "x", "value", 20,
		(float) { 50.0, 52.0, 54.0, 56.0, 58.0, 60.0, 58.0, 60.0, 61.0, 62.1,
Jeroen Vreeken's avatar
Jeroen Vreeken committed
60
		         -94.0,-96.0,-98.0,-100.0,-100.0, -100.0, -100.0, -100.0, -100.0, -100.0},
Jeroen Vreeken's avatar
Jeroen Vreeken committed
61
62
63
64
65
66
67
68
		(float) {  0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ,
		           0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0   }
	}
	{ "v", "value", 10,
		(float) {  0.0, 20.0, 20.0, 20.0, 20.0, 20.0, -20.0, 20.0, 0.0, 11.0 },
		(float) {  0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0  }
	}

Jeroen Vreeken's avatar
Jeroen Vreeken committed
69
70
	{ "id",   "value", 20, 
		(int)   { (int)0xffffffff, 123, 123, 123, 123, 123, 124, 125, 126, 200,
Jeroen Vreeken's avatar
Jeroen Vreeken committed
71
		          (int)0xffffffff, 201,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff}
Jeroen Vreeken's avatar
Jeroen Vreeken committed
72
	}
Jeroen Vreeken's avatar
Jeroen Vreeken committed
73
}