SIXpack 2 – Manual (V1.10 / January 29
th
, 2010)
25
T0
=500;
// wait 1000 ms before standby
I0
=00%(!);
// waste no energy for unused motors
I1
=50%;
// power stopped motors with 200 mA
I2
=75%;
// power v const. motors with 300 mA
I3
=100%;
// power accelerat. motors with 400 mA
motortype=
Delayedtest0 | NullCenter | Filterswitch | FastRef;
De-bounce mask=$0FFF;
// Filter delay 12-1 cycles = 22 ms
Readymask=$3F;
// check any active motor
Refer.-Readymask=$3F;
// check any referencing motor
propdiv
=8;
// v = position-difference / 8
intdiv
=129;
// v += pos-difference integral / 129
intclip
=129;
// clip pos-difference integrals > 129
intinpclip
=1;
// integrate pos-difference of max. 1
All other values are set to 0, i.e. the functions are disabled.
6.2.2
Examples
Attention: All 9 Bytes must be sent to the interface, otherwise the SIXpack 2 does not recognize the command and
waits for the missing bytes.
$ indicates that the value is in hexadecimal notation!
6.2.2.1
Setting motor parameters
CMD $15 contains information about the motor and settings for the reference drive.
For more details see Hints for Programming and CMD $15 in the Instruction set!
Pseudocode:
SendToPack(address);
// Address of the
Pack
(Sixpack2)
SendToPack($15);
// Command in hexadecimal notation
SendToPack(P0);
// Motor number (0...5)
SendToPack(P1);
//
poslimit
LSB
SendToPack(P2);
SendToPack(P3);
SendToPack(P4);
//
poslimit
MSB
SendToPack(P5);
// further settings, for more information read the instruction set
SendToPack(P6);
P5 = 200
1 1 0 0 1 0 0 0
8
+ 64
+128
200
TestNull
StopNull
FilterSwitch
P6 = 90
0 1 0 1 1 0 1 0
NullPositive
2
+ 8
+16
+64
90
FastRef
DelayTestNull
StopSoft
P0 = 0
0 0 0 0 0 0 0 0
MotorNr.1
(0...5)
P1, P2, P3, P4 = 400
(LSB first!)
1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
LSB
MSB
-> poslimit = 00000190 hex ( = 400 decimal)
NOTE: P5, Bit1=0 -> linear motor -> poslimit=whole intended driving range
Bit 0
Bit 7
( = C8 hex )
( = 5A hex )
3rdSB
2rdSB
( = 1 hex
= 1 dez )
( = 90 hex
= 144 dez)