Jump to content

Component: RFID (BL0197) (E-blocks 2): Difference between revisions

From Flowcode Help
XML import
 
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{| style="width:50%"
 
{| width="50%"
|-
|-
| width="20%" style="color: gray;" | Author
| width="20%" style="color:gray;" | Author
| Matrix Ltd.
| Matrix Ltd.
|-
|-
| width="20%" style="color: gray;" | Version
| width="20%" style="color:gray;" | Version
| 2.0 (Release)
| 2.0
|-
|-
| width="20%" style="color: gray;" | Category
| width="20%" style="color:gray;" | Category
| E-blocks 2
| E-blocks 2
|}
|}




==RFID (BL0197) component==
Low level routines for controlling a BL0197 RFID E-block 2 board. Complete with macros to control the tag type and buzzer parameters.


==[[File:Component Icon 05b6159b_1572_4c0d_8ddf_705d9741955a.png|Image]] RFID (BL0197) component==
==Component Source Code==
Low level routines for controlling a BL0197 RFID E-block 2 board.
Complete with macros to control the tag type and buzzer parameters.


==Examples==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_EBlocks2_RFID_BL0197.fcfx FC_Comp_Source_EBlocks2_RFID_BL0197.fcfx]
''<span style="color:red;">No additional examples</span>''


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_EBlocks2_RFID_BL0197.fcfx FC_Comp_Source_EBlocks2_RFID_BL0197.fcfx]


==Downloadable macro reference==
==Detailed description==


===<span style="font-weight: normal;"><u><tt>GetRFIDTypeID</tt></u></span>===
Collects the 3 bytes required to determine which kind of MIFARE device is present. Stores the result into the local buffer 0 - 2 and returns the response of the module.


'''Parameters'''


:''This macro has no parameters''




'''Return value'''


:[[Variable Types|BYTE]]




===<span style="font-weight: normal;"><u><tt>SetCardType</tt></u></span>===
Allows the RFID tag type to be configured


'''Parameters'''


:[[Variable Types|BYTE]] ''TagType''
::0 = MIFARE, 1 = ICODE, 2 = ISO14443B


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


'''Return value'''
==Examples==


:[[Variable Types|BYTE]]




===<span style="font-weight: normal;"><u><tt>WriteRFIDBlock</tt></u></span>===
Writes a block of information to the RFID device.


'''Parameters'''


:[[Variable Types|BYTE]] ''Address''
::Remote RFID Block Address.


:[[Variable Types|BYTE]] ''Key_Type''




'''Return value'''


:[[Variable Types|BYTE]]




===<span style="font-weight: normal;"><u><tt>WriteRFIDModule</tt></u></span>===
Stores a byte of data to the internal EEPROM of the RFID module at the address specified.


'''Parameters'''
''<span style="color:red;">No additional examples</span>''


:[[Variable Types|BYTE]] ''Address''


:[[Variable Types|BYTE]] ''Data''




'''Return value'''


:[[Variable Types|BYTE]]




===<span style="font-weight: normal;"><u><tt>DecrementRFIDValue</tt></u></span>===
Perfoms a 32-bit decrement on the number held in location page or block.


'''Parameters'''


:[[Variable Types|BYTE]] ''Src''
::Page / Block


:[[Variable Types|BYTE]] ''Dst''
::Page / Block


:[[Variable Types|BYTE]] ''Key_Type''
::Needed for MIFARE Commands


==Macro reference==


'''Return value'''
===DecrementRFIDValue===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''DecrementRFIDValue'''
|-
| colspan="2" | Perfoms a 32-bit decrement on the number held in location page or block.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Src
|-
| colspan="2" | Page / Block&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Dst
|-
| colspan="2" | Page / Block&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Key_Type
|-
| colspan="2" | Needed for MIFARE Commands&nbsp;
|-
| 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''
|}


:[[Variable Types|BYTE]]


===FormatRFIDValue===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''FormatRFIDValue'''
|-
| colspan="2" | Initialises the internal buffer of the Microcontroller so that it is ready to perform a Increment, Decrement or Transfer command.&nbsp;
|-
|-
| 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''
|}


===<span style="font-weight: normal;"><u><tt>FormatRFIDValue</tt></u></span>===
Initialises the internal buffer of the Microcontroller so that it is ready to perform a Increment, Decrement or Transfer command.


