Commit 6313360a authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

precompile

parent ba21fd8d
...@@ -41,9 +41,9 @@ with a sample time of `h` seconds. ...@@ -41,9 +41,9 @@ with a sample time of `h` seconds.
```julia ```julia
for (i,t) = enumerate(0:h:duration) for (i,t) = enumerate(0:h:duration)
@periodically h begin @periodically h begin
y[i] = measure(P) y[i] = measure(P)
r[i] = reference(t) r[i] = reference(t)
u[i] = control(i) u[i] = control(i)
control(P, u[i]) control(P, u[i])
end end
end end
...@@ -57,8 +57,8 @@ Usage is demonstrated below ...@@ -57,8 +57,8 @@ Usage is demonstrated below
```julia ```julia
stateC = init_sysfilter(C) stateC = init_sysfilter(C)
function control(i) function control(i)
e = r[i]-y[i] e = r[i]-y[i]
u = sysfilter!(stateC, C, e) u = sysfilter!(stateC, C, e)
end 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). `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).
......
__precompile__()
module LabProcesses module LabProcesses
using ControlSystems using ControlSystems
......
...@@ -18,7 +18,7 @@ num_inputs(p::BallAndBeamType) = 1 ...@@ -18,7 +18,7 @@ num_inputs(p::BallAndBeamType) = 1
outputrange(p::BallAndBeamType) = [(-10,10),(-1,1)] # Beam angle, Ball position outputrange(p::BallAndBeamType) = [(-10,10),(-1,1)] # Beam angle, Ball position
inputrange(p::BallAndBeamType) = [(-10,10)] inputrange(p::BallAndBeamType) = [(-10,10)]
isstable(p::BallAndBeamType) = false isstable(p::BallAndBeamType) = false
isstable(p::BallAndBeamType) = false isasstable(p::BallAndBeamType) = false
sampletime(p::BallAndBeamType) = p.h sampletime(p::BallAndBeamType) = p.h
control(p::BallAndBeam, u) = ccall((:comedi_write, comedipath),Int32, control(p::BallAndBeam, u) = ccall((:comedi_write, comedipath),Int32,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment