Difference between revisions of "Component: API OneWire Dummy (API Slave Devices)"
From Flowcode Help
Jump to navigationJump to search| Line 16: | Line 16: | ||
==Component Source Code== | ==Component Source Code== | ||
| + | |||
| + | Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_API_OneWire_Dummy.fcfx FC_Comp_Source_API_OneWire_Dummy.fcfx] | ||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_API_OneWire_Dummy.fcfx FC_Comp_Source_API_OneWire_Dummy.fcfx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_API_OneWire_Dummy.fcfx FC_Comp_Source_API_OneWire_Dummy.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
| + | |||
| + | |||
| Line 30: | Line 34: | ||
==Examples== | ==Examples== | ||
| + | |||
| + | |||
| Line 40: | Line 46: | ||
==Macro reference== | ==Macro reference== | ||
| + | |||
| + | {| 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;" | '''OneWireBusReset''' | ||
| + | |- | ||
| + | | colspan="2" | Issue a 'ping' on the bus. If there is at least one sensor on the bus then it will generate a presence pulse. Returns 0 if a presense pulse was detected Returns 1 no device was detected | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | {| 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;" | '''OneWireInitialise''' | ||
| + | |- | ||
| + | | colspan="2" | Initialise the OneWire module ready for communications | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireMatchROM''' | ||
| + | |- | ||
| + | | colspan="2" | Performs a reset followed by the MatchROM code and then the 8-bit ROM code. | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | FamilyCode | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | SerialNumber | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | {| 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;" | '''OneWireTransmitByte''' | ||
| + | |- | ||
| + | | colspan="2" | Transmit a byte to the one wire bus a bit at a time | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Data | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | {| 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;" | '''OneWireGetIDByte''' | ||
| + | |- | ||
| + | | colspan="2" | Returns a single byte of the 64-Bit lasered ROM code, 255 on error | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Device | ||
| + | |- | ||
| + | | colspan="2" | Device ID - Range: 0 - NumDevices - 1 | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | ByteIndex | ||
| + | |- | ||
| + | | colspan="2" | Index of the data byte. 0=FamilyCode, 1-6=Serial, 7=CRC | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | {| 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;" | '''OneWireSkipROM''' | ||
| + | |- | ||
| + | | colspan="2" | Performs a bus reset and the sends the SkipROM command byte | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireScanBus''' | ||
| + | |- | ||
| + | | colspan="2" | Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | {| 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;" | '''OneWireReceiveByte''' | ||
| + | |- | ||
| + | | colspan="2" | Receives a byte from the one wire bus a bit at a time | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | {| 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;" | '''OneWireGetDeviceCount''' | ||
| + | |- | ||
| + | | colspan="2" | Returns the number of devices found by the last ScanBus operation. | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | ||
| + | |- | ||
| + | | 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== | ||
| + | |||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
| + | |- | ||
| + | |}==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
Revision as of 15:19, 20 January 2023
| Author | MatrixTSL |
| Version | 1.0 |
| Category | API Slave Devices |
Contents
API OneWire Dummy component
Component Source Code
Please click here to download the component source project: FC_Comp_Source_API_OneWire_Dummy.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_API_OneWire_Dummy.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
| OneWireInitialise | |
| Initialise the OneWire module ready for communications | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireTransmitByte | |
| Transmit a byte to the one wire bus a bit at a time | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Data | |
| Return | |
| OneWireSkipROM | |
| Performs a bus reset and the sends the SkipROM command byte | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireScanBus | |
| Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireReceiveByte | |
| Receives a byte from the one wire bus a bit at a time | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireGetDeviceCount | |
| Returns the number of devices found by the last ScanBus operation. | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
Property reference
| Properties |
==Macro reference==
| OneWireInitialise | |
| Initialise the OneWire module ready for communications | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireTransmitByte | |
| Transmit a byte to the one wire bus a bit at a time | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Data | |
| Return | |
| OneWireSkipROM | |
| Performs a bus reset and the sends the SkipROM command byte | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireScanBus | |
| Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireReceiveByte | |
| Receives a byte from the one wire bus a bit at a time | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireGetDeviceCount | |
| Returns the number of devices found by the last ScanBus operation. | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
Property reference
| Properties |
==Macro reference==
| OneWireInitialise | |
| Initialise the OneWire module ready for communications | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireTransmitByte | |
| Transmit a byte to the one wire bus a bit at a time | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Data | |
| Return | |
| OneWireSkipROM | |
| Performs a bus reset and the sends the SkipROM command byte | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireScanBus | |
| Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireReceiveByte | |
| Receives a byte from the one wire bus a bit at a time | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| OneWireGetDeviceCount | |
| Returns the number of devices found by the last ScanBus operation. | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
Property reference
| Properties |