'''Parameters'''
===GetRFIDStatus===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''GetRFIDStatus'''
|-
| colspan="2" | Collect the status of the RFID device (see help for the explaination of the status byte).&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:''This macro has no parameters''


===GetRFIDTypeID===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''GetRFIDTypeID'''
|-
| colspan="2" | Collects the 3 bytes required to determine which kind of MIFARE device is present. Stores the result into the local buffer 0 - 2 and returns the response of the module.&nbsp;
|-
|-
| 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''
|}


'''Return value'''


:''This call does not return a value''
===GetRFIDUID===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''GetRFIDUID'''
|-
| colspan="2" | Collects the UID from a RFID device. Stores the result into the UID buffer and returns the response of the module.&nbsp;
|-
|-
| 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''
|}




===<span style="font-weight: normal;"><u><tt>IncrementRFIDValue</tt></u></span>===
===IncrementRFIDValue===
Perfoms a 32-bit increment on the number held in location page or block.
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''IncrementRFIDValue'''
|-
| colspan="2" | Perfoms a 32-bit increment on the number held in location page or block.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Src
|-
| colspan="2" | Page / Block&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Dst
|-
| colspan="2" | Page / Block&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Key_Type
|-
| colspan="2" | Needed for MIFARE Commands&nbsp;
|-
| 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''
|}


'''Parameters'''


:[[Variable Types|BYTE]] ''Src''
===Initialise===
::Page / Block
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
| colspan="2" | Configures the RFID device by presetting the Osc type and Mode via the Flowcode component properties.&nbsp;
|-
|-
| 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''
|}


:[[Variable Types|BYTE]] ''Dst''
::Page / Block


:[[Variable Types|BYTE]] ''Key_Type''
===IsTagPresent===
::Needed for MIFARE Commands
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''IsTagPresent'''
|-
| colspan="2" | Checks to see if a card is present. Returns 0 if no tag is present. Returns 1 if a valid tag is present.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




'''Return value'''
===ReadRFIDBlock===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ReadRFIDBlock'''
|-
| colspan="2" | Reads a block of information from the RFID device.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Key_Type
|-
| colspan="2" | &nbsp;
|-
| 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''
|}


:[[Variable Types|BYTE]]


===ReadRFIDBuffer===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ReadRFIDBuffer'''
|-
| colspan="2" | Reads a byte of data from the incoming buffer.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | The address of the buffer 0 - 15&nbsp;
|-
| 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''
|}


===<span style="font-weight: normal;"><u><tt>StoreRFIDKey</tt></u></span>===
Stores a 6 byte key for use with MIFARE type devices that require authorisation.


'''Parameters'''
===ReadRFIDUID===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ReadRFIDUID'''
|-
| colspan="2" | Reads a byte of data from the UID buffer.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | The address of the buffer 0 - 7&nbsp;
|-
| 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''
|}


:[[Variable Types|BYTE]] ''Key''
::Key Location 0 - 31


:[[Variable Types|BYTE]] ''D0''
===SetBeep===
::Least significant byte of key
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetBeep'''
|-
| colspan="2" | Allows the buzzer output to be configured&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | BeepDelay
|-
| colspan="2" | 0 = Off, 1 = 40mS, 2 = 80mS, 3 = 120mS etc.&nbsp;
|-
| 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''
|}


:[[Variable Types|BYTE]] ''D1''


:[[Variable Types|BYTE]] ''D2''
===SetCardType===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetCardType'''
|-
| colspan="2" | Allows the RFID tag type to be configured&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | TagType
|-
| colspan="2" | 0 = MIFARE, 1 = ICODE, 2 = ISO14443B&nbsp;
|-
| 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''
|}


:[[Variable Types|BYTE]] ''D3''


:[[Variable Types|BYTE]] ''D4''
===StoreRFIDKey===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''StoreRFIDKey'''
|-
| colspan="2" | Stores a 6 byte key for use with MIFARE type devices that require authorisation.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Key
|-
| colspan="2" | Key Location 0 - 31&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D0
|-
| colspan="2" | Least significant byte of key&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D1
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D2
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D3
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D4
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D5
|-
| colspan="2" | Most significant byte of key&nbsp;
|-
| 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''
|}


:[[Variable Types|BYTE]] ''D5''
::Most significant byte of key


===TransferRFIDValue===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''TransferRFIDValue'''
|-
| colspan="2" | Perfoms a 32-bit block data transfer on the number held in location page or block.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Src
|-
| colspan="2" | Page / Block&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Dst
|-
| colspan="2" | Page / Block&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Key_Type
|-
| colspan="2" | Needed for MIFARE Commands&nbsp;
|-
| 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''
|}


