Difference between revisions of "Component: OBD2 ECU (Server) (Misc)"

From Flowcode Help
Jump to navigationJump to search
Line 61: Line 61:
  
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
 +
 +
  
  
Line 67: Line 69:
 
==Macro reference==
 
==Macro reference==
  
 +
===Set_VIN===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 85: Line 88:
  
  
 +
===Set_Engine_Speed===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 103: Line 107:
  
  
 +
===Set_Engine_Coolant_Temperature===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 121: Line 126:
  
  
 +
===Process===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 139: Line 145:
  
  
 +
===DTC_Clear===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 152: Line 159:
  
  
 +
===DTC_Get===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 170: Line 178:
  
  
 +
===DTC_Count===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 183: Line 192:
  
  
 +
===Set_ECU_Name===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 201: Line 211:
  
  
 +
===GetNumberBytes===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 214: Line 225:
  
  
 +
===Set_Vehicle_Speed===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 232: Line 244:
  
  
 +
===Set_MAF_Rate===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 250: Line 263:
  
  
 +
===Set_Engine_Load===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 268: Line 282:
  
  
 +
===DTC_Add===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 291: Line 306:
  
  
 +
===GetByte===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 304: Line 320:
  
  
 +
===Set_Throttle_Position===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 322: Line 339:
  
  
 +
===FlushBuffer===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 335: Line 353:
  
  
 +
===Initialise===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-

Revision as of 11:51, 3 February 2023

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

Fc9-comp-macro.png Set_VIN
Set the 17 character VIN 
Fc9-string-icon.png - STRING VIN
 
Fc9-void-icon.png - VOID Return


Set_Engine_Speed

Fc9-comp-macro.png Set_Engine_Speed
0 to 16,383.75 (rpm) 
Fc9-f32-icon.png - FLOAT Value
Speed in RPM 
Fc9-void-icon.png - VOID Return


Set_Engine_Coolant_Temperature

Fc9-comp-macro.png Set_Engine_Coolant_Temperature
-40 to 215 (deg C) 
Fc9-f32-icon.png - FLOAT Value
Value range -40 to 215 deg C 
Fc9-void-icon.png - VOID Return


Process

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


DTC_Clear

Fc9-comp-macro.png DTC_Clear
Clears the DTC store 
Fc9-void-icon.png - VOID Return


DTC_Get

Fc9-comp-macro.png DTC_Get
Get the DTC from the store at Index 
Fc9-u16-icon.png - UINT Index
 
Fc9-string-icon.png - STRING Return


DTC_Count

Fc9-comp-macro.png DTC_Count
Returns the number of stored DTCs 
Fc9-u16-icon.png - UINT Return


Set_ECU_Name

Fc9-comp-macro.png Set_ECU_Name
Set the ECU Name 
Fc9-string-icon.png - STRING Name
 
Fc9-void-icon.png - VOID Return


GetNumberBytes

Fc9-comp-macro.png GetNumberBytes
Returns the number of valid data bytes currently inside the buffer. 
Fc9-u16-icon.png - UINT Return


Set_Vehicle_Speed

Fc9-comp-macro.png Set_Vehicle_Speed
0 - 255 (km/h) 
Fc9-f32-icon.png - FLOAT Value
Speed in RPM 
Fc9-void-icon.png - VOID Return


Set_MAF_Rate

Fc9-comp-macro.png Set_MAF_Rate
0 to 655.35 grams/sec 
Fc9-f32-icon.png - FLOAT Value
MAF air flow rate in grams/sec 
Fc9-void-icon.png - VOID Return


Set_Engine_Load

Fc9-comp-macro.png Set_Engine_Load
0 to 100 (%) 
Fc9-f32-icon.png - FLOAT Value
Speed in RPM 
Fc9-void-icon.png - VOID Return


DTC_Add

Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING DTC_String
 
Fc9-bool-icon.png - BOOL CheckExists
Checks to see if error code already exists 
Fc9-u8-icon.png - BYTE Return


GetByte

Fc9-comp-macro.png GetByte
Reads the next available byte from the circular buffer, Returns 255 if the buffer is empty. 
Fc9-u16-icon.png - UINT Return


Set_Throttle_Position

Fc9-comp-macro.png Set_Throttle_Position
0 - 100 (%) 
Fc9-f32-icon.png - FLOAT Value
Position value as a percentage (0 - 100%) 
Fc9-void-icon.png - VOID Return


FlushBuffer

Fc9-comp-macro.png FlushBuffer
Clears the contents of the buffer and re-initialises the index locations. 
Fc9-void-icon.png - VOID Return


Initialise

Fc9-comp-macro.png Initialise
Initialise the CAN network 
Fc9-u8-icon.png - BYTE Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-21-icon.png DTC Store Size
Maximum number of DTC codes to store 
Fc9-type-10-icon.png VIN
17 character Vehicle Identification Number 
Fc9-conn-icon.png CAN
Fc9-type-16-icon.png Channel
Switches between Internal CAN peripheral and External CAN controller IC MCP2515. 
Fc9-type-16-icon.png Controller Osc
 
Fc9-type-16-icon.png Bus Rate
Data rate of the bus specified in thousand bits per second, Kbps. 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png SPI
Fc9-type-16-icon.png CHANNEL
SPI Channel selector 
Fc9-type-5-icon.png MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
Fc9-type-5-icon.png MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
Fc9-type-5-icon.png CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
Fc9-type-5-icon.png 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.  
Fc9-type-16-icon.png Prescale
Prescale option selector 
Fc9-type-16-icon.png Sample Point
Data bit read sample point 
Fc9-type-16-icon.png Config Delay