block_setpoint_generator_1d.test.ctrl 2.35 KB
Newer Older
Jeroen Vreeken's avatar
Jeroen Vreeken committed
1
2
3
4
5
6
7
8
9
10
11
frequency 10

blocks {
	{ "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
12
	{ "test_output_uint32", "id"      }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
13
14
15
16
17
18
19
20
21
22
23

	{ "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
24
	{ "spg", "id", "id", "value", true }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
25
26
27
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
60
61
62
63
64
65
}

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,
		         -94.0,-95.0,-97.0,-99.0,-100.0, -100.0, -100.0, -100.0, -100.0, -100.0},
		(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
66
67
68
69
	{ "id",   "value", 20, 
		(int)   { (int)0xffffffff, 123, 123, 123, 123, 123, 124, 125, 126, 200,
		          (int)0xffffffff, 127, 201,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff,(int)0xffffffff}
	}
Jeroen Vreeken's avatar
Jeroen Vreeken committed
70
}