Jump to content

Component: OBD2 ECU (Server) (Misc)

From Flowcode Help
Revision as of 15:23, 20 January 2023 by Wiki bot (talk | contribs)
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

Set_VIN
Set the 17 character VIN 
- STRING VIN
 
- VOID Return


Set_Engine_Speed
0 to 16,383.75 (rpm) 
- FLOAT Value
Speed in RPM 
- VOID Return


Set_Engine_Coolant_Temperature
-40 to 215 (deg C) 
- FLOAT Value
Value range -40 to 215 deg C 
- VOID Return


Process
Does the message processing. Call this often. 
- UINT TimeElapsed
Time elapsed since last call, in mS. Can be zero for frequent calling. 
- BYTE Return


DTC_Clear
Clears the DTC store 
- VOID Return


DTC_Get
Get the DTC from the store at Index 
- UINT Index
 
- STRING Return


DTC_Count
Returns the number of stored DTCs 
- UINT Return


Set_ECU_Name
Set the ECU Name 
- STRING Name
 
- VOID Return


GetNumberBytes
Returns the number of valid data bytes currently inside the buffer. 
- UINT Return


Set_Vehicle_Speed
0 - 255 (km/h) 
- FLOAT Value
Speed in RPM 
- VOID Return


Set_MAF_Rate
0 to 655.35 grams/sec 
- FLOAT Value
MAF air flow rate in grams/sec 
- VOID Return


Set_Engine_Load
0 to 100 (%) 
- FLOAT Value
Speed in RPM 
- VOID Return


DTC_Add
Adds a DTC to the store (e.g. "B1318") Checks to see if the DTC string is already in the store before adding. 
- STRING DTC_String
 
- BOOL CheckExists
Checks to see if error code already exists 
- BYTE Return


GetByte
Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. 
- UINT Return


Set_Throttle_Position
0 - 100 (%) 
- FLOAT Value
Position value as a percentage (0 - 100%) 
- VOID Return


FlushBuffer
Clears the contents of the buffer and re-initialises the index locations. 
- VOID Return


Initialise
Initialise the CAN network 
- BYTE Return



Property reference

Properties
DTC Store Size
Maximum number of DTC codes to store 
VIN
17 character Vehicle Identification Number 
CAN
Channel
Switches between Internal CAN peripheral and External CAN controller IC MCP2515. 
Controller Osc
 
Bus Rate
Data rate of the bus specified in thousand bits per second, Kbps. 
Connections
SPI
CHANNEL
SPI Channel selector 
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Prescale
Prescale option selector 
Sample Point
Data bit read sample point 
Config Delay
 

==Macro reference==

Set_VIN
Set the 17 character VIN 
- STRING VIN
 
- VOID Return


Set_Engine_Speed
0 to 16,383.75 (rpm) 
- FLOAT Value
Speed in RPM 
- VOID Return


Set_Engine_Coolant_Temperature
-40 to 215 (deg C) 
- FLOAT Value
Value range -40 to 215 deg C 
- VOID Return


Process
Does the message processing. Call this often. 
- UINT TimeElapsed
Time elapsed since last call, in mS. Can be zero for frequent calling. 
- BYTE Return


DTC_Clear
Clears the DTC store 
- VOID Return


DTC_Get
Get the DTC from the store at Index 
- UINT Index
 
- STRING Return


DTC_Count
Returns the number of stored DTCs 
- UINT Return


Set_ECU_Name
Set the ECU Name 
- STRING Name
 
- VOID Return


GetNumberBytes
Returns the number of valid data bytes currently inside the buffer. 
- UINT Return


Set_Vehicle_Speed
0 - 255 (km/h) 
- FLOAT Value
Speed in RPM 
- VOID Return


Set_MAF_Rate
0 to 655.35 grams/sec 
- FLOAT Value
MAF air flow rate in grams/sec 
- VOID Return


Set_Engine_Load
0 to 100 (%) 
- FLOAT Value
Speed in RPM 
- VOID Return


DTC_Add
Adds a DTC to the store (e.g. "B1318") Checks to see if the DTC string is already in the store before adding. 
- STRING DTC_String
 
- BOOL CheckExists
Checks to see if error code already exists 
- BYTE Return


GetByte
Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. 
- UINT Return


Set_Throttle_Position
0 - 100 (%) 
- FLOAT Value
Position value as a percentage (0 - 100%) 
- VOID Return


FlushBuffer
Clears the contents of the buffer and re-initialises the index locations. 
- VOID Return


Initialise
Initialise the CAN network 
- BYTE Return



Property reference

Properties
DTC Store Size
Maximum number of DTC codes to store 
VIN
17 character Vehicle Identification Number 
CAN
Channel
Switches between Internal CAN peripheral and External CAN controller IC MCP2515. 
Controller Osc
 
Bus Rate
Data rate of the bus specified in thousand bits per second, Kbps. 
Connections
SPI
CHANNEL
SPI Channel selector 
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Prescale
Prescale option selector 
Sample Point
Data bit read sample point 
Config Delay
 

==Macro reference==

Set_VIN
Set the 17 character VIN 
- STRING VIN
 
- VOID Return


Set_Engine_Speed
0 to 16,383.75 (rpm) 
- FLOAT Value
Speed in RPM 
- VOID Return


Set_Engine_Coolant_Temperature
-40 to 215 (deg C) 
- FLOAT Value
Value range -40 to 215 deg C 
- VOID Return


Process
Does the message processing. Call this often. 
- UINT TimeElapsed
Time elapsed since last call, in mS. Can be zero for frequent calling. 
- BYTE Return


DTC_Clear
Clears the DTC store 
- VOID Return


DTC_Get
Get the DTC from the store at Index 
- UINT Index
 
- STRING Return


DTC_Count
Returns the number of stored DTCs 
- UINT Return


Set_ECU_Name
Set the ECU Name 
- STRING Name
 
- VOID Return


GetNumberBytes
Returns the number of valid data bytes currently inside the buffer. 
- UINT Return


Set_Vehicle_Speed
0 - 255 (km/h) 
- FLOAT Value
Speed in RPM 
- VOID Return


Set_MAF_Rate
0 to 655.35 grams/sec 
- FLOAT Value
MAF air flow rate in grams/sec 
- VOID Return


Set_Engine_Load
0 to 100 (%) 
- FLOAT Value
Speed in RPM 
- VOID Return


DTC_Add
Adds a DTC to the store (e.g. "B1318") Checks to see if the DTC string is already in the store before adding. 
- STRING DTC_String
 
- BOOL CheckExists
Checks to see if error code already exists 
- BYTE Return


GetByte
Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. 
- UINT Return


Set_Throttle_Position
0 - 100 (%) 
- FLOAT Value
Position value as a percentage (0 - 100%) 
- VOID Return


FlushBuffer
Clears the contents of the buffer and re-initialises the index locations. 
- VOID Return


Initialise
Initialise the CAN network 
- BYTE Return



Property reference

Properties
DTC Store Size
Maximum number of DTC codes to store 
VIN
17 character Vehicle Identification Number 
CAN
Channel
Switches between Internal CAN peripheral and External CAN controller IC MCP2515. 
Controller Osc
 
Bus Rate
Data rate of the bus specified in thousand bits per second, Kbps. 
Connections
SPI
CHANNEL
SPI Channel selector 
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Prescale
Prescale option selector 
Sample Point
Data bit read sample point 
Config Delay