Hardware manual

40
pxms_md
This field stores the maximal difference between actual and required
position. If the difference will be greater than this value, then error
will be generated: the flag PXMS_ERR will be enabled in pxms_flg and
the flag PXMS_E_MAXPD will be stored in pxms_errno. This value
should be given in IRC units.
pxms_ms
This field stores the maximal speed of the motor. It has to be also
shifted using PXMC_SUBDIV. This value should be given in IRC units.
pxms_ma
This field stores the maximal acceleration of the motor. This value
should be given in IRC units.
pxms_inp_info
This is additional field is used by function showed by pxms_do_inp
pointer to select which IRC, position meter, etc. should be used.
pxms_out_info
This is also a special field which decides where function from
pxms_do_out should send energy stored under pxms_ene.
pxms_ene
Under this variable is stored the value of energy (in fact it is power)
computed by the controller. The output function uses later this value
to combined/multiplied it with an output. As a result pxms_ene
decides how and in which direction to rotate the motor.
pxms_erc
Here is stored the number of errors which occurred during the running
of the library.
pxms_p
Controller proportional constant, mainly used by PID controller which
functionality was incorporated in pxmc_pid_con.h file.
pxms_i
A/a, but with one exception, it is controller integration constant.
pxms_d
A/a, but with one exception, it is controller derivative constant.
pxms_s1
This variable is a special constant for controller.
pxms_s2
A/a.
pxms_me
Under this variable is stored a maximal value of pxms_ene. In Eurobot
project it is depended on CPU_SYS_HZ and PWM_HZ, which are
constants correlated respectively with the frequency of the
microcontroller and the frequency of PWM.
pxms_foi
This pole is used by microcontroller for temporary computation of I.
pxms_fod
A/a but it is for D.
pxms_tmp
Temporary variable for debugging
pxms_ptirc
Value present here describes how long a phase table is.
pxms_ptper
This variable describes how many times we need to send all values
from the phase table(s) to get one mechanical rotation of the rotor. It
is used for motors with more electrical than mechanical rotations.
pxms_ptofs
This is an offset between IRC and the beginning of the phase table(s).
- 
irc is an actual position returned by IRC. (See the picture nr 5.3.3-3).
pxms_ptshift
This variable can be used to make correction when the motor is
rotating very fast. In other words, there can be problems with aligning
the magnetic field lines with 90
o
to the rotor. This is due to the fact
that controller computations take some time and if the motor
rotates very fast, then calculated direction of magnetic filed lines can
be not optimal (different from 90
o
) and out of time.