Jump to content

Component: LIN Slave (Comms): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(9 intermediate revisions by 2 users not shown)
Line 52: Line 52:


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''




Line 57: Line 65:
==Macro reference==
==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetState===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PowerDown'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Initialize===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetState'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ListenForMessages===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ListenForMessages'''
| width="90%" class="mtx-class-macrohead" | '''ListenForMessages'''
|-
|-
| colspan="2" | Listens for messages with Timeout and returns the state&nbsp;
| colspan="2" | Listens for messages with Timeout and returns the state&nbsp;
Line 106: Line 117:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===PowerDown===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAddress'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadAddress===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDataCount'''
| width="90%" class="mtx-class-macrohead" | '''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 137: Line 145:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadData===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadData'''
| width="90%" class="mtx-class-macrohead" | '''ReadData'''
|-
|-
| colspan="2" | Returns the message data byte&nbsp;
| colspan="2" | Returns the message data byte&nbsp;
Line 160: Line 169:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadDataCount===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ReadDataCount'''
|-
| colspan="2" | Return the data count size for Message&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Message
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | &nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetData'''
|-
| 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''
|}
 
 
===SetData===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetData'''
|-
|-
| colspan="2" | Set the Message data to be automatically sent as part of the ListenForMessages macro.&nbsp;
| colspan="2" | Set the Message data to be automatically sent as part of the ListenForMessages macro.&nbsp;
Line 218: Line 247:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===WakeUp===
|-
{| class="mtx-class-macrotable wikitable"
| 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" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" class="mtx-class-macrohead" | '''WakeUp'''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| 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;" | '''WakeUp'''
|-
|-
| colspan="2" | Wake Up the device&nbsp;
| colspan="2" | Wake Up the device&nbsp;
Line 242: Line 259:
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-
Line 288: Line 303:
| colspan="2" | Number of messages the firmware is designed to listen for&nbsp;
| colspan="2" | Number of messages the firmware is designed to listen for&nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | MESSAGE1
| width="90%" class="mtx-class-propfolder" | MESSAGE1
|-
|-
|-
|-
Line 307: Line 322:
| colspan="2" | Data direction for packet&nbsp;
| colspan="2" | Data direction for packet&nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-
Line 316: Line 331:
| colspan="2" | A text label to aid identifying the component.&nbsp;
| colspan="2" | A text label to aid identifying the component.&nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Timing Adjustments
| width="90%" class="mtx-class-propfolder" | Timing Adjustments
|-
|-
|-
|-

Latest revision as of 14:36, 13 July 2026

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

GetState
Returns the state of the device 
- BYTE Return


Initialize

Initialize
Initialises the device 
- VOID Return


ListenForMessages

ListenForMessages
Listens for messages with Timeout and returns the state 
- BYTE Timeout
 
- BYTE ChecksumType
0=Classic, 1=Enhanced 
- BYTE Return


PowerDown

PowerDown
Power Down the device 
- VOID Return


ReadAddress

ReadAddress
Returns the Identifier read 
- BYTE Return


ReadData

ReadData
Returns the message data byte 
- BYTE Message
Message to be read 
- BYTE Index
Index of data byte to be returned 
- BYTE Return


ReadDataCount

ReadDataCount
Return the data count size for Message 
- BYTE Message
 
- BYTE Return


SetData

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


WakeUp

WakeUp
Wake Up the device 
- VOID Return


Property reference

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