Motor tuning using system diagnosis tools
Some examples of monitor settings
Forced trigger
In this mode we want to see data with low latency between samples, but it is not relevant the time when the data is taken.
As example 3 currents will be mapped and 2048 samples will be taken at a frequency of 40 Ksamples/sec:
- Add the current registers to mapping, write 0x0038, 0x0039 and 0x0040 to register Monitor add reg (0x00E0)
- Set the period and the number of samples, write 40.000 value to Monitor period (0x00C1), write 0 to Monitor trigger delay samples (0x00C2), and 2048 to Monitor window samples (0x00C3).
- Configure the triggers, forced event as SoC and number of samples as EoC, write 1 to Monitor SoC type (0x00F0) and write 4 to Monitor EoC (0x00F1)
- Enable the monitor and force trigger, write 1 value to Monitor enable (0x00C0) and to Monitor force trigger (0x00F2)
- Read the Monitor number cycles (0x00B1), and wait until it takes the 2048 value
- Read monitor data reading the register Monitor data (0x00B2), extended data
Rising Edge
This case focus in the timestamp when the data is taken. In this example the register Current A demand is gonna trigger the rising edge event.
- Set the mapping, write 0x0038 and 0x0074 to register Monitor add reg (0x00E0)
- Set the period and the number of samples, write 10.000 value to Monitor period (0x00C1), write 4096 to Monitor trigger delay samples (0x00C2), and 4096 to Monitor window samples (0x00C3).
- Configure the triggers, rising event as SoC and number of samples as EoC, write 2 to Monitor SoC type (0x00F0) and write 4 to Monitor EoC (0x00F1)
- To set the rising edge condition event, set the Monitor rising edge condition (0x001E), to a value, for example 50.0, and configure the register Monitor rising edge index, to 1.
- Enable the monitor, write 1 value to Monitor enable (0x00C0)
- Read the Monitor number cycles (0x00B1), and wait until it takes the 8192 value
- Read monitor data reading the register Monitor data (0x00B2), extended data