Jump to content

Component: LIN Master (Comms: Interface): Difference between revisions

From Flowcode Help
m Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder""
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
Line 202: Line 202:
|-
|-
|-
|-
| 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%" class="mtx-class-propfolder" | Bus Options
| width="90%" class="mtx-class-propfolder" | Bus Options
|-
|-
Line 226: Line 226:
| colspan="2" | The number of milliseconds to wait for incoming data to be received from the slave. 
| colspan="2" | The number of milliseconds to wait for incoming data to be received from the slave. 
|-
|-
| 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%" class="mtx-class-propfolder" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
Line 255: Line 255:
| colspan="2" | LIN bus chip select pin 
| colspan="2" | LIN bus chip select pin 
|-
|-
| 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%" class="mtx-class-propfolder" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-

Latest revision as of 14:37, 13 July 2026

Author MatrixTSL
Version 1.2
Category Comms: Interface


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_LinMasterV2.fcfx

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

Initialise

Initialise
Initialise the component 
- VOID Return


PowerDown

PowerDown
Power Down the device 
- VOID Return


SendMessageRxData

SendMessageRxData
Sends message with specified identifier and awaits a reply from a slave. Returns the number of data bytes received, 254 for a timeout or 255 for a checksum error. 
- BYTE Identifier
6-Bit ID field, Range: 0x00 to 0x3F 
- BYTE ChecksumType
0=Classic (LIN 1.3), 1=Enhanced (LIN 2.0) 
- BYTE ResponseCount
Number of bytes to receive from the slave, Range: 0 to 8 
- BYTE ResponseData
Data array to pass the received data 
- BYTE Return


SendMessageTxData

SendMessageTxData
Sends a message to the slave along with data 
- BYTE Identifier
6-Bit ID field, Range: 0x00 to 0x3F 
- BYTE ChecksumType
0=Classic (LIN 1.3), 1=Enhanced (LIN 2.0) 
- BYTE DataCount
Number of data bytes to transmit to the slave, Range: 0 to 8 
- BYTE Data
Data array to send to the slave 
- VOID Return


UpdateBaud

UpdateBaud
Changes the UART Baud rate. 0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200, 8=250000 
- BYTE new_baud
0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200, 8=250000 
- VOID Return


WakeUp

WakeUp
Wake Up the device 
- VOID Return


Property reference

Properties
Bus Options
Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Baud Options
Baud rate option selector 
Baud Rate
 
Receive Timeout
The number of milliseconds to wait for incoming data to be received from the slave. 
Connections
TX
Pin to be used for Transmit data 
TX Remap Pin
Allows the hardware transmit pin to be configured from a list of available pins based on your target device, 
RX
Pin to be used for Receive data 
RX Remap Pin
Allows the hardware receive pin to be configured from a list of available pins based on your target device, 
CS
LIN bus chip select pin 
Simulation
Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Console Data
Selects if the console data is automatically generated or not 
Console Format
Controls if the data is shown as a log with time and date stamps or just as raw data 
Console Columns
Number of characters that can be displayed on a single line of the console. 
Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port API - Routes the communication data via a data injector component on the Panel.