Difference between revisions of "Component: LIN Slave (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_LinSlave.fcfx FC_Comp_Source_LinSlave.fcfx] |
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LinSlave.fcfx FC_Comp_Source_LinSlave.fcfx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LinSlave.fcfx FC_Comp_Source_LinSlave.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 34: | Line 36: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 46: | Line 50: | ||
==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 state of the device | ||
+ | |- | ||
+ | |- | ||
+ | | 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;" | '''ListenForMessages''' | ||
+ | |- | ||
+ | | colspan="2" | Listens for messages with Timeout and returns the state | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Timeout | ||
+ | |- | ||
+ | | 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;" | '''ReadAddress''' | ||
+ | |- | ||
+ | | colspan="2" | Returns the Identifier read | ||
+ | |- | ||
+ | |- | ||
+ | | 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" | Return the data count size for Message | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Message | ||
+ | |- | ||
+ | | 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;" | '''ReadData''' | ||
+ | |- | ||
+ | | colspan="2" | Returns the message data byte | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Message | ||
+ | |- | ||
+ | | colspan="2" | Message to be read | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Index | ||
+ | |- | ||
+ | | colspan="2" | Index of data byte to be returned | ||
+ | |- | ||
+ | | 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" | Set the Message data to be automatically sent as part of the ListenForMessages macro. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Message | ||
+ | |- | ||
+ | | colspan="2" | Message to assign data for Range: 1-8 | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data1 | ||
+ | |- | ||
+ | | colspan="2" | Data byte value | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data2 | ||
+ | |- | ||
+ | | colspan="2" | Data byte value | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data3 | ||
+ | |- | ||
+ | | colspan="2" | Data byte value | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data4 | ||
+ | |- | ||
+ | | colspan="2" | Data byte value | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data5 | ||
+ | |- | ||
+ | | colspan="2" | Data byte value | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data6 | ||
+ | |- | ||
+ | | colspan="2" | Data byte value | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data7 | ||
+ | |- | ||
+ | | colspan="2" | Data byte value | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Data8 | ||
+ | |- | ||
+ | | colspan="2" | Data byte value | ||
+ | |- | ||
+ | | 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;" | '''Initialize''' | ||
+ | |- | ||
+ | | colspan="2" | Initialises 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;" | '''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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==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" 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 pin | ||
+ | |- | ||
+ | | colspan="2" | LIN bus data transmit pin | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | RX pin | ||
+ | |- | ||
+ | | colspan="2" | LIN bus data receive pin | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | CS pin | ||
+ | |- | ||
+ | | colspan="2" | LIN bus chip select pin | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | FAULT pin | ||
+ | |- | ||
+ | | colspan="2" | LIN bus fault detection pin | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | VREG pin | ||
+ | |- | ||
+ | | colspan="2" | LIN bus voltage regulation pin | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | MESSAGES | ||
+ | |- | ||
+ | | colspan="2" | Number of messages the firmware is designed to listen for | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | MESSAGE1 | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | ||
+ | | width="90%" | ID | ||
+ | |- | ||
+ | | colspan="2" | Message identifier to listen for | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | BYTES | ||
+ | |- | ||
+ | | colspan="2" | Number of bytes to expent in the packet | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | TX_RX | ||
+ | |- | ||
+ | | colspan="2" | Data direction for packet | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | ||
+ | | width="90%" | Label | ||
+ | |- | ||
+ | | colspan="2" | A text label to aid identifying the component. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Timing Adjustments | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | Timer Adjust TX | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | Timer Adjust RX | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |}==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 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
![]() |
PowerDown |
Power Down the device | |
![]() |
Return |
![]() |
GetState |
Returns the state of the device | |
![]() |
Return |
![]() |
ListenForMessages |
Listens for messages with Timeout and returns the state | |
![]() |
Timeout |
![]() |
ChecksumType |
0=Classic, 1=Enhanced | |
![]() |
Return |
![]() |
ReadAddress |
Returns the Identifier read | |
![]() |
Return |
![]() |
ReadDataCount |
Return the data count size for Message | |
![]() |
Message |
![]() |
Return |
![]() |
ReadData |
Returns the message data byte | |
![]() |
Message |
Message to be read | |
![]() |
Index |
Index of data byte to be returned | |
![]() |
Return |
![]() |
Initialize |
Initialises the device | |
![]() |
Return |
![]() |
WakeUp |
Wake Up the device | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
PowerDown |
Power Down the device | |
![]() |
Return |
![]() |
GetState |
Returns the state of the device | |
![]() |
Return |
![]() |
ListenForMessages |
Listens for messages with Timeout and returns the state | |
![]() |
Timeout |
![]() |
ChecksumType |
0=Classic, 1=Enhanced | |
![]() |
Return |
![]() |
ReadAddress |
Returns the Identifier read | |
![]() |
Return |
![]() |
ReadDataCount |
Return the data count size for Message | |
![]() |
Message |
![]() |
Return |
![]() |
ReadData |
Returns the message data byte | |
![]() |
Message |
Message to be read | |
![]() |
Index |
Index of data byte to be returned | |
![]() |
Return |
![]() |
Initialize |
Initialises the device | |
![]() |
Return |
![]() |
WakeUp |
Wake Up the device | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
PowerDown |
Power Down the device | |
![]() |
Return |
![]() |
GetState |
Returns the state of the device | |
![]() |
Return |
![]() |
ListenForMessages |
Listens for messages with Timeout and returns the state | |
![]() |
Timeout |
![]() |
ChecksumType |
0=Classic, 1=Enhanced | |
![]() |
Return |
![]() |
ReadAddress |
Returns the Identifier read | |
![]() |
Return |
![]() |
ReadDataCount |
Return the data count size for Message | |
![]() |
Message |
![]() |
Return |
![]() |
ReadData |
Returns the message data byte | |
![]() |
Message |
Message to be read | |
![]() |
Index |
Index of data byte to be returned | |
![]() |
Return |
![]() |
Initialize |
Initialises the device | |
![]() |
Return |
![]() |
WakeUp |
Wake Up the device | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
PowerDown |
Power Down the device | |
![]() |
Return |
![]() |
GetState |
Returns the state of the device | |
![]() |
Return |
![]() |
ListenForMessages |
Listens for messages with Timeout and returns the state | |
![]() |
Timeout |
![]() |
ChecksumType |
0=Classic, 1=Enhanced | |
![]() |
Return |
![]() |
ReadAddress |
Returns the Identifier read | |
![]() |
Return |
![]() |
ReadDataCount |
Return the data count size for Message | |
![]() |
Message |
![]() |
Return |
![]() |
ReadData |
Returns the message data byte | |
![]() |
Message |
Message to be read | |
![]() |
Index |
Index of data byte to be returned | |
![]() |
Return |
![]() |
Initialize |
Initialises the device | |
![]() |
Return |
![]() |
WakeUp |
Wake Up the device | |
![]() |
Return |