Difference between revisions of "Component: LIN Slave (Comms)"

From Flowcode Help
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 52: Line 52:
  
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
 +
 +
 +
 +
 +
 +
  
  
Line 59: Line 65:
 
==Macro reference==
 
==Macro reference==
  
===PowerDown===
+
===GetState===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PowerDown'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetState'''
 
|-
 
|-
| colspan="2" | Power Down the device&nbsp;
+
| colspan="2" | Returns the state of the device&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===GetState===
+
===Initialize===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetState'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialize'''
 
|-
 
|-
| colspan="2" | Returns the state of the device&nbsp;
+
| colspan="2" | Initialises the device&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
Line 111: Line 117:
  
  
===ReadAddress===
+
===PowerDown===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAddress'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PowerDown'''
 
|-
 
|-
| colspan="2" | Returns the Identifier read&nbsp;
+
| colspan="2" | Power Down the device&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===ReadDataCount===
+
===ReadAddress===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDataCount'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAddress'''
 
|-
 
|-
| colspan="2" | Return the data count size for Message&nbsp;
+
| colspan="2" | Returns the Identifier read&nbsp;
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Message
 
 
|-
 
|-
| colspan="2" | &nbsp;
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 162: Line 163:
 
|-
 
|-
 
| colspan="2" | Index of data byte to be returned&nbsp;
 
| colspan="2" | Index of data byte to be returned&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
===ReadDataCount===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDataCount'''
 +
|-
 +
| colspan="2" | Return the data count size for Message&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Message
 +
|-
 +
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 223: Line 243:
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
===Initialize===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialize'''
 
|-
 
| colspan="2" | Initialises the device&nbsp;
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
Line 253: Line 259:
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  

Latest revision as of 13:11, 7 February 2023

Author Matrix Ltd
Version 1.2
Category Comms


LIN Slave component

Low level routines for controlling the LIN bus (1.3 / 2.0) slave interface.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_LinSlave.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_LinSlave.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

GetState

Fc9-comp-macro.png GetState
Returns the state of the device 
Fc9-u8-icon.png - BYTE Return


Initialize

Fc9-comp-macro.png Initialize
Initialises the device 
Fc9-void-icon.png - VOID Return


ListenForMessages

Fc9-comp-macro.png ListenForMessages
Listens for messages with Timeout and returns the state 
Fc9-u8-icon.png - BYTE Timeout
 
Fc9-u8-icon.png - BYTE ChecksumType
0=Classic, 1=Enhanced 
Fc9-u8-icon.png - BYTE Return


PowerDown

Fc9-comp-macro.png PowerDown
Power Down the device 
Fc9-void-icon.png - VOID Return


ReadAddress

Fc9-comp-macro.png ReadAddress
Returns the Identifier read 
Fc9-u8-icon.png - BYTE Return


ReadData

Fc9-comp-macro.png ReadData
Returns the message data byte 
Fc9-u8-icon.png - BYTE Message
Message to be read 
Fc9-u8-icon.png - BYTE Index
Index of data byte to be returned 
Fc9-u8-icon.png - BYTE Return


ReadDataCount

Fc9-comp-macro.png ReadDataCount
Return the data count size for Message 
Fc9-u8-icon.png - BYTE Message
 
Fc9-u8-icon.png - BYTE Return


SetData

Fc9-comp-macro.png SetData
Set the Message data to be automatically sent as part of the ListenForMessages macro. 
Fc9-u8-icon.png - BYTE Message
Message to assign data for Range: 1-8 
Fc9-u8-icon.png - BYTE Data1
Data byte value 
Fc9-u8-icon.png - BYTE Data2
Data byte value 
Fc9-u8-icon.png - BYTE Data3
Data byte value 
Fc9-u8-icon.png - BYTE Data4
Data byte value 
Fc9-u8-icon.png - BYTE Data5
Data byte value 
Fc9-u8-icon.png - BYTE Data6
Data byte value 
Fc9-u8-icon.png - BYTE Data7
Data byte value 
Fc9-u8-icon.png - BYTE Data8
Data byte value 
Fc9-u8-icon.png - BYTE Return


WakeUp

Fc9-comp-macro.png WakeUp
Wake Up the device 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-type-5-icon.png TX pin
LIN bus data transmit pin 
Fc9-type-5-icon.png RX pin
LIN bus data receive pin 
Fc9-type-5-icon.png CS pin
LIN bus chip select pin  
Fc9-type-5-icon.png FAULT pin
LIN bus fault detection pin  
Fc9-type-5-icon.png VREG pin
LIN bus voltage regulation pin  
Fc9-type-16-icon.png MESSAGES
Number of messages the firmware is designed to listen for 
Fc9-conn-icon.png MESSAGE1
Fc9-type-14-icon.png ID
Message identifier to listen for 
Fc9-type-16-icon.png BYTES
Number of bytes to expent in the packet 
Fc9-type-16-icon.png TX_RX
Data direction for packet 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
A text label to aid identifying the component. 
Fc9-conn-icon.png Timing Adjustments
Fc9-type-21-icon.png Timer Adjust TX
 
Fc9-type-21-icon.png Timer Adjust RX