Jump to content

Component: LIN Master (Comms): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
Line 95: Line 95:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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" | '''GetState'''
|-
|-
| colspan="2" | Returns the current state 
| colspan="2" | Returns the current state 
Line 109: Line 109:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Initialise the component 
| colspan="2" | Initialise the component 
Line 123: Line 123:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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" | '''PowerDown'''
|-
|-
| colspan="2" | Power Down the device 
| colspan="2" | Power Down the device 
Line 137: Line 137:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 a data byte indexed by Idx 
| colspan="2" | Returns a data byte indexed by Idx 
Line 156: Line 156:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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" | '''ReadDataCount'''
|-
|-
| colspan="2" | Returns the data count size 
| colspan="2" | Returns the data count size 
Line 170: Line 170:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''SendMessage'''
| width="90%" class="mtx-class-macrohead" | '''SendMessage'''
|-
|-
| colspan="2" | Sends message with specified identifier and awaits a reply from a slave. Returns 0 to indicate a successful transaction. Returns 3 to indicate a timeout. Returns 6 to indicate a bad CRC. 
| colspan="2" | Sends message with specified identifier and awaits a reply from a slave. Returns 0 to indicate a successful transaction. Returns 3 to indicate a timeout. Returns 6 to indicate a bad CRC. 
Line 199: Line 199:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''SendMessageWithData'''
| width="90%" class="mtx-class-macrohead" | '''SendMessageWithData'''
|-
|-
| colspan="2" | Sends a message with data of length DataCount. See SetData 
| colspan="2" | Sends a message with data of length DataCount. See SetData 
Line 228: Line 228:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''SetData'''
| width="90%" class="mtx-class-macrohead" | '''SetData'''
|-
|-
| colspan="2" | Sets the data bytes to be sent 
| colspan="2" | Sets the data bytes to be sent 
Line 282: Line 282:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''WakeUp'''
| width="90%" class="mtx-class-macrohead" | '''WakeUp'''
|-
|-
| colspan="2" | Wake Up the device 
| colspan="2" | Wake Up the device 
Line 296: Line 296:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''debug'''
| width="90%" class="mtx-class-macrohead" | '''debug'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 316: Line 316:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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'''  
|-
|-
|-
|-

Revision as of 14:23, 13 July 2026

Author Matrix Ltd
Version 1.2
Category Comms


LIN Master component

Low level routines for controlling a LIN master (1.3 & 2.0) interface.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

GetState

GetState
Returns the current state 
- BYTE Return


Initialise

Initialise
Initialise the component 
- VOID Return


PowerDown

PowerDown
Power Down the device 
- VOID Return


ReadData

ReadData
Returns a data byte indexed by Idx 
- BYTE Idx
 
- BYTE Return


ReadDataCount

ReadDataCount
Returns the data count size 
- BYTE Return


SendMessage

SendMessage
Sends message with specified identifier and awaits a reply from a slave. Returns 0 to indicate a successful transaction. Returns 3 to indicate a timeout. Returns 6 to indicate a bad CRC. 
- BYTE Identifier
 
- BYTE ResponseCount
 
- BYTE ChecksumType
0=Classic, 1=Enhanced 
- BYTE Return


SendMessageWithData

SendMessageWithData
Sends a message with data of length DataCount. See SetData 
- BYTE Identifier
 
- BYTE DataCount
 
- BYTE Checksum
0=Classic, 1=Enhanced 
- BYTE Return


SetData

SetData
Sets the data bytes to be sent 
- BYTE Data1
 
- BYTE Data2
 
- BYTE Data3
 
- BYTE Data4
 
- BYTE Data5
 
- BYTE Data6
 
- BYTE Data7
 
- BYTE Data8
 
- VOID Return


WakeUp

WakeUp
Wake Up the device 
- VOID Return


debug

debug
 
- BYTE idx
 
- BYTE Return


Property reference

Properties
Baud Rate
LIN bus data rate in bits per second 
Label
Label shown on the comms flasher component. 
Connections
TX
LIN Transmit Pin 
RX
LIN Receive Pin  
CS
LIN bus chip select pin 
WAKE
LIN bus Wake up pin