'''Return value'''


:[[Variable Types|BYTE]]
===WriteRFIDBlock===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WriteRFIDBlock'''
|-
| colspan="2" | Writes a block of information to the RFID device.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | Remote RFID Block Address.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Key_Type
|-
| colspan="2" | &nbsp;
|-
| 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''
|}




===<span style="font-weight: normal;"><u><tt>WriteRFIDBuffer</tt></u></span>===
===WriteRFIDBuffer===
Writes a byte of data to the outgoing buffer.
{| class="mtx-class-macrotable wikitable"
 
|-
'''Parameters'''
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
 
| width="90%" class="mtx-class-macrohead" | '''WriteRFIDBuffer'''
:[[Variable Types|BYTE]] ''Address''
|-
::The address of the buffer 0 - 15
| colspan="2" | Writes a byte of data to the outgoing buffer.&nbsp;
 
|-
:[[Variable Types|BYTE]] ''Data''
|-
::The data to be stored in the buffer location 0 - 255.
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Address
 
|-
'''Return value'''
| colspan="2" | The address of the buffer 0 - 15&nbsp;
 
|-
:''This call does not return a value''
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Data
 
|-
===<span style="font-weight: normal;"><u><tt>GetRFIDStatus</tt></u></span>===
| colspan="2" | The data to be stored in the buffer location 0 - 255.&nbsp;
Collect the status of the RFID device (see help for the explaination of the status byte).
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
'''Parameters'''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
:''This macro has no parameters''
 
 
'''Return value'''
 
:[[Variable Types|UINT]]
 
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDBuffer</tt></u></span>===
Reads a byte of data from the incoming buffer.
 
'''Parameters'''
 
:[[Variable Types|BYTE]] ''Address''
::The address of the buffer 0 - 15
 
 
'''Return value'''
 
:[[Variable Types|BYTE]]
 
 
===<span style="font-weight: normal;"><u><tt>TransferRFIDValue</tt></u></span>===
Perfoms a 32-bit block data transfer on the number held in location page or block.
 
'''Parameters'''
 
:[[Variable Types|BYTE]] ''Src''
::Page / Block
 
:[[Variable Types|BYTE]] ''Dst''
::Page / Block
 
:[[Variable Types|BYTE]] ''Key_Type''
::Needed for MIFARE Commands
 
 
'''Return value'''
 
:[[Variable Types|BYTE]]
 
 
===<span style="font-weight: normal;"><u><tt>GetRFIDUID</tt></u></span>===
Collects the UID from a RFID device. Stores the result into the UID buffer and returns the response of the module.
 
'''Parameters'''
 
:''This macro has no parameters''
 
 
'''Return value'''
 
:[[Variable Types|BYTE]]
 
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDUID</tt></u></span>===
Reads a byte of data from the UID buffer.
 
'''Parameters'''
 
:[[Variable Types|BYTE]] ''Address''
::The address of the buffer 0 - 7
 
 
'''Return value'''
 
:[[Variable Types|BYTE]]
 
 
===<span style="font-weight: normal;"><u><tt>IsTagPresent</tt></u></span>===
Checks to see if a card is present.
 
Returns 0 if no tag is present.
 
Returns 1 if a valid tag is present.
 
'''Parameters'''
 
:''This macro has no parameters''
 
 
'''Return value'''
 
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
 
 
===<span style="font-weight: normal;"><u><tt>SetBeep</tt></u></span>===
Allows the buzzer output to be configured
 
'''Parameters'''
 
:[[Variable Types|BYTE]] ''BeepDelay''
::0 = Off, 1 = 40mS, 2 = 80mS, 3 = 120mS etc.
 
 
'''Return value'''
 
:[[Variable Types|BYTE]]
 
 
===<span style="font-weight: normal;"><u><tt>ReadRFIDBlock</tt></u></span>===
Reads a block of information from the RFID device.
 
'''Parameters'''
 
:[[Variable Types|BYTE]] ''Address''
 
:[[Variable Types|BYTE]] ''Key_Type''
 
 
'''Return value'''
 
:[[Variable Types|BYTE]]
 
 
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
Configures the RFID device by presetting the Osc type and Mode via the Flowcode component properties.
 
'''Parameters'''
 
:''This macro has no parameters''
 
 
'''Return value'''
 
:[[Variable Types|BYTE]]




 
===WriteRFIDModule===
==Simulation macro reference==
{| class="mtx-class-macrotable wikitable"
 
|-
''This component does not contain any simulation macros''
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WriteRFIDModule'''
|-
| colspan="2" | Stores a byte of data to the internal EEPROM of the RFID module at the address specified.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | &nbsp;
|-
| 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''
|}




