Jump to content

Component: CAN (CAL) (Misc): Difference between revisions

From Flowcode Help
Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 2.4 |- | width="20%" style="color:gray..."
 
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(12 intermediate revisions by 3 users not shown)
Line 14: Line 14:
==CAN component==
==CAN component==
CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. Low level routines for controling the internal CAN peripheral.
CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. Low level routines for controling the internal CAN peripheral.
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_CAN.fcfx FC_Comp_Source_CAN.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_CAN.fcfx FC_Comp_Source_CAN.fcfx]


==Detailed description==
==Detailed description==


''No detailed description exists yet for this component''
''No detailed description exists yet for this component''


==Examples==
==Examples==




Line 25: Line 47:
Example showing how to build a component using a CAL component [[Using_CAL_Components|Using CAL Components]].
Example showing how to build a component using a CAL component [[Using_CAL_Components|Using CAL Components]].


==Macro reference==


==Downloadable macro reference==
===CheckRx===
 
{| class="mtx-class-macrotable wikitable"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetTxIdentStd'''
| width="90%" class="mtx-class-macrohead" | '''CheckRx'''
|-
|-
| colspan="2" | Sets the ID to send along with the data in the next CAN message  
| colspan="2" | Checks to see if any messages are available for 'Buffer' specified  
|-
|-
|-
|-
Line 39: Line 61:
| width="90%" | Buffer
| width="90%" | Buffer
|-
|-
| colspan="2" | Send buffer: 0  to,2 
| colspan="2" | Send buffer: 0  to 1 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Hi
|-
| colspan="2" | The high byte (bits 8-15) of the ID 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Lo
|-
| colspan="2" | The low byte (bits 0-7) of the ID 
|-
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetList===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetTxIdentExd'''
| width="90%" class="mtx-class-macrohead" | '''GetList'''
|-
|-
| colspan="2" | Sets the optional 32-bit ID to send along with the standard ID and data in the next CAN message  
| colspan="2" | Get the Filter List of the Named Property 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Buffer
| width="90%" | Name
|-
|-
| colspan="2" | Send buffer: 0  to,2 
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | ID3
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===GetRxData===
{| class="mtx-class-macrotable wikitable"
|-
|-
| colspan="2" | The high byte (bits 24-31) of the ID 
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''GetRxData'''
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| colspan="2" | Returns the data byte at index from the buffer specified 
| width="90%" | ID2
|-
|-
| colspan="2" | The mid-high byte (bits 16-23) of the ID 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID1
| width="90%" | buffer
|-
|-
| colspan="2" | The mid-low byte (bits 8-15) of the ID 
| colspan="2" | The index of the required buffer 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID0
| width="90%" | index
|-
|-
| colspan="2" | The low byte (bits 0-7) of the ID 
| colspan="2" | The index of the required data byte in the buffer 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetRxDataCount===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetTxData'''
| width="90%" class="mtx-class-macrohead" | '''GetRxDataCount'''
|-
|-
| colspan="2" | Sets the CAN transmit data for the buffer specified (0, 1 or 2).  The count parameter Data_Cnt indicates the number of valid data bytes.  D0 to D7 are the payload data bytes to be loaded into the transmit buffer. 
| colspan="2" | Returns the number of valid data bytes in the buffer 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Buffer
| width="90%" | buffer
|-
|-
| colspan="2" | Send buffer: 0  to,2 
| colspan="2" | The index of the required buffer 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data_Cnt
|-
| colspan="2" | The number of bytes of data to add, 0 to 8 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D0
|-
| colspan="2" | Data byte 0 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D1
|-
| colspan="2" | Data byte 1 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D2
|-
| colspan="2" | Data byte 2 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D3
|-
| colspan="2" | Data byte 3 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D4
|-
| colspan="2" | Data byte 4 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D5
|-
| colspan="2" | Data byte 5 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D6
|-
| colspan="2" | Data byte 6 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D7
|-
| colspan="2" | Data byte 7 to add 
|-
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetRxIdent===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetRxMask'''
| width="90%" class="mtx-class-macrohead" | '''GetRxIdent'''
|-
|-
| colspan="2" | Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.  
| colspan="2" | Generic function to get the received message Identifier.    
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | mask
| width="90%" | buffer
|-
|-
| colspan="2" |  
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | id
|-
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetValue===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''GetValue'''
| width="90%" class="mtx-class-macrohead" | '''GetValue'''
|-
|-
| colspan="2" | Get the Value of the Named property 
| colspan="2" | Get the Value of the Named property 
Line 198: Line 168:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Init===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''GetRxData'''
| width="90%" class="mtx-class-macrohead" | '''Init'''
|-
|-
| colspan="2" | Returns the data byte at index from the buffer specified 
| colspan="2" | Must be called at least once and after every Uninit call to enable the CAN instance  
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | buffer
|-
| colspan="2" | The index of the required buffer 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | index
|-
| colspan="2" | The index of the required data byte in the buffer 
|-
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===InitRXConfig===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''InitRXMask'''
| width="90%" class="mtx-class-macrohead" | '''InitRXConfig'''
|-
|-
| colspan="2" | Initialization setting for RX Mask 
| colspan="2" | Initialization setting for RX Buffer Config 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mask
| width="90%" | Buffer
|-
|-
| colspan="2" | Mask Number (0 or 1) 
| colspan="2" | Buffer Number (0 or 1) 
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
| width="90%" | Value
|-
|-
| colspan="2" |  
| colspan="2" | Config data byte 
|-
| 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;" | '''SendBuffer'''
|-
| colspan="2" | Sends the contents of the buffer previously filled with Set_TX_... calls  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Buffer
|-
| colspan="2" | Send buffer: 0  to,2 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 262: Line 206:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===InitRXFilter===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''InitRXFilter'''
| width="90%" class="mtx-class-macrohead" | '''InitRXFilter'''
|-
|-
| colspan="2" | Initialization setting for RX Filter 
| colspan="2" | Initialization setting for RX Filter 
Line 285: Line 230:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===InitRXMask===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''GetRxDataCount'''
| width="90%" class="mtx-class-macrohead" | '''InitRXMask'''
|-
|-
| colspan="2" | Returns the number of valid data bytes in the buffer 
| colspan="2" | Initialization setting for RX Mask 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | buffer
| width="90%" | Mask
|-
|-
| colspan="2" | The index of the required buffer 
| colspan="2" | Mask Number (0 or 1) 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | Value
|}
 
 
{| 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;" | '''Init'''
|-
| colspan="2" | Must be called at least once and after every Uninit call to enable the CAN instance  
|-
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 316: Line 254:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===InitTXBuffer===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''InitTXBuffer'''
| width="90%" class="mtx-class-macrohead" | '''InitTXBuffer'''
|-
|-
| colspan="2" | Initialization settings for TX Buffers 
| colspan="2" | Initialization settings for TX Buffers 
Line 349: Line 288:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SendBuffer===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetRxMaskStd'''
| width="90%" class="mtx-class-macrohead" | '''SendBuffer'''
|-
|-
| colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter   
| colspan="2" | Sends the contents of the buffer previously filled with Set_TX_... calls  
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mask
| width="90%" | Buffer
|-
| colspan="2" | Send buffer: 0  to,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''
|}
 
 
===SetRxFilter===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetRxFilter'''
|-
| colspan="2" | Generic function to set Identifier.  CAN registers will be configured depending upon Std/Ext mode setting.  
|-
|-
| colspan="2" | Mask number 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Hi
| width="90%" | filter
|-
|-
| colspan="2" | The high byte (bits 8-15) of the ID 
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Lo
| width="90%" | id
|-
|-
| colspan="2" | The low byte (bits 0-7) of the ID 
| colspan="2" |  
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 377: Line 331:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetRxFilterExd===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetRxMaskExd'''
| width="90%" class="mtx-class-macrohead" | '''SetRxFilterExd'''
|-
|-
| colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
| colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
Line 386: Line 341:
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mask
| width="90%" | Filter
|-
|-
| colspan="2" | Mask 0 or 1 
| colspan="2" | Send filter: 0 to 3 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
Line 415: Line 370:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetRxFilterStd===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetValue'''
| width="90%" class="mtx-class-macrohead" | '''SetRxFilterStd'''
|-
|-
| colspan="2" | Set the Value of the Named property 
| colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter   
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Filter
|-
|-
| colspan="2" | Filter number 
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Name
| width="90%" | Hi
|-
|-
| colspan="2" |  
| colspan="2" | The high byte (bits 8-15) of the ID 
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
| width="90%" | Lo
|-
|-
| colspan="2" |  
| colspan="2" | The low byte (bits 0-7) of the ID 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 438: Line 399:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetRxMask===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetRxFilter'''
| width="90%" class="mtx-class-macrohead" | '''SetRxMask'''
|-
|-
| colspan="2" | Generic function to set Identifier.  CAN registers will be configured depending upon Std/Ext mode setting.  
| colspan="2" | Generic function to set Identifier.  CAN registers will be configured depending upon Std/Ext mode setting.  
Line 447: Line 409:
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | filter
| width="90%" | mask
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 461: Line 423:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetRxMaskExd===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetRxMaskExd'''
|-
| colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mask
|-
| colspan="2" | Mask 0 or 1 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID3
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | The high byte (bits 24-31) of the ID 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxIdent'''
|-
|-
| colspan="2" | Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.  
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID2
|-
|-
| colspan="2" | The mid-high byte (bits 16-23) of the ID 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | buffer
| width="90%" | ID1
|-
|-
| colspan="2" |  
| colspan="2" | The mid-low byte (bits 8-15) of the ID 
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | id
| width="90%" | ID0
|-
|-
| colspan="2" |  
| colspan="2" | The low byte (bits 0-7) of the ID 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 484: Line 462:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetRxMaskStd===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetRxMaskStd'''
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter   
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckRx'''
|-
|-
| colspan="2" | Checks to see if any messages are available for 'Buffer' specified  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mask
|-
| colspan="2" | Mask number 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Hi
|-
| colspan="2" | The high byte (bits 8-15) of the ID 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Buffer
| width="90%" | Lo
|-
|-
| colspan="2" | Send buffer: 0 to 1 
| colspan="2" | The low byte (bits 0-7) of the ID 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetTxData===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''InitRXConfig'''
| width="90%" class="mtx-class-macrohead" | '''SetTxData'''
|-
|-
| colspan="2" | Initialization setting for RX Buffer Config 
| colspan="2" | Sets the CAN transmit data for the buffer specified (0, 1 or 2).  The count parameter Data_Cnt indicates the number of valid data bytes.  D0 to D7 are the payload data bytes to be loaded into the transmit buffer. 
|-
|-
|-
|-
Line 513: Line 503:
| width="90%" | Buffer
| width="90%" | Buffer
|-
|-
| colspan="2" | Buffer Number (0 or 1) 
| colspan="2" | Send buffer: 0 to,2 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data_Cnt
|-
| colspan="2" | The number of bytes of data to add, 0 to 8 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D0
|-
| colspan="2" | Data byte 0 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D1
|-
| colspan="2" | Data byte 1 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D2
|-
| colspan="2" | Data byte 2 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D3
|-
| colspan="2" | Data byte 3 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D4
|-
| colspan="2" | Data byte 4 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D5
|-
| colspan="2" | Data byte 5 to add 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D6
|-
| colspan="2" | Data byte 6 to add 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
| width="90%" | D7
|-
|-
| colspan="2" | Config data byte 
| colspan="2" | Data byte 7 to add 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 525: Line 555:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetTxIdent===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''Uninit'''
| width="90%" class="mtx-class-macrohead" | '''SetTxIdent'''
|-
|-
| colspan="2" | Uninitialises the CAN, freeing its connections for general use  
| colspan="2" | Generic function to set Identifier.  CAN registers will be configured depending upon Std/Ext mode setting.  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | buffer
|-
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | id
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 538: Line 579:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetTxIdentExd===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetTxIdentExd'''
|-
| colspan="2" | Sets the optional 32-bit ID to send along with the standard ID and data in the next CAN message  
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
|-
|-
| colspan="2" | Get the Filter List of the Named Property 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Buffer
|-
|-
| colspan="2" | Send buffer: 0  to,2 
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Name
| width="90%" | ID3
|-
|-
| colspan="2" |  
| colspan="2" | The high byte (bits 24-31) of the ID 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | ID2
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | The mid-high byte (bits 16-23) of the ID 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxIdent'''
|-
|-
| colspan="2" | Generic function to get the received message Identifier.    
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID1
|-
|-
| colspan="2" | The mid-low byte (bits 8-15) of the ID 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | buffer
| width="90%" | ID0
|-
|-
| colspan="2" |  
| colspan="2" | The low byte (bits 0-7) of the ID 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetTxIdentStd===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetRxFilterStd'''
| width="90%" class="mtx-class-macrohead" | '''SetTxIdentStd'''
|-
|-
| colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter   
| colspan="2" | Sets the ID to send along with the data in the next CAN message  
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Filter
| width="90%" | Buffer
|-
|-
| colspan="2" | Filter number 
| colspan="2" | Send buffer: 0  to,2 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
Line 602: Line 647:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetValue===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetRxFilterExd'''
| width="90%" class="mtx-class-macrohead" | '''SetValue'''
|-
|-
| colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
| colspan="2" | Set the Value of the Named property 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Filter
| width="90%" | Name
|-
|-
| colspan="2" | Send filter: 0  to 3 
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | ID3
| width="90%" | Value
|-
|-
| colspan="2" | The high byte (bits 24-31) of the ID 
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | ID2
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===Uninit===
{| class="mtx-class-macrotable wikitable"
|-
|-
| colspan="2" | The mid-high byte (bits 16-23) of the ID 
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''Uninit'''
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| colspan="2" | Uninitialises the CAN, freeing its connections for general use  
| width="90%" | ID1
|-
|-
| colspan="2" | The mid-low byte (bits 8-15) of the ID 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID0
|-
| colspan="2" | The low byte (bits 0-7) of the ID 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
Line 714: Line 757:
|-
|-
| colspan="2" | selects the CAN ID type 
| colspan="2" | selects the CAN ID type 
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | TX Buffer 0
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Line 764: Line 811:
|-
|-
| colspan="2" | Data byte 7 
| colspan="2" | Data byte 7 
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | TX Buffer 1
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Line 814: Line 865:
|-
|-
| colspan="2" | Data byte 7 
| colspan="2" | Data byte 7 
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | TX Buffer 2
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Line 864: Line 919:
|-
|-
| colspan="2" | Data byte 7 
| colspan="2" | Data byte 7 
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | RX Buffer 0
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Line 884: Line 943:
|-
|-
| colspan="2" | Value for Filter 1 
| colspan="2" | Value for Filter 1 
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | RX Buffer 1
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Line 914: Line 977:
|-
|-
| colspan="2" | Value for Filter 5 
| colspan="2" | Value for Filter 5 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
|-
|}
|}

Latest revision as of 14:36, 13 July 2026

Author Matrix TSL
Version 2.4
Category Misc


CAN component

CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. Low level routines for controling the internal CAN peripheral.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Example showing how to build a component using a CAL component Using CAL Components.

Macro reference

CheckRx

CheckRx
Checks to see if any messages are available for 'Buffer' specified  
- BYTE Buffer
Send buffer: 0 to 1 
- BYTE Return


GetList

GetList
Get the Filter List of the Named Property 
- STRING Name
 
- STRING Return


GetRxData

GetRxData
Returns the data byte at index from the buffer specified 
- BYTE buffer
The index of the required buffer 
- BYTE index
The index of the required data byte in the buffer 
- BYTE Return


GetRxDataCount

GetRxDataCount
Returns the number of valid data bytes in the buffer 
- BYTE buffer
The index of the required buffer 
- BYTE Return


GetRxIdent

GetRxIdent
Generic function to get the received message Identifier.  
- BYTE buffer
 
- ULONG Return


GetValue

GetValue
Get the Value of the Named property 
- STRING Name
 
- STRING Return


Init

Init
Must be called at least once and after every Uninit call to enable the CAN instance  
- VOID Return


InitRXConfig

InitRXConfig
Initialization setting for RX Buffer Config 
- BYTE Buffer
Buffer Number (0 or 1) 
- BYTE Value
Config data byte 
- VOID Return


InitRXFilter

InitRXFilter
Initialization setting for RX Filter 
- BYTE Filter
 
- ULONG Value
 
- VOID Return


InitRXMask

InitRXMask
Initialization setting for RX Mask 
- BYTE Mask
Mask Number (0 or 1) 
- ULONG Value
 
- VOID Return


InitTXBuffer

InitTXBuffer
Initialization settings for TX Buffers 
- BYTE Buffer
TX Buffer ID = 0,1 or 2 
- ULONG ID
CAN Address 
- BYTE Length
Number of bytes to send 
- STRING Data
Data Array (of Length bytes) 
- VOID Return


SendBuffer

SendBuffer
Sends the contents of the buffer previously filled with Set_TX_... calls  
- BYTE Buffer
Send buffer: 0 to,2 
- VOID Return


SetRxFilter

SetRxFilter
Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.  
- BYTE filter
 
- ULONG id
 
- VOID Return


SetRxFilterExd

SetRxFilterExd
Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
- BYTE Filter
Send filter: 0 to 3 
- BYTE ID3
The high byte (bits 24-31) of the ID 
- BYTE ID2
The mid-high byte (bits 16-23) of the ID 
- BYTE ID1
The mid-low byte (bits 8-15) of the ID 
- BYTE ID0
The low byte (bits 0-7) of the ID 
- VOID Return


SetRxFilterStd

SetRxFilterStd
Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter  
- BYTE Filter
Filter number 
- BYTE Hi
The high byte (bits 8-15) of the ID 
- BYTE Lo
The low byte (bits 0-7) of the ID 
- VOID Return


SetRxMask

SetRxMask
Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.  
- BYTE mask
 
- ULONG id
 
- VOID Return


SetRxMaskExd

SetRxMaskExd
Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter  
- BYTE Mask
Mask 0 or 1 
- BYTE ID3
The high byte (bits 24-31) of the ID 
- BYTE ID2
The mid-high byte (bits 16-23) of the ID 
- BYTE ID1
The mid-low byte (bits 8-15) of the ID 
- BYTE ID0
The low byte (bits 0-7) of the ID 
- VOID Return


SetRxMaskStd

SetRxMaskStd
Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter  
- BYTE Mask
Mask number 
- BYTE Hi
The high byte (bits 8-15) of the ID 
- BYTE Lo
The low byte (bits 0-7) of the ID 
- VOID Return


SetTxData

SetTxData
Sets the CAN transmit data for the buffer specified (0, 1 or 2). The count parameter Data_Cnt indicates the number of valid data bytes. D0 to D7 are the payload data bytes to be loaded into the transmit buffer. 
- BYTE Buffer
Send buffer: 0 to,2 
- BYTE Data_Cnt
The number of bytes of data to add, 0 to 8 
- BYTE D0
Data byte 0 to add 
- BYTE D1
Data byte 1 to add 
- BYTE D2
Data byte 2 to add 
- BYTE D3
Data byte 3 to add 
- BYTE D4
Data byte 4 to add 
- BYTE D5
Data byte 5 to add 
- BYTE D6
Data byte 6 to add 
- BYTE D7
Data byte 7 to add 
- VOID Return


SetTxIdent

SetTxIdent
Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.  
- BYTE buffer
 
- ULONG id
 
- VOID Return


SetTxIdentExd

SetTxIdentExd
Sets the optional 32-bit ID to send along with the standard ID and data in the next CAN message  
- BYTE Buffer
Send buffer: 0 to,2 
- BYTE ID3
The high byte (bits 24-31) of the ID 
- BYTE ID2
The mid-high byte (bits 16-23) of the ID 
- BYTE ID1
The mid-low byte (bits 8-15) of the ID 
- BYTE ID0
The low byte (bits 0-7) of the ID 
- VOID Return


SetTxIdentStd

SetTxIdentStd
Sets the ID to send along with the data in the next CAN message  
- BYTE Buffer
Send buffer: 0 to,2 
- BYTE Hi
The high byte (bits 8-15) of the ID 
- BYTE Lo
The low byte (bits 0-7) of the ID 
- VOID Return


SetValue

SetValue
Set the Value of the Named property 
- STRING Name
 
- STRING Value
 
- VOID Return


Uninit

Uninit
Uninitialises the CAN, freeing its connections for general use  
- VOID Return


Property reference

Properties
Channel
Selects the CAN channel to be used 
TX Pin
 
RX Pin
 
TX Remap
 
RX Remap
 
Bus Rate
selects the Bus Rate (KHz) 
Sample Point
selects the Sample Point for bit reading 
SJW
Synchronization Jump Width adjusts the bit clock by 1 to 4 TQ periods 
Fosc
 
BRGCON1
 
BRGCON2
 
BRGCON3
 
ID Type
selects the CAN ID type 
TX Buffer 0
Message ID
CAN Message ID for Transmit Buffer 0 
Length
Number of valid data bytes in the message 
D0
Data byte 0 
D1
Data byte 1 
D2
Data byte 2 
D3
Data byte 3 
D4
Data byte 4 
D5
Data byte 5 
D6
Data byte 6 
D7
Data byte 7 
TX Buffer 1
Message ID
CAN Message ID for Transmit Buffer 1 
Length
Number of valid data bytes in the message 
D0
Data byte 0 
D1
Data byte 1 
D2
Data byte 2 
D3
Data byte 3 
D4
Data byte 4 
D5
Data byte 5 
D6
Data byte 6 
D7
Data byte 7 
TX Buffer 2
Message ID
CAN Message ID for Transmit Buffer 2 
Length
Number of valid data bytes in the message 
D0
Data byte 0 
D1
Data byte 1 
D2
Data byte 2 
D3
Data byte 3 
D4
Data byte 4 
D5
Data byte 5 
D6
Data byte 6 
D7
Data byte 7 
RX Buffer 0
Settings
Filter setting for Receive Buffer 0 
Mask
Value for Receive Mask 0 
Filter 0
Value for Filter 0 
Filter 1
Value for Filter 1 
RX Buffer 1
Settings
Filter setting for Receive Buffer 1 
Mask
Value for Receive Mask 1 
Filter 2
Value for Filter 2 
Filter 3
Value for Filter 3 
Filter 4
Value for Filter 4 
Filter 5
Value for Filter 5