Loggable Data
The following tables show the data that can be logged by each module. To specify the data to be logged by a module, call the SetLog function passing in an object of a class that inherits LogInput defined in that module.
Log Module |
|
|---|---|
Class Name: |
|
Required Buffer Memory Size: |
|
Loggable Data: |
CycleCounter, Time |
The data that can be logged using just the Log module are CycleCounter and Time. CycleCounter is equal to the cycleCounter member of CoreMotionStatus. Time is the number of microseconds that have elapsed since the engine was started. Either the CycleCounter or the Time can be logged by each log channel, but not both.
If SetLog is never called passing in a LogApiLogInput object, the CycleCounter will be automatically logged.
The required buffer memory size is 640 bytes, assuming maxLogBufferSampleSize is 80.
CoreMotion Module |
|
|---|---|
Class Name: |
|
Required Buffer Memory Size: |
152 * Number of Axes Logging Data * maxLogBufferSampleSize |
Loggable Data: |
All the data listed in CoreMotionAxisLogInput |
The data that can be logged using the CoreMotion module are listed in CoreMotionAxisLogInput, and includes basic motion data such as the servo on state, the command position, and the feedback position. Each type of data that will be logged should be set to 1 in the axisOptions member of the CoreMotionLogInput class, and each type of data that will not be logged should be kept at 0 (as with every other class in the WMX3 library, the constructor sets all values to 0 when an object of the CoreMotionLogInput class is created).
The axes for which to log data are specified using the axisSelection member of the CoreMotionLogInput class. Logging data for more axes will require more buffer memory to be allocated.
The required buffer memory size for one axis is 12160 bytes, assuming maxLogBufferSampleSize is 80. The required buffer memory size for 128 axes is 1556480 bytes. The required buffer memory size is not affected by the number of different data to log for each axis.
IO Module |
|
|---|---|
Class Name: |
|
Required Buffer Memory Size: |
|
Loggable Data: |
I/O bits, Analog I/O in the formats listed in FormatType |
I/O data can be logged using the I/O module, either bit by bit or interpreted as analog signals that span 1 to 8 bytes. Any combination of bit signals and analog signals can be logged at the same time.
The inputIOAddress array in the IoLogInput class is used to log input bit signals. Each array element represents a contiguous segment of bit signals to log. All of the input bits in this contiguous segment are logged. The segment is defined by specifying the starting bit and byte address and the size of the segment (in units of bits). There is no upper limit to the size of the segment as long as the segment remains within the input data space. However, specifying an extremely large size can cause a BufferOverflow error to occur, as the file write speed cannot catch up with the data collection speed. Up to maxIoLogAddressSize such contiguous segments can be defined. The number of segments is specified using the inputSize member of the IoLogInput class (the first inputSize elements of the inputIOAddress array are read).
Similarly, the outputIOAddress array and outputSize member of the IoLogInput class are used to log output bit signals.
In addition to the above, the inputIOLogFormat array in the IoLogInput class can be used to log up to maxIoLogFormatSize analog input signals, each of which spans 1 to 8 bytes in the input data space. The analog input signal is defined by specifying the starting bit and byte address and the type of the analog signal. The type of the analog signal determines the size and formatting of the analog input signal, and can be any member of the FormatType enumerator class. The number of analog input signals is specified using the inputIOFormatCount member of the IoLogInput class (the first inputIOFormatCount elements of the inputIOLogFormat array are read).
Similarly, the outputIOLogFormat array and outputIOFormatCount member of the IoLogInput class are used to log analog output signals.
For platforms that use PDO communication, if the PDO TX data can be mapped to the input data space, it is possible to use the analog input signal log to log any PDO object that matches one of the supported analog format types (see FormatType).
The required buffer memory size is 1280000 bytes, assuming maxIoInSize is 8000, maxIoOutSize is 8000, and maxLogBufferSampleSize is 80. The required buffer memory size is not affected by the amount of I/O data to log.
UserMemory Module |
|
|---|---|
Class Name: |
|
Required Buffer Memory Size: |
(maxUserMemoryLogAddressSize + maxUserMemoryLogFormatSize * 9) * maxLogBufferSampleSize |
Loggable Data: |
User Memory bits, Analog User Memory in the formats listed in FormatType |
User memory data can be logged using the UserMemory module, either bit by bit or interpreted as analog signals that span 1 to 8 bytes. Any combination of bit signals and analog signals can be logged at the same time.
The mAddress array in the UserMemoryLogInput class is used to log user memory bit signals. Each array element represents a contiguous segment of bit signals to log. All of the user memory bits in this contiguous segment are logged. The segment is defined by specifying the starting bit and byte address and the size of the segment (in units of bits). Up to maxUserMemoryLogAddressSize such contiguous segments can be defined. The number of segments is specified using the mAddressSize member of the UserMemoryLogInput class (the first mAddressSize elements of the mAddress array are read).
In addition to defining the maximum number of segments, the maxUserMemoryLogAddressSize constant also defines the maximum number of user memory bytes that can be logged at one time by one channel (excluding logging analog user memory signals). For each segment, the number of different byte addresses that the bits in the segment occupy is calculated.
Example:
byteAddress = 0
bitAddress = 0
size = 8
In this example, the segment occupies addresses 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, and 0.7. Because only byte address 0 is occupied, this segment occupies 1 byte.
Example:
byteAddress = 0
bitAddress = 7
size = 2
In this example, the segment occupies addresses 0.7 and 1.0. Because both byte address 0 and byte address 1 are occupied, this segment occupies 2 bytes.
If multiple segments occupy the same byte address, that byte address is counted multiple times.
After counting the number of bytes occupied by each segment, the total number of bytes is calculated. If this amount is greater than maxUserMemoryLogAddressSize, the SetLog function returns the ArgumentOutOfRange error.
In addition to the above, the mLogFormat array in the UserMemoryLogInput class can be used to log up to maxUserMemoryLogFormatSize analog user memory signals, each of which spans 1 to 8 bytes in the user memory data space. The analog user memory signal is defined by specifying the starting bit and byte address and the type of the analog signal. The type of the analog signal determines the size and formatting of the analog user memory signal, and can be any member of the FormatType enumerator class. The number of analog user memory signals is specified using the mFormatCount member of the UserMemoryLogInput class (the first mFormatCount elements of mLogFormat are read).
The required buffer memory size is 184000 bytes, assuming maxUserMemoryLogAddressSize is 1500, maxUserMemoryLogFormatSize is 100, and maxLogBufferSampleSize is 80. The required buffer memory size is not affected by the amount of user memory data to log.
Platform Module |
|---|
Data specific to each platform can be logged using the Platform module.
For additional information, see each Platform page.