Professional Documents
Culture Documents
Ssds
Ssds
Ssds
Objectives
Outline
4 Example
CAN SCICOS CAN200 Example
CAN
CAN
Interface
CAN SCICOS CAN200 Example
CANopen
CANopen
Device model
Device model
Communication objects
Communication objects
CAN SCICOS CAN200 Example
Protocol
Protocol
Protocol
SDO
Master (PC) CAN dev 1 CAN dev 2
CMD
ACK
REQ
DATA
CMD
ACK
REQ
DATA
CAN SCICOS CAN200 Example
Protocol
Protocol
PDO
Protocol
PDO
Master (PC) CAN dev 1 CAN dev 2
SYNC
PDO’s
SYNC
PDO’s
SYNC
PDO’s
SYNC
PDO’s
CAN SCICOS CAN200 Example
Protocol
Others
Integration in Scicos
Integration in Scicos
CANopen
device
CAN SCICOS CAN200 Example
Integration in Scicos
Integration in Scicos
CAN
Initialization
CANopen
device
CAN SCICOS CAN200 Example
Integration in Scicos
Integration in Scicos
CAN
Initialization
CANopen
device
Receive
Thread
CAN SCICOS CAN200 Example
canopen.c
canopen.c
PDO handling
.....
.....
PDO handling
.....
.....
Reading PDO’s
The palette
Additional palettes
Epos
Switch
motor I
0
0x08
1
Pport_out Pport_in
2 15
0x378 0x378
CAN SCICOS CAN200 Example
The interface
1 Epos
canopen
sync
The interface
1 Epos
canopen
sync
The implementation
The card
The card
Details
Hardware
VCC
470 LED1
X4-1
R6
C3 C6
+
100n 47uF
470
X4-2
R4
GND
VCC
GND
23 22
AD0 VDD1
1 IC1A
3 24 8
AD1 VSS1
2
74HC132 25
AD2
12
VDD3
26
AD3
4 IC1B 15
VSS3
6 27
3
AD4
5 13 8 5
TX0 RS
VCC
74HC132 28 1 7 4 9
AD5 TXD CANH
14 4 6 3 8
TX1 RXD CANL
GND
1 5 2 7
AD6 VREFOUT
19 1 6
X2 RX0
2
AD7
2
14 1 20 X1
RX1 R1
15 2
16 3 3 21
ALE/AS VSS2 47k R5
17 4
18 5 4 18
CS VDD2 120
270
R3
19 6
10
20 7 5
2
1
9
RD/E
JP1
VCC
21 8 17
RESET
22 9 6
WR
23 10
74HC132
33p
IC1C
C1
24 11 220p 7
CLK_OUT
8
25 12
10k
C4
R2
13 11 9
2
74HC132 MODE XTAL1
13
8MHz
33p
C2
11 16 10
Q1
INT XTAL2
1
12
IC1D
GND
GND
Software
The Driver
RTDM driver
Modified peaks dongle driver
Few lines changed
CAN SCICOS CAN200 Example
Example
Example
Example
Example
Features
Motor Output
Hall sensor+Incremental encoder
2 Analog inputs −10V ÷ +10V
1 Analog output 0V ÷ 10V
10 Digital inputs
5 Digital outputs
CAN SCICOS CAN200 Example
Example
Motor equations
Differential equation
In Laplace
Kt
Jm
Φ(s) = · I (s)
s 2 + DJmm ·s
CAN SCICOS CAN200 Example
Example
Motor equations
Kt
Jm
Φ(s) = · I (s)
s 2 + DJmm ·s
can be rewritten as
K
Φ(s) = · I (s)
s2 +α·s
where
Kt Dm
K= ,α =
Jm Jm
CAN SCICOS CAN200 Example
Example
Motor equations
K I0
Φ(s) = ·
s2 +α·s s
that in time domain becomes
K · I0 K · I0 K · I0 α·t
ϕ(t) = − 2
+ ·t + ·e
α α α2
CAN SCICOS CAN200 Example
Example
Example
Controller
ScicosLab