Import LinuxCNC source tree
This commit is contained in:
2
tests/counter-encoder.0/README
Normal file
2
tests/counter-encoder.0/README
Normal file
@@ -0,0 +1,2 @@
|
||||
Tests that the encoder and counter modules give the expected results
|
||||
on a simple increasing quadrature input
|
||||
3500
tests/counter-encoder.0/expected
Normal file
3500
tests/counter-encoder.0/expected
Normal file
File diff suppressed because it is too large
Load Diff
29
tests/counter-encoder.0/test.hal
Normal file
29
tests/counter-encoder.0/test.hal
Normal file
@@ -0,0 +1,29 @@
|
||||
setexact_for_test_suite_only
|
||||
|
||||
loadrt sampler cfg=sss depth=3500
|
||||
loadrt stepgen step_type=2
|
||||
loadrt encoder num_chan=3
|
||||
loadrt threads name1=fast period1=100000
|
||||
|
||||
net A stepgen.0.phase-A => encoder.0.phase-A encoder.1.phase-A encoder.2.phase-A
|
||||
net B stepgen.0.phase-B => encoder.0.phase-B encoder.1.phase-B
|
||||
net C0 encoder.0.counts => sampler.0.pin.0
|
||||
net C1 encoder.1.counts => sampler.0.pin.1
|
||||
net C2 encoder.2.counts => sampler.0.pin.2
|
||||
|
||||
addf stepgen.update-freq fast
|
||||
addf stepgen.make-pulses fast
|
||||
addf encoder.update-counters fast
|
||||
addf encoder.capture-position fast
|
||||
addf sampler.0 fast
|
||||
|
||||
setp stepgen.0.maxvel .15
|
||||
setp stepgen.0.maxaccel 2
|
||||
setp stepgen.0.position-cmd .04
|
||||
setp stepgen.0.enable 1
|
||||
setp stepgen.0.position-scale 32000
|
||||
setp encoder.1.x4-mode 0
|
||||
setp encoder.2.counter-mode 1
|
||||
|
||||
start
|
||||
loadusr -w halsampler -n 3500
|
||||
Reference in New Issue
Block a user