block_limit_switch.test.ctrl 2.56 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11

trigger {
	{ "immediate" }
}

blocks (10.0, 0.0) {
	{ "limit_switch", "limit" }
	
	{ "test_input_float", "in" }
	{ "test_input_bool", "enable_pos" }
	{ "test_input_bool", "enable_neg" }
12
	{ "test_input_bool", "enable"     }
13
14
15
16
17
18
19
20
	
	{ "test_output_float", "out"   }
}

links {
	{ "in", "value",         "limit", "in",         true }
	{ "enable_pos", "value", "limit", "enable_pos", true }
	{ "enable_neg", "value", "limit", "enable_neg", true }
21
	{ "enable", "value",     "limit", "enable",     true }
22
23
24
25
	{ "limit", "out",        "out", "value",        true }
}

params {
26
27
28
29
30
	{ "in", "value", 40, (float) { 
	    0.0, -1.0, -20000.0, 1.0, 20000.0,
	    0.0, -1.0, -20000.0, 1.0, 20000.0,
	    0.0, -1.0, -20000.0, 1.0, 20000.0,
	    0.0, -1.0, -20000.0, 1.0, 20000.0, 
31
32
33
34
35
	    0.0, -1.0, -20000.0, 1.0, 20000.0,
	    0.0, -1.0, -20000.0, 1.0, 20000.0,
	    0.0, -1.0, -20000.0, 1.0, 20000.0,
	    0.0, -1.0, -20000.0, 1.0, 20000.0 } 
	}
36
37
38
39
40
	{ "enable_pos", "value", 40, (int) { 
	    false, false, false, false, false,
	    false, false, false, false, false,
	    true,  true,  true,  true,  true,
	    true,  true,  true,  true,  true,
41
42
43
44
45
	    false, false, false, false, false,
	    false, false, false, false, false,
	    true,  true,  true,  true,  true,
	    true,  true,  true,  true,  true }
	}
46
47
48
49
50
	{ "enable_neg", "value", 40, (int) { 
	    false, false, false, false, false,
	    true,  true,  true,  true,  true,
	    false, false, false, false, false,
	    true,  true,  true,  true,  true,
51
52
53
54
55
	    false, false, false, false, false,
	    true,  true,  true,  true,  true,
	    false, false, false, false, false,
	    true,  true,  true,  true,  true }
	}
56
57
58
59
60
61
62
63
64
65
	{ "enable", "value", 40, (int) { 
	    false, false, false, false, false,
	    false, false, false, false, false,
	    false, false, false, false, false,
	    false, false, false, false, false,
	    true,  true,  true,  true,  true,
	    true,  true,  true,  true,  true,
	    true,  true,  true,  true,  true,
	    true,  true,  true,  true,  true }
	}
66

67
	{ "out", "value", 40, 
68
69
70
71
		(float) { 
		    0.0, 0.0, 0.0, 0.0, 0.0, 
		    0.0, -1.0, -20000.0, 0.0, 0.0, 
		    0.0, 0.0, 0.0, 1.0, 20000.0, 
72
73
74
75
		    0.0, -1.0, -20000.0, 1.0, 20000.0,
		    0.0, -1.0, -20000.0, 1.0, 20000.0, 
		    0.0, -1.0, -20000.0, 1.0, 20000.0, 
		    0.0, -1.0, -20000.0, 1.0, 20000.0, 
76
77
78
		    0.0, -1.0, -20000.0, 1.0, 20000.0
		},
		(float) { 
79
80
81
82
		    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,
83
84
85
86
87
88
89
		    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
		}
	}
}