Sequences and Status Transitions
This chapter describes the execution sequences for this product and how the MicroPeckerX status transitions.
Sequences and Status Transitions
The overall sequences for this product are shown below. Solid boxes indicate required processing, while dashed boxes indicate optional processing. A ☆ symbol means the API must be called once for each MicroPeckerX unit in use, and a ★ symbol means the API must be called once for each total channel across all units.
Monitoring Sequence
Sequence Table
| # | API | Processing | Description |
|---|---|---|---|
| 1 | MPXOpen | Detect MicroPeckerX units | Connect all MicroPeckerX units you want to use to the PC, then call this API once. |
| 2 | MPXSetCANParam | Configure communication parameters | Call this API for each channel you plan to use (communication parameters can be configured independently per channel). |
| 3 | MPXSetGetLogMode | Configure the log acquisition mode | Call this API for each channel you plan to use (the log acquisition mode can be configured independently per channel). Channels for which this API is not called operate in callback mode. |
| 4 | MPXSetLogCallBack | Configure the callback function for log acquisition | Call this API for each channel that was set to callback mode in step 3 (different callback functions can be configured per channel). This API is not required for channels configured for API mode. |
| 5 | MPXMonitorStart | Start monitoring | Call this API for each MicroPeckerX unit you plan to use. When running multiple units in sync, start monitoring on all units operating in slave mode first, then start the units operating in master mode. |
| 6 | MPXGetLog or MPXGetLogEx | Retrieve log data | If API mode is configured, call this API regularly for each channel to retrieve log data (if log retrieval is delayed, a buffer overrun occurs). This API is not required when operating in callback mode. |
| 7 | MPXMonitorStop | Stop monitoring | When you need to stop monitoring, call this API for each MicroPeckerX unit in use. When operating multiple units, stop the unit running in master mode first, then stop the units running in slave mode in order. |
| 8 | MPXClose | Release detected MicroPeckerX units | Call this API once to release all detected units. If you want to start monitoring again while keeping the units detected, repeat the procedure starting from step 2. |
Simulation Sequence
Sequence Table
| # | API | Processing | Description |
|---|---|---|---|
| 1 | MPXOpen | Detect MicroPeckerX units | Connect all MicroPeckerX units you want to use to the PC, then call this API. |
| 2 | MPXSetCANParam | Configure communication parameters | Call this API for each channel you plan to use (communication parameters can be configured independently per channel). |
| 3 | MPXSetGetLogMode | Configure the log acquisition mode | Call this API for each channel you plan to use (the log acquisition mode can be configured independently per channel). Channels for which this API is not called operate in callback mode. |
| 4 | MPXSetLogCallBack | Configure the callback function for log acquisition | Call this API for each channel that was set to callback mode in step 3 (different callback functions can be configured per channel). This API is not required for channels configured for API mode. |
| 5 | MPXSetSlot | Configure slot information before monitoring | Configure slot information as needed. |
| 6 | MPXMonitorStart | Start monitoring | Call this API for each MicroPeckerX unit you plan to use. When running multiple units in sync, start monitoring on all units operating in slave mode first, then start the units operating in master mode. |
| 7 | MPXGetLog or MPXGetLogEx | Retrieve log data | When operating in callback mode, MPXGetLog and MPXGetLogEx do not need to be called.When operating in API mode, call MPXGetLog or MPXGetLogEx periodically to retrieve log data if needed.Note that even if a buffer overrun occurs because log data was not retrieved, it does not affect operation. |
| 8 | MPXChangeSlot or MPXSendSlot or MPXDirectSend | Configure slot information during monitoring / request slot transmission / send a frame | Change slot information or transmit data as needed. |
| 9 | MPXMonitorStop | Stop monitoring | When you need to stop monitoring, call this API for each MicroPeckerX unit in use. When operating multiple units, stop the unit running in master mode first, then stop the units running in slave mode in order. |
| 10 | MPXClose | Release detected MicroPeckerX units | Call this API once to release all detected units. If you want to start monitoring again while keeping the units detected, repeat the procedure starting from step 2. |
Log Replay Sequence
Sequence Table
| # | API | Processing | Description |
|---|---|---|---|
| 1 | MPXOpen | Detect MicroPeckerX units | Connect all MicroPeckerX units you want to use to the PC, then call this API. |
| 2 | MPXSetCANParam | Configure communication parameters | Call this API for each channel you plan to use (communication parameters can be configured independently per channel). |
| 3 | MPXSetGetLogMode | Configure the log acquisition mode | Call this API for each channel you plan to use (the log acquisition mode can be configured independently per channel). Channels for which this API is not called operate in callback mode. |
| 4 | MPXSetLogCallBack | Configure the callback function for log acquisition | Call this API for each channel that was set to callback mode in step 3 (different callback functions can be configured per channel). This API is not required for channels configured for API mode. |
| 5 | MPXSetLogRequestCallBack | Configure the callback function for log replay data requests | Sets the callback function used when the MicroPeckerX unit requests log replay data while running in log replay mode or burst transfer mode (log replay). |
| 6 | MPXSetLogReplayData | Send log replay data | MicroPeckerX has two 16,384-byte buffers for log replay data. Call MPXSetLogReplayData twice in advance to transfer up to 32,768 bytes of data.If the data size is less than 16,384 bytes, a single call is sufficient. |
| 7 | MPXSetLogReplayTrigger | Configure log replay trigger conditions | Configure the conditions for starting log replay transmission as needed. |
| 8 | MPXLogReplayStart | Start transmission for log replay or burst transfer mode | If you want log replay transmission to start immediately after monitoring begins, call MPXLogReplayStart before starting monitoring. |
| 9 | MPXMonitorStart | Start monitoring | Call this API for each MicroPeckerX unit you plan to use. When running multiple units in sync, start monitoring on all units operating in slave mode first, then start the units operating in master mode. |
| 10 | MPXGetLog or MPXGetLogEx | Retrieve log data | When operating in callback mode, MPXGetLog and MPXGetLogEx do not need to be called.When operating in API mode, call MPXGetLog or MPXGetLogEx periodically to retrieve log data if needed.Even if a buffer overrun occurs because log data was not retrieved, operation is not affected. |
| 11 | MPXLogReplayStart or MPXLogReplayStop | Start or stop transmission in log replay or burst transfer mode | Call MPXLogReplayStart to begin sending log replay data during monitoring, or MPXLogReplayStop to stop transmission. |
| 12 | MPXSetLogReplayData | Send log replay data | When the MicroPeckerX unit requests log replay data, transfer the data as soon as possible based on the information provided by the callback function. If transferring log replay data is delayed, subsequent communication may time out. |
| 13 | MPXMonitorStop | Stop monitoring | When you need to stop monitoring, call this API for each MicroPeckerX unit in use. When operating multiple units, stop the unit running in master mode first, then stop the units running in slave mode in order. |
| 14 | MPXClose | Release detected MicroPeckerX units | Call this API once to release all detected units. If you want to start monitoring again while keeping the units detected, repeat the procedure starting from step 2. |