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.
```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).
......
__precompile__()
module LabProcesses
using ControlSystems
......
......@@ -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,
......
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