==Property reference==
==Property reference==
<span style="font-weight: normal;"><u>Card_Type</u></span>


This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Card_Type''.
{| class="mtx-class-macrotable wikitable"
 
|-
''<span style="color:red;">No additional information</span>''
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
 
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
 
|-
 
|-
<span style="font-weight: normal;"><u>Beep Delay</u></span>
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Card_Type
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''BeepDelay''.
|-
 
| colspan="2" | &nbsp;
Amount of time to activate the buzzer when detecting a new RFID tag.
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
<span style="font-weight: normal;"><u>Channel</u></span>
| width="90%" | Beep Delay
 
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_uart::CHANNEL''.
| colspan="2" | Amount of time to activate the buzzer when detecting a new RFID tag.&nbsp;
 
|-
UART Channel selector
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
 
| width="90%" class="mtx-class-propfolder" | Connections
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.
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Channel
<span style="font-weight: normal;"><u>Baud Options</u></span>
|-
 
| colspan="2" | 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.&nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_uart::BAUD_LIST''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Baud rate option selector
| width="90%" | Baud Options
 
|-
<span style="font-weight: normal;"><u>Baud Rate</u></span>
| colspan="2" | Baud rate option selector&nbsp;
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''cal_uart::BAUD''.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Baud Rate
''<span style="color:red;">No additional information</span>''
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
<span style="font-weight: normal;"><u>TX</u></span>
| width="90%" | TX
 
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_uart::TX''.
| colspan="2" | Pin to be used for Transmit data&nbsp;
 
|-
Pin to be used for Transmit data
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | RX
<span style="font-weight: normal;"><u>RX</u></span>
|-
 
| colspan="2" | Pin to be used for Receive data&nbsp;
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_uart::RX''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
Pin to be used for Receive data
| width="90%" | Card Detect (LED)
 
|-
<span style="font-weight: normal;"><u>Card Detect (LED)</u></span>
| colspan="2" | &nbsp;
 
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''CardDetect''.
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | CTS
''<span style="color:red;">No additional information</span>''
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
<span style="font-weight: normal;"><u>CTS</u></span>
| width="90%" class="mtx-class-propfolder" | Simulation
 
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''CTS''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
''<span style="color:red;">No additional information</span>''
| width="90%" | Label
 
|-
 
| colspan="2" | &nbsp;
 
|-
<span style="font-weight: normal;"><u>Label</u></span>
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Scope Traces
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
|-
 
| colspan="2" | 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.&nbsp;
''<span style="color:red;">No additional information</span>''
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Console Data
 
|-
<span style="font-weight: normal;"><u>Scope Traces</u></span>
| colspan="2" | Selects if the console data is automatically generated or not&nbsp;
 
|-
This property is of type ''True or false'' and can be referenced with the variable name ''cal_uart::ScopeTraces''.
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Console Columns
Selects if the scope traces are automatically added to the data recorder window or not.
|-
 
| colspan="2" | Number of characters that can be displayed on a single line of the console.&nbsp;
     Simulation - draws an approximation of the UART data onto the scope trace.
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
     ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD.
| width="90%" | Data Source
 
|-
<span style="font-weight: normal;"><u>Console Data</u></span>
| colspan="2" | 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     Injector - Routes the communication data via a data injector component on the Panel.&nbsp;
 
|}
This property is of type ''True or false'' and can be referenced with the variable name ''cal_uart::ConsoleData''.
 
Selects if the console data is automatically generated or not
 
<span style="font-weight: normal;"><u>Console Columns</u></span>
 
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''cal_uart::ConsoleColumns''.
 
Number of characters that can be displayed on a single line of the console.
 
<span style="font-weight: normal;"><u>Data Source</u></span>
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_uart::DataSource''.
 
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  
 
    Injector - Routes the communication data via a data injector component on the Panel.

Latest revision as of 14:37, 13 July 2026

Author Matrix Ltd.
Version 2.0
Category E-blocks 2


RFID (BL0197) component

Low level routines for controlling a BL0197 RFID E-block 2 board. Complete with macros to control the tag type and buzzer parameters.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

DecrementRFIDValue

DecrementRFIDValue
Perfoms a 32-bit decrement on the number held in location page or block. 
- BYTE Src
Page / Block 
- BYTE Dst
Page / Block 
- BYTE Key_Type
Needed for MIFARE Commands 
- BYTE Return


FormatRFIDValue

FormatRFIDValue
Initialises the internal buffer of the Microcontroller so that it is ready to perform a Increment, Decrement or Transfer command. 
- VOID Return


GetRFIDStatus

GetRFIDStatus
Collect the status of the RFID device (see help for the explaination of the status byte). 
- UINT Return


GetRFIDTypeID

GetRFIDTypeID
Collects the 3 bytes required to determine which kind of MIFARE device is present. Stores the result into the local buffer 0 - 2 and returns the response of the module. 
- BYTE Return


GetRFIDUID

GetRFIDUID
Collects the UID from a RFID device. Stores the result into the UID buffer and returns the response of the module. 
- BYTE Return


IncrementRFIDValue

IncrementRFIDValue
Perfoms a 32-bit increment on the number held in location page or block. 
- BYTE Src
Page / Block 
- BYTE Dst
Page / Block 
- BYTE Key_Type
Needed for MIFARE Commands 
- BYTE Return


Initialise

Initialise
Configures the RFID device by presetting the Osc type and Mode via the Flowcode component properties. 
- BYTE Return


IsTagPresent

IsTagPresent
Checks to see if a card is present. Returns 0 if no tag is present. Returns 1 if a valid tag is present. 
- BOOL Return


ReadRFIDBlock

ReadRFIDBlock
Reads a block of information from the RFID device. 
- BYTE Address
 
- BYTE Key_Type
 
- BYTE Return


ReadRFIDBuffer

ReadRFIDBuffer
Reads a byte of data from the incoming buffer. 
- BYTE Address
The address of the buffer 0 - 15 
- BYTE Return


ReadRFIDUID

ReadRFIDUID
Reads a byte of data from the UID buffer. 
- BYTE Address
The address of the buffer 0 - 7 
- BYTE Return


SetBeep

SetBeep
Allows the buzzer output to be configured 
- BYTE BeepDelay
0 = Off, 1 = 40mS, 2 = 80mS, 3 = 120mS etc. 
- BYTE Return


SetCardType

SetCardType
Allows the RFID tag type to be configured 
- BYTE TagType
0 = MIFARE, 1 = ICODE, 2 = ISO14443B 
- BYTE Return


StoreRFIDKey

StoreRFIDKey
Stores a 6 byte key for use with MIFARE type devices that require authorisation. 
- BYTE Key
Key Location 0 - 31 
- BYTE D0
Least significant byte of key 
- BYTE D1
 
- BYTE D2
 
- BYTE D3
 
- BYTE D4
 
- BYTE D5
Most significant byte of key 
- BYTE Return


TransferRFIDValue

TransferRFIDValue
Perfoms a 32-bit block data transfer on the number held in location page or block. 
- BYTE Src
Page / Block 
- BYTE Dst
Page / Block 
- BYTE Key_Type
Needed for MIFARE Commands 
- BYTE Return


WriteRFIDBlock

WriteRFIDBlock
Writes a block of information to the RFID device. 
- BYTE Address
Remote RFID Block Address. 
- BYTE Key_Type
 
- BYTE Return


WriteRFIDBuffer

WriteRFIDBuffer
Writes a byte of data to the outgoing buffer. 
- BYTE Address
The address of the buffer 0 - 15 
- BYTE Data
The data to be stored in the buffer location 0 - 255. 
- VOID Return


WriteRFIDModule

WriteRFIDModule
Stores a byte of data to the internal EEPROM of the RFID module at the address specified. 
- BYTE Address
 
- BYTE Data
 
- BYTE Return


Property reference

Properties
Card_Type
 
Beep Delay
Amount of time to activate the buzzer when detecting a new RFID tag. 
Connections
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
 
TX
Pin to be used for Transmit data 
RX
Pin to be used for Receive data 
Card Detect (LED)
 
CTS
 
Simulation
Label
 
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 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 Injector - Routes the communication data via a data injector component on the Panel.