|
|
| Line 197: |
Line 197: |
| {| class="mtx-class-macrotable wikitable" | | {| 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%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' |
| |- | | |- |
Revision as of 14:20, 13 July 2026
| Author
|
Matrix Ltd
|
| Version
|
1.2
|
| Category
|
Comms: Interface
|
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_LinSlaveV2.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_LinSlaveV2.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
Initialise
|
Initialise
|
| Initialises the device ready for communications from the master. Puts the bus into the Wake state driving the CS pin high.
|
- VOID
|
Return
|
|
ListenForMessages
|
| Listens for messages with Timeout and returns the state. Returns 255 for timeout, 254 for CRC error and 0 for none matching ID received. Returns 1-8 for a valid ID received.
|
- BYTE
|
Timeout
|
| timeout in milliseconds to wait for incoming message, 255=Wait Forever
|
- BYTE
|
Return
|
PowerDown
|
PowerDown
|
| Puts the bus into the Powered Down state driving the CS pin low.
|
- VOID
|
Return
|
ReadData
|
ReadData
|
| Get the Message data automatically received from a specific message as part of the ListenForMessages macro.
|
- BYTE
|
Message
|
| Message index to be read. Range: 1 - Num Messages
|
- BYTE
|
Data
|
|
|
- BYTE
|
Return
|
ReadDataCount
|
ReadDataCount
|
| Return the data count size for Message
|
- BYTE
|
Message
|
| Range: 1 - Num Messages
|
- BYTE
|
Return
|
SetData
|
SetData
|
| Set the Message data to be automatically sent for a specific message as part of the ListenForMessages macro.
|
- BYTE
|
Message
|
| Message index to write. Range: 1 - Num Messages
|
- BYTE
|
Data
|
|
|
- BYTE
|
Return
|
WakeUp
|
WakeUp
|
| Puts the bus into the Wake state driving the CS pin high.
|
- 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
|
|
|
|
Messages
|
| Number of messages the firmware is designed to listen for
|
|
Checksum Type
|
|
|
|
Connections
|
|
TX
|
| Pin to be used for Transmit data
|
|
RX
|
| Pin to be used for Receive data
|
|
CS pin
|
| LIN bus chip select pin
|
|
MESSAGE1
|
|
ID
|
| Message identifier to listen for
|
|
BYTES
|
| Number of bytes to expent in the packet
|
|
TX_RX
|
| Data direction for packet
|
|
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.
|