diff --git a/README.md b/README.md index 938d746b39c53896014481fe1ffb0d50b057e889..63132084a561d490194a5daa775c9d51a35a2ca3 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,9 @@ with a sample time of `h` seconds. ```julia for (i,t) = enumerate(0:h:duration) @periodically h begin - y[i] = measure(P) - r[i] = reference(t) - u[i] = control(i) + y[i] = measure(P) + r[i] = reference(t) + u[i] = control(i) control(P, u[i]) end end @@ -57,8 +57,8 @@ Usage is demonstrated below ```julia stateC = init_sysfilter(C) function control(i) - e = r[i]-y[i] - u = sysfilter!(stateC, C, e) + e = r[i]-y[i] + u = sysfilter!(stateC, C, e) end ``` `C` must here be represented by a [`StateSpace`](http://juliacontrol.github.io/ControlSystems.jl/latest/lib/constructors/#ControlSystems.ss) type from [`ControlSystems.jl`](https://github.com/JuliaControl/ControlSystems.jl). diff --git a/src/LabProcesses.jl b/src/LabProcesses.jl index df0f70dacd65925d9821dd1abf3db85c302b5eb3..e7cc583025c3fc871b1f54e90860fa1242b7ff4a 100644 --- a/src/LabProcesses.jl +++ b/src/LabProcesses.jl @@ -1,3 +1,5 @@ +__precompile__() + module LabProcesses using ControlSystems diff --git a/src/interface_implementations/ballandbeam.jl b/src/interface_implementations/ballandbeam.jl index 3bbe8f6dadaf48975fb674845f0931ce09d2cf7d..e06bda518d12b580ca890f97fd658b725d78a3ec 100644 --- a/src/interface_implementations/ballandbeam.jl +++ b/src/interface_implementations/ballandbeam.jl @@ -18,7 +18,7 @@ num_inputs(p::BallAndBeamType) = 1 outputrange(p::BallAndBeamType) = [(-10,10),(-1,1)] # Beam angle, Ball position inputrange(p::BallAndBeamType) = [(-10,10)] isstable(p::BallAndBeamType) = false -isstable(p::BallAndBeamType) = false +isasstable(p::BallAndBeamType) = false sampletime(p::BallAndBeamType) = p.h control(p::BallAndBeam, u) = ccall((:comedi_write, comedipath),Int32,