Component: OBD2 ECU (Server) (Misc): Difference between revisions
Appearance
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 76: | Line 76: | ||
===DTC_Add=== | ===DTC_Add=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DTC_Add''' | ||
|- | |- | ||
| colspan="2" | Adds a DTC to the store (e.g. "B1318") Checks to see if the DTC string is already in the store before adding. | | colspan="2" | Adds a DTC to the store (e.g. "B1318") Checks to see if the DTC string is already in the store before adding. | ||
| Line 100: | Line 100: | ||
===DTC_Clear=== | ===DTC_Clear=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DTC_Clear''' | ||
|- | |- | ||
| colspan="2" | Clears the DTC store | | colspan="2" | Clears the DTC store | ||
| Line 114: | Line 114: | ||
===DTC_Count=== | ===DTC_Count=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DTC_Count''' | ||
|- | |- | ||
| colspan="2" | Returns the number of stored DTCs | | colspan="2" | Returns the number of stored DTCs | ||
| Line 128: | Line 128: | ||
===DTC_Get=== | ===DTC_Get=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DTC_Get''' | ||
|- | |- | ||
| colspan="2" | Get the DTC from the store at Index | | colspan="2" | Get the DTC from the store at Index | ||
| Line 147: | Line 147: | ||
===FlushBuffer=== | ===FlushBuffer=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''FlushBuffer''' | ||
|- | |- | ||
| colspan="2" | Clears the contents of the buffer and re-initialises the index locations. | | colspan="2" | Clears the contents of the buffer and re-initialises the index locations. | ||
| Line 161: | Line 161: | ||
===GetByte=== | ===GetByte=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetByte''' | ||
|- | |- | ||
| colspan="2" | Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. | | colspan="2" | Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. | ||
| Line 175: | Line 175: | ||
===GetNumberBytes=== | ===GetNumberBytes=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetNumberBytes''' | ||
|- | |- | ||
| colspan="2" | Returns the number of valid data bytes currently inside the buffer. | | colspan="2" | Returns the number of valid data bytes currently inside the buffer. | ||
| Line 189: | Line 189: | ||
===Initialise=== | ===Initialise=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Initialise the CAN network | | colspan="2" | Initialise the CAN network | ||
| Line 203: | Line 203: | ||
===Process=== | ===Process=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Process''' | ||
|- | |- | ||
| colspan="2" | Does the message processing. Call this often. | | colspan="2" | Does the message processing. Call this often. | ||
| Line 222: | Line 222: | ||
===Set_ECU_Name=== | ===Set_ECU_Name=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Set_ECU_Name''' | ||
|- | |- | ||
| colspan="2" | Set the ECU Name | | colspan="2" | Set the ECU Name | ||
| Line 241: | Line 241: | ||
===Set_Engine_Coolant_Temperature=== | ===Set_Engine_Coolant_Temperature=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Set_Engine_Coolant_Temperature''' | ||
|- | |- | ||
| colspan="2" | -40 to 215 (deg C) | | colspan="2" | -40 to 215 (deg C) | ||
| Line 260: | Line 260: | ||
===Set_Engine_Load=== | ===Set_Engine_Load=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Set_Engine_Load''' | ||
|- | |- | ||
| colspan="2" | 0 to 100 (%) | | colspan="2" | 0 to 100 (%) | ||
| Line 279: | Line 279: | ||
===Set_Engine_Speed=== | ===Set_Engine_Speed=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Set_Engine_Speed''' | ||
|- | |- | ||
| colspan="2" | 0 to 16,383.75 (rpm) | | colspan="2" | 0 to 16,383.75 (rpm) | ||
| Line 298: | Line 298: | ||
===Set_MAF_Rate=== | ===Set_MAF_Rate=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Set_MAF_Rate''' | ||
|- | |- | ||
| colspan="2" | 0 to 655.35 grams/sec | | colspan="2" | 0 to 655.35 grams/sec | ||
| Line 317: | Line 317: | ||
===Set_Throttle_Position=== | ===Set_Throttle_Position=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Set_Throttle_Position''' | ||
|- | |- | ||
| colspan="2" | 0 - 100 (%) | | colspan="2" | 0 - 100 (%) | ||
| Line 336: | Line 336: | ||
===Set_VIN=== | ===Set_VIN=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Set_VIN''' | ||
|- | |- | ||
| colspan="2" | Set the 17 character VIN | | colspan="2" | Set the 17 character VIN | ||
| Line 355: | Line 355: | ||
===Set_Vehicle_Speed=== | ===Set_Vehicle_Speed=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Set_Vehicle_Speed''' | ||
|- | |- | ||
| colspan="2" | 0 - 255 (km/h) | | colspan="2" | 0 - 255 (km/h) | ||
| Line 375: | Line 375: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| Line 391: | Line 391: | ||
| colspan="2" | 17 character Vehicle Identification Number | | colspan="2" | 17 character Vehicle Identification Number | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | CAN | ||
|- | |- | ||
|- | |- | ||
| Line 410: | Line 410: | ||
| colspan="2" | Data rate of the bus specified in thousand bits per second, Kbps. | | colspan="2" | Data rate of the bus specified in thousand bits per second, Kbps. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | SPI | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | |
| Version | 1.0 |
| Category | Misc |
OBD2 ECU (Server) component
Implements an ECU side OBD-II server
Component Source Code
Please click here to download the component source project: FC_Comp_Source_OBD2_ECU.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_OBD2_ECU.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
DTC_Add
DTC_Clear
| DTC_Clear | |
| Clears the DTC store | |
| Return | |
DTC_Count
| DTC_Count | |
| Returns the number of stored DTCs | |
| Return | |
DTC_Get
| DTC_Get | |
| Get the DTC from the store at Index | |
| Index | |
| Return | |
FlushBuffer
| FlushBuffer | |
| Clears the contents of the buffer and re-initialises the index locations. | |
| Return | |
GetByte
| GetByte | |
| Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. | |
| Return | |
GetNumberBytes
| GetNumberBytes | |
| Returns the number of valid data bytes currently inside the buffer. | |
| Return | |
Initialise
| Initialise | |
| Initialise the CAN network | |
| Return | |
Process
| Process | |
| Does the message processing. Call this often. | |
| TimeElapsed | |
| Time elapsed since last call, in mS. Can be zero for frequent calling. | |
| Return | |
Set_ECU_Name
| Set_ECU_Name | |
| Set the ECU Name | |
| Name | |
| Return | |
Set_Engine_Coolant_Temperature
| Set_Engine_Coolant_Temperature | |
| -40 to 215 (deg C) | |
| Value | |
| Value range -40 to 215 deg C | |
| Return | |
Set_Engine_Load
| Set_Engine_Load | |
| 0 to 100 (%) | |
| Value | |
| Speed in RPM | |
| Return | |
Set_Engine_Speed
| Set_Engine_Speed | |
| 0 to 16,383.75 (rpm) | |
| Value | |
| Speed in RPM | |
| Return | |
Set_MAF_Rate
| Set_MAF_Rate | |
| 0 to 655.35 grams/sec | |
| Value | |
| MAF air flow rate in grams/sec | |
| Return | |
Set_Throttle_Position
| Set_Throttle_Position | |
| 0 - 100 (%) | |
| Value | |
| Position value as a percentage (0 - 100%) | |
| Return | |
Set_VIN
| Set_VIN | |
| Set the 17 character VIN | |
| VIN | |
| Return | |
Set_Vehicle_Speed
| Set_Vehicle_Speed | |
| 0 - 255 (km/h) | |
| Value | |
| Speed in RPM | |
| Return | |