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

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
(9 intermediate revisions by the same user 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="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''
 +
|}
  
:[[Variable Types|BYTE]]
 
  
 +
===FormatRFIDValue===
 +
{| 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''
 +
|}
  
===<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="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''
 +
|}
  
:''This macro has no parameters''
 
  
 +
===GetRFIDTypeID===
 +
{| 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''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
+
===GetRFIDUID===
 +
{| 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>IncrementRFIDValue</tt></u></span>===
+
===IncrementRFIDValue===
Perfoms a 32-bit increment on the number held in location page or block.
+
{| 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''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Src''
+
===Initialise===
::Page / Block
+
{| 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;" | '''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="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;" | '''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="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''
 +
|}
  
:[[Variable Types|BYTE]]
 
  
 +
===ReadRFIDBuffer===
 +
{| 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''
 +
|}
  
===<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="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]] ''Key''
 
::Key Location 0 - 31
 
  
:[[Variable Types|BYTE]] ''D0''
+
===SetBeep===
::Least significant byte of key
+
{| 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''
 +
|}
  
:[[Variable Types|BYTE]] ''D1''
 
  
:[[Variable Types|BYTE]] ''D2''
+
===SetCardType===
 +
{| 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;" | '''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="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]] ''D5''
 
::Most significant byte of key
 
  
 +
===TransferRFIDValue===
 +
{| 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''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
+
===WriteRFIDBlock===
 +
{| 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;" | '''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="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
'''Parameters'''
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
''This component does not contain any simulation macros''
+
| 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''
 +
|}
  
  
 
==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.
 

Latest revision as of 13:10, 7 February 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 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

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


FormatRFIDValue

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


GetRFIDStatus

Fc9-comp-macro.png GetRFIDStatus
Collect the status of the RFID device (see help for the explaination of the status byte). 
Fc9-u16-icon.png - UINT Return


GetRFIDTypeID

Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Return


GetRFIDUID

Fc9-comp-macro.png GetRFIDUID
Collects the UID from a RFID device. Stores the result into the UID buffer and returns the response of the module. 
Fc9-u8-icon.png - BYTE Return


IncrementRFIDValue

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


Initialise

Fc9-comp-macro.png Initialise
Configures the RFID device by presetting the Osc type and Mode via the Flowcode component properties. 
Fc9-u8-icon.png - BYTE Return


IsTagPresent

Fc9-comp-macro.png IsTagPresent
Checks to see if a card is present. Returns 0 if no tag is present. Returns 1 if a valid tag is present. 
Fc9-bool-icon.png - BOOL Return


ReadRFIDBlock

Fc9-comp-macro.png ReadRFIDBlock
Reads a block of information from the RFID device. 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Key_Type
 
Fc9-u8-icon.png - BYTE Return


ReadRFIDBuffer

Fc9-comp-macro.png ReadRFIDBuffer
Reads a byte of data from the incoming buffer. 
Fc9-u8-icon.png - BYTE Address
The address of the buffer 0 - 15 
Fc9-u8-icon.png - BYTE Return


ReadRFIDUID

Fc9-comp-macro.png ReadRFIDUID
Reads a byte of data from the UID buffer. 
Fc9-u8-icon.png - BYTE Address
The address of the buffer 0 - 7 
Fc9-u8-icon.png - BYTE Return


SetBeep

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


SetCardType

Fc9-comp-macro.png SetCardType
Allows the RFID tag type to be configured 
Fc9-u8-icon.png - BYTE TagType
0 = MIFARE, 1 = ICODE, 2 = ISO14443B 
Fc9-u8-icon.png - BYTE Return


StoreRFIDKey

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


TransferRFIDValue

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


WriteRFIDBlock

Fc9-comp-macro.png WriteRFIDBlock
Writes a block of information to the RFID device. 
Fc9-u8-icon.png - BYTE Address
Remote RFID Block Address. 
Fc9-u8-icon.png - BYTE Key_Type
 
Fc9-u8-icon.png - BYTE Return


WriteRFIDBuffer

Fc9-comp-macro.png WriteRFIDBuffer
Writes a byte of data to the outgoing buffer. 
Fc9-u8-icon.png - BYTE Address
The address of the buffer 0 - 15 
Fc9-u8-icon.png - BYTE Data
The data to be stored in the buffer location 0 - 255. 
Fc9-void-icon.png - VOID Return


WriteRFIDModule

Fc9-comp-macro.png WriteRFIDModule
Stores a byte of data to the internal EEPROM of the RFID module at the address specified. 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u8-icon.png - BYTE Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Card_Type
 
Fc9-type-16-icon.png Beep Delay
Amount of time to activate the buzzer when detecting a new RFID tag. 
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png 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. 
Fc9-type-16-icon.png Baud Options
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
 
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-5-icon.png Card Detect (LED)
 
Fc9-type-5-icon.png CTS
 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
 
Fc9-type-7-icon.png 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. 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-21-icon.png Console Columns
Number of characters that can be displayed on a single line of the console. 
Fc9-type-16-icon.png 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.