Add ABB120 demo suite and docs

This commit is contained in:
wangdequan
2026-06-28 20:58:18 +08:00
parent 84a5b54195
commit 65187499d6
820 changed files with 215410 additions and 211 deletions

View 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

View 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

View 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