Jump to content

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

From Flowcode Help
XML import
 
No edit summary
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 for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_EBlocks2_RFID_BL0197.fcfx FC_Comp_Source_EBlocks2_RFID_BL0197.fcfx]
''<span style="color:red;">No additional examples</span>''


==Detailed description==


==Downloadable macro reference==
''No detailed description exists yet for this component''


===<span style="font-weight: normal;"><u><tt>GetRFIDTypeID</tt></u></span>===
==Examples==
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''
''<span style="color:red;">No additional examples</span>''




'''Return value'''
==Downloadable macro reference==


:[[Variable Types|BYTE]]
{| 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;" | '''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''
|}




===<span style="font-weight: normal;"><u><tt>SetCardType</tt></u></span>===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Allows the RFID tag type to be configured
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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''
|}


'''Parameters'''


:[[Variable Types|BYTE]] ''TagType''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::0 = MIFARE, 1 = ICODE, 2 = ISO14443B
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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''
|}




'''Return 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;" | '''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''
|}


:[[Variable Types|BYTE]]


{| 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;" | '''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''
|}


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


'''Parameters'''
{| 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;" | '''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''
|}


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


:[[Variable Types|BYTE]] ''Key_Type''
{| 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;" | '''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''
|}




'''Return 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;" | '''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]]


{| 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;" | '''WriteRFIDBuffer'''
|-
| colspan="2" | Writes a byte of data to the outgoing 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" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | The data to be stored in the buffer location 0 - 255.&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>WriteRFIDModule</tt></u></span>===
Stores a byte of data to the internal EEPROM of the RFID module at the address specified.


'''Parameters'''
{| 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;" | '''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''
|}


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


:[[Variable Types|BYTE]] ''Data''
{| 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;" | '''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''
|}




'''Return 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;" | '''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''
|}


:[[Variable Types|BYTE]]


{| 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;" | '''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>DecrementRFIDValue</tt></u></span>===
Perfoms a 32-bit decrement on the number held in location page or block.


'''Parameters'''
{| 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;" | '''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]] ''Src''
::Page / Block


:[[Variable Types|BYTE]] ''Dst''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Page / Block
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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''
|}


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


{| 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;" | '''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''
|}


'''Return value'''


:[[Variable Types|BYTE]]
{| 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;" | '''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''
|}




===<span style="font-weight: normal;"><u><tt>FormatRFIDValue</tt></u></span>===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Initialises the internal buffer of the Microcontroller so that it is ready to perform a Increment, Decrement or Transfer command.
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
'''Parameters'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
:''This macro has no parameters''
| colspan="2" | Configures the RFID device by presetting the Osc type and Mode via the Flowcode component properties.&nbsp;
 
|-
 
|-
'''Return 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''
:''This call does not return a value''
|}
 
 
===<span style="font-weight: normal;"><u><tt>IncrementRFIDValue</tt></u></span>===
Perfoms a 32-bit increment 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>StoreRFIDKey</tt></u></span>===
Stores a 6 byte key for use with MIFARE type devices that require authorisation.


'''Parameters'''
:[[Variable Types|BYTE]] ''Key''
::Key Location 0 - 31
:[[Variable Types|BYTE]] ''D0''
::Least significant byte of key
:[[Variable Types|BYTE]] ''D1''
:[[Variable Types|BYTE]] ''D2''
:[[Variable Types|BYTE]] ''D3''
:[[Variable Types|BYTE]] ''D4''
:[[Variable Types|BYTE]] ''D5''
::Most significant byte of key
'''Return value'''
:[[Variable Types|BYTE]]
===<span style="font-weight: normal;"><u><tt>WriteRFIDBuffer</tt></u></span>===
Writes a byte of data to the outgoing buffer.
'''Parameters'''
:[[Variable Types|BYTE]] ''Address''
::The address of the buffer 0 - 15
:[[Variable Types|BYTE]] ''Data''
::The data to be stored in the buffer location 0 - 255.
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>GetRFIDStatus</tt></u></span>===
Collect the status of the RFID device (see help for the explaination of the status byte).
'''Parameters'''
:''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]]
==Simulation macro reference==
''This component does not contain any simulation macros''




==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="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
''<span style="color:red;">No additional information</span>''
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | 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" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
<span style="font-weight: normal;"><u>CTS</u></span>
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | 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.

Revision as of 14:40, 16 January 2023

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 for the component source code: FC_Comp_Source_EBlocks2_RFID_BL0197.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

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


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


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


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


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
Initialises the internal buffer of the Microcontroller so that it is ready to perform a Increment, Decrement or Transfer command. 
- VOID Return


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


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


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


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


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


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


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


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


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


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


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


Initialise
Configures the RFID device by presetting the Osc type and Mode via the Flowcode component properties. 
- 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.