Difference between revisions of "Component: LIN Master (Comms)"
From Flowcode Help
Jump to navigationJump to searchLine 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_LinMaster.fcfx FC_Comp_Source_LinMaster.fcfx] |
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LinMaster.fcfx FC_Comp_Source_LinMaster.fcfx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LinMaster.fcfx FC_Comp_Source_LinMaster.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 46: | Line 48: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 72: | Line 76: | ||
==Macro reference== | ==Macro reference== | ||
+ | |||
+ | {| 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;" | '''PowerDown''' | ||
+ | |- | ||
+ | | colspan="2" | Power Down the device | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| 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;" | '''GetState''' | ||
+ | |- | ||
+ | | colspan="2" | Returns the current state | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| 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;" | '''debug''' | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | idx | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| 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;" | '''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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Identifier | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | ResponseCount | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | ChecksumType | ||
+ | |- | ||
+ | | colspan="2" | 0=Classic, 1=Enhanced | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| 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" | Returns the data count size | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| 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;" | '''SetData''' | ||
+ | |- | ||
+ | | colspan="2" | Sets the data bytes to be sent | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data1 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data2 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data3 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data4 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data5 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data6 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data7 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data8 | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| 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;" | '''ReadData''' | ||
+ | |- | ||
+ | | colspan="2" | Returns a data byte indexed by Idx | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Idx | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| 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;" | '''SendMessageWithData''' | ||
+ | |- | ||
+ | | colspan="2" | Sends a message with data of length DataCount. See SetData | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Identifier | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | DataCount | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Checksum | ||
+ | |- | ||
+ | | colspan="2" | 0=Classic, 1=Enhanced | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| 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 | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| 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;" | '''Initialise''' | ||
+ | |- | ||
+ | | colspan="2" | Initialise the component | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Property reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Baud Rate | ||
+ | |- | ||
+ | | colspan="2" | LIN bus data rate in bits per second | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | ||
+ | | width="90%" | Label | ||
+ | |- | ||
+ | | colspan="2" | Label shown on the comms flasher component. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | TX | ||
+ | |- | ||
+ | | colspan="2" | LIN Transmit Pin | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | RX | ||
+ | |- | ||
+ | | colspan="2" | LIN Receive Pin | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | CS | ||
+ | |- | ||
+ | | colspan="2" | LIN bus chip select pin | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | WAKE | ||
+ | |- | ||
+ | | colspan="2" | LIN bus Wake up pin | ||
+ | |}==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 09:58, 27 January 2023
Author | Matrix Ltd |
Version | 1.2 |
Category | Comms |
Contents
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
![]() |
PowerDown |
Power Down the device | |
![]() |
Return |
![]() |
GetState |
Returns the current state | |
![]() |
Return |
![]() |
debug |
![]() |
idx |
![]() |
Return |
![]() |
ReadDataCount |
Returns the data count size | |
![]() |
Return |
![]() |
SetData |
Sets the data bytes to be sent | |
![]() |
Data1 |
![]() |
Data2 |
![]() |
Data3 |
![]() |
Data4 |
![]() |
Data5 |
![]() |
Data6 |
![]() |
Data7 |
![]() |
Data8 |
![]() |
Return |
![]() |
ReadData |
Returns a data byte indexed by Idx | |
![]() |
Idx |
![]() |
Return |
![]() |
SendMessageWithData |
Sends a message with data of length DataCount. See SetData | |
![]() |
Identifier |
![]() |
DataCount |
![]() |
Checksum |
0=Classic, 1=Enhanced | |
![]() |
Return |
![]() |
WakeUp |
Wake Up the device | |
![]() |
Return |
![]() |
Initialise |
Initialise the component | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
PowerDown |
Power Down the device | |
![]() |
Return |
![]() |
GetState |
Returns the current state | |
![]() |
Return |
![]() |
debug |
![]() |
idx |
![]() |
Return |
![]() |
ReadDataCount |
Returns the data count size | |
![]() |
Return |
![]() |
SetData |
Sets the data bytes to be sent | |
![]() |
Data1 |
![]() |
Data2 |
![]() |
Data3 |
![]() |
Data4 |
![]() |
Data5 |
![]() |
Data6 |
![]() |
Data7 |
![]() |
Data8 |
![]() |
Return |
![]() |
ReadData |
Returns a data byte indexed by Idx | |
![]() |
Idx |
![]() |
Return |
![]() |
SendMessageWithData |
Sends a message with data of length DataCount. See SetData | |
![]() |
Identifier |
![]() |
DataCount |
![]() |
Checksum |
0=Classic, 1=Enhanced | |
![]() |
Return |
![]() |
WakeUp |
Wake Up the device | |
![]() |
Return |
![]() |
Initialise |
Initialise the component | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
PowerDown |
Power Down the device | |
![]() |
Return |
![]() |
GetState |
Returns the current state | |
![]() |
Return |
![]() |
debug |
![]() |
idx |
![]() |
Return |
![]() |
ReadDataCount |
Returns the data count size | |
![]() |
Return |
![]() |
SetData |
Sets the data bytes to be sent | |
![]() |
Data1 |
![]() |
Data2 |
![]() |
Data3 |
![]() |
Data4 |
![]() |
Data5 |
![]() |
Data6 |
![]() |
Data7 |
![]() |
Data8 |
![]() |
Return |
![]() |
ReadData |
Returns a data byte indexed by Idx | |
![]() |
Idx |
![]() |
Return |
![]() |
SendMessageWithData |
Sends a message with data of length DataCount. See SetData | |
![]() |
Identifier |
![]() |
DataCount |
![]() |
Checksum |
0=Classic, 1=Enhanced | |
![]() |
Return |
![]() |
WakeUp |
Wake Up the device | |
![]() |
Return |
![]() |
Initialise |
Initialise the component | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
PowerDown |
Power Down the device | |
![]() |
Return |
![]() |
GetState |
Returns the current state | |
![]() |
Return |
![]() |
debug |
![]() |
idx |
![]() |
Return |
![]() |
ReadDataCount |
Returns the data count size | |
![]() |
Return |
![]() |
SetData |
Sets the data bytes to be sent | |
![]() |
Data1 |
![]() |
Data2 |
![]() |
Data3 |
![]() |
Data4 |
![]() |
Data5 |
![]() |
Data6 |
![]() |
Data7 |
![]() |
Data8 |
![]() |
Return |
![]() |
ReadData |
Returns a data byte indexed by Idx | |
![]() |
Idx |
![]() |
Return |
![]() |
SendMessageWithData |
Sends a message with data of length DataCount. See SetData | |
![]() |
Identifier |
![]() |
DataCount |
![]() |
Checksum |
0=Classic, 1=Enhanced | |
![]() |
Return |
![]() |
WakeUp |
Wake Up the device | |
![]() |
Return |
![]() |
Initialise |
Initialise the component | |
![]() |
Return |