Add ABB120 demo suite and docs
This commit is contained in:
14
kdl-wasm/web/tests/fixtures/abb120/spec-programs/static/W2_E10_ExpressionDiagnostics.grl
vendored
Normal file
14
kdl-wasm/web/tests/fixtures/abb120/spec-programs/static/W2_E10_ExpressionDiagnostics.grl
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
language grl 0.1
|
||||
module W2ExpressionDiagnostics
|
||||
const speed v_ok = linear(100 mm/s)
|
||||
const speed v_unknown_symbol = linear(missing_symbol mm/s)
|
||||
const speed v_unknown_function = linear(no_such_function(1) mm/s)
|
||||
const speed v_bad_arity = linear(atan2(1) mm/s)
|
||||
const speed v_domain = linear(sqrt(-1) mm/s)
|
||||
const speed v_div_zero = linear(100 mm/s / 0)
|
||||
const zone z_unit = z(10 mm + 1 s)
|
||||
target home = joint_target { joints: [0 deg, 0 deg, 0 deg, 0 deg, 0 deg, 0 deg] }
|
||||
proc main()
|
||||
movej home speed v_ok zone fine
|
||||
end
|
||||
end
|
||||
19
kdl-wasm/web/tests/fixtures/abb120/spec-programs/static/W2_E20_SemanticDiagnostics.grl
vendored
Normal file
19
kdl-wasm/web/tests/fixtures/abb120/spec-programs/static/W2_E20_SemanticDiagnostics.grl
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
language grl 0.1
|
||||
module W2SemanticDiagnostics
|
||||
const speed v = joint(30 %)
|
||||
const speed v = joint(40 %)
|
||||
const zone zf = fine
|
||||
target home = joint_target { joints: [0 deg, 0 deg, 0 deg, 0 deg, 0 deg, 0 deg] }
|
||||
proc set_done(out bool done)
|
||||
done = true
|
||||
end
|
||||
func bool bad_func()
|
||||
wait io.di[1] == true
|
||||
return true
|
||||
end
|
||||
proc main()
|
||||
call set_done(true)
|
||||
call missing_proc()
|
||||
movej missing_target speed v zone zf
|
||||
end
|
||||
end
|
||||
21
kdl-wasm/web/tests/fixtures/abb120/spec-programs/static/W2_E40_ControlFlowDiagnostics.grl
vendored
Normal file
21
kdl-wasm/web/tests/fixtures/abb120/spec-programs/static/W2_E40_ControlFlowDiagnostics.grl
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
language grl 0.1
|
||||
module W2ControlFlowDiagnostics
|
||||
var int mode = 1
|
||||
proc main()
|
||||
break
|
||||
continue
|
||||
jump inner
|
||||
if mode == 1
|
||||
label inner
|
||||
end
|
||||
switch mode
|
||||
case 1
|
||||
break
|
||||
case 1
|
||||
break
|
||||
case mode + 1
|
||||
break
|
||||
end
|
||||
jump missing
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user