<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.flowcode.co.uk/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kersing</id>
	<title>Flowcode Help - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.flowcode.co.uk/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kersing"/>
	<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Special:Contributions/Kersing"/>
	<updated>2026-04-30T21:28:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Component:_LoRaWAN_(Seeed_WIO-E5)_(LORAWAN-E5)_(Comms:_IoT/Cloud)&amp;diff=41678</id>
		<title>Component: LoRaWAN (Seeed WIO-E5) (LORAWAN-E5) (Comms: IoT/Cloud)</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Component:_LoRaWAN_(Seeed_WIO-E5)_(LORAWAN-E5)_(Comms:_IoT/Cloud)&amp;diff=41678"/>
		<updated>2025-06-09T21:24:36Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;width:50%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color:gray;&amp;quot; | Author&lt;br /&gt;
| Jac Kersing&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color:gray;&amp;quot; | Version&lt;br /&gt;
| 1.0&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color:gray;&amp;quot; | Category&lt;br /&gt;
| Comms: IoT/Cloud&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==LoRaWAN (Seeed WIO-E5) component==&lt;br /&gt;
LoRaWAN Component for the Seeed WIO-E5 module.&lt;br /&gt;
&lt;br /&gt;
==Detailed description==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''No detailed description exists yet for this component''&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===LoraWAN Demo===&lt;br /&gt;
&lt;br /&gt;
Example LoRaWAN demo file.&lt;br /&gt;
&lt;br /&gt;
{{Fcfile|lorawan-demo-bl0080.fcfx|LoRaWAN Demo}}&lt;br /&gt;
&lt;br /&gt;
==Macro reference==&lt;br /&gt;
&lt;br /&gt;
===ChkConnected===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''ChkConnected'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Sends AT command and checks response to check the LoRa E5 module  is connected to the controller.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-s16-icon.png]] - INT&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FreeUart===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''FreeUart'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Release UART resources (to allow for sleeping on some microcontrollers)&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-void-icon.png]] - VOID&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GetDownlinkByte===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''GetDownlinkByte'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Get one byte from the received downlink message, returns -1 if no more bytes are available.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-s16-icon.png]] - INT&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GetId===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''GetId'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Get the specified ID from the LoRaWAN module. Valid types are DevEUI, AppEUI and DevAddr &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-string-icon.png]] - STRING&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | type&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-string-icon.png]] - STRING&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GetPort===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''GetPort'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Get the portnumber of the downlink message.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GotDownlink===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''GotDownlink'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Was a downlink received?&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-bool-icon.png]] - BOOL&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Initialize===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''Initialize'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Initialize the component. Should be called before any other function is used but after the component received a hardware reset. (Toggle of the reset pin)&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-void-icon.png]] - VOID&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Join===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''Join'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Execute a join command to have the module join the LoRaWAN network. Returns 1 on a successfull join, 0 if the join failed. Keep in mind there is no interaction with the LoRaWAN network if Join mode is ABP so it will always succeed if all parameters have been initialized correctly. In Join mode OTAA a join will fail if the module does not get a valid response from teh network which may occur if the DevEUI, AppEUI or AppKey are not correct or if there is no coverage at the location.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===LowPowerSleep===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''LowPowerSleep'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Set low power sleep mode. Specify the number of seconds to sleep in the range 6-12959.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-s16-icon.png]] - INT&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | seconds&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ReInitUart===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''ReInitUart'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Reclaim the UART after low power sleep of the CONTROLLER (not the LoRaWAN module).&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-void-icon.png]] - VOID&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SendMsg===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''SendMsg'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Send LoRaWAN message, the message should be an array of byte values. To conserve airtime no ASCII strings should be used.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | msg&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | len&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SendMsgConfirmed===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''SendMsgConfirmed'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Send a confirmed LoRaWAN message, the message should  be an array of byte values. To conserve airtime no ASCII strings should be used.  Use confirmed messages sparingly as transmitting gateways can normally receive 8 parallel messages but not 1 message while transmitting. So it kills scalebility of a LoRaWAN network!&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | msg&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | len&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SetDr===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''SetDr'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Explicitly set DataRate of transmissions. Valid values depend on the region used please consult the LoRaWAN regional parameter document to find them.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | dr&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SetId===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''SetId'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Set an ID. Valid options are &amp;quot;AppEUI&amp;quot;, &amp;quot;DevEUI&amp;quot; and &amp;quot;DevAddr&amp;quot;. The value to use is an 16 HEX character long string for EUIs or a 8 HEX characters long string for DevAddr.  Examples: AppEUI: &amp;quot;001122334455AABB&amp;quot; DevAddr: &amp;quot;001122AA&amp;quot;&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-string-icon.png]] - STRING&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | type&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-string-icon.png]] - STRING&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | value&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SetJoinMode===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''SetJoinMode'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Set the join mode, valid options are MODE_OTAA or MODE_ABP.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-string-icon.png]] - STRING&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | mode&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SetKey===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''SetKey'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Set encryption key.   Valid key types are: &amp;quot;APPKEY&amp;quot;, &amp;quot;APPSKEY&amp;quot; and &amp;quot;NWKSKEY&amp;quot;.  For OTAA only APPKEY is required. For ABP both APPSKEY and NWKSKEY are required.  The value shoud be a 32 HEX character string. Example value: &amp;quot;00112233445566778899AABBCCDDEEFF&amp;quot;&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-string-icon.png]] - STRING&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | type&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-string-icon.png]] - STRING&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | value&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SetLowPower===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''SetLowPower'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Set the Low Power mode of the module. Low power can be off (false) or on (true)&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-bool-icon.png]] - BOOL&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | on&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-void-icon.png]] - VOID&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SetPort===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''SetPort'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Set the port used for transmissions&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | port&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SetRegion===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-comp-macro.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''SetRegion'''&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Set the LoRaWAN region to be used. For US915 the band (of 8 channels)  to be used needs to be specified as well, the band is ignored for EU868  TTN uses band 1 in US915.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-string-icon.png]] - STRING&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | region&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | band&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | [[File:Fc9-u8-icon.png]] - BYTE&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;border-top: 2px solid #000;&amp;quot; | ''Return''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Property reference==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:60%; background-color:#FFFFFF;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#D8C9D8;&amp;quot; | [[File:Fc9-prop-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#D8C9D8; color:#4B008D;&amp;quot; | '''Properties''' &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#EAE1EA;&amp;quot; | [[File:Fc9-conn-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#EAE1EA; color:#4B008D;&amp;quot; | LoRaWAN settings&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-21-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | Max Downlink Size&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Sets the number of byte elements inside the circular buffer.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#EAE1EA;&amp;quot; | [[File:Fc9-conn-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#EAE1EA; color:#4B008D;&amp;quot; | Connections&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-16-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | Channel&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | 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.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-16-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | Baud Options&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Baud rate option selector&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-5-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | TX&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Pin to be used for Transmit data&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-16-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | TX Remap Pin&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Allows the hardware transmit pin to be configured from a list of available pins based on your target device,&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-5-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | RX&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Pin to be used for Receive data&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-16-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | RX Remap Pin&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Allows the hardware receive pin to be configured from a list of available pins based on your target device,&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color:#EAE1EA;&amp;quot; | [[File:Fc9-conn-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; style=&amp;quot;background-color:#EAE1EA; color:#4B008D;&amp;quot; | Simulation&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-7-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | Console Data&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Selects if the console data is automatically generated or not&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-16-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | Console Format&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Controls if the data is shown as a log with time and date stamps or just as raw data&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-21-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | Console Columns&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Number of characters that can be displayed on a single line of the console.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-16-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | Data Source&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | 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      API - Routes the communication data via a data injector component on the Panel.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; align=&amp;quot;center&amp;quot; | [[File:Fc9-type-16-icon.png]]&lt;br /&gt;
| width=&amp;quot;90%&amp;quot; | API&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Selects which API component to route the communication data via. Add API components to the panel before they will be available in this list. API components are available from the Comms component category.&amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Component Source Code==&lt;br /&gt;
&lt;br /&gt;
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_lora-e5-component.fcfx FC_Comp_Source_lora-e5-component.fcfx]&lt;br /&gt;
&lt;br /&gt;
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_lora-e5-component.fcfx FC_Comp_Source_lora-e5-component.fcfx]&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=String_Manipulation_Functions&amp;diff=20023</id>
		<title>String Manipulation Functions</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=String_Manipulation_Functions&amp;diff=20023"/>
		<updated>2016-09-04T22:09:51Z</updated>

		<summary type="html">&lt;p&gt;Kersing: /* Concatenating Strings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;sidebar&amp;gt;Sidebar: Flowcode Help Overview:Functions&amp;lt;/sidebar&amp;gt;&lt;br /&gt;
:''See [[Calculation Icon Properties]]''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==String Functions==&lt;br /&gt;
&lt;br /&gt;
The String functions are a set of string manipulation functions that can be used to edit, change and examine the strings.&lt;br /&gt;
&lt;br /&gt;
To add a function, drag it into the calculation box. The user can then edit this base code with the variables required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin:auto; text-align:center;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Btn_Calculation.gif|border]]&lt;br /&gt;
| width=&amp;quot;50px&amp;quot; |&amp;amp;rarr; &lt;br /&gt;
|[[File:Gen_Calculation_Flowchart_Icon_01.png]] &lt;br /&gt;
|width=&amp;quot;50px&amp;quot; |&amp;amp;rarr; &lt;br /&gt;
|[[File:Gen_StringFunctions_01.jpg]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Strings used in explaining the functions below:&lt;br /&gt;
&lt;br /&gt;
Str1[20]&lt;br /&gt;
&lt;br /&gt;
Str2[20]&lt;br /&gt;
&lt;br /&gt;
TestStr[40]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Assigning Strings===&lt;br /&gt;
&lt;br /&gt;
=&lt;br /&gt;
&lt;br /&gt;
To assign a string value to a string variable you can simply use the = character.&lt;br /&gt;
&lt;br /&gt;
Str1 = &amp;quot;Hello &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Str2 = &amp;quot;World&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Strings can also be treated like byte arrays to allow you to manipulate the individual bytes. For string data to work correctly with other string functions the end of the data must be signified with a 0 or null byte.&lt;br /&gt;
&lt;br /&gt;
Str1[0] = 'H'&lt;br /&gt;
&lt;br /&gt;
Str1[1] = 'e'&lt;br /&gt;
&lt;br /&gt;
Str1[2] = 'l'&lt;br /&gt;
&lt;br /&gt;
Str1[3] = 'l'&lt;br /&gt;
&lt;br /&gt;
Str1[4] = 'o'&lt;br /&gt;
&lt;br /&gt;
Str1[5] = ' '&lt;br /&gt;
&lt;br /&gt;
Str1[6] = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Assigning a string constant to a string variable will automatically add the null byte to the end of the string for you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Str1 = &amp;quot;Hello &amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Strings can also be used with escape characters such as \n (newline), \r (carriage return), \t (tab), \xXX (hexadecimal byte value), \\ single backslash character.&lt;br /&gt;
&lt;br /&gt;
Str1 = &amp;quot;Hello\n\rWorld&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Concatenating Strings===&lt;br /&gt;
&lt;br /&gt;
+ &lt;br /&gt;
&lt;br /&gt;
Concatenates the two string together in the order presented from left to right.&lt;br /&gt;
&lt;br /&gt;
If the resulting string is longer than the array size of the receiving string then any extra characters are lost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Str1 = &amp;quot;Hello &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Str2 = &amp;quot;World&amp;quot;&lt;br /&gt;
&lt;br /&gt;
TestStr = Str1 + Str2 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;Hello World&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Multiple concatenations are best done like this to avoid using excess memory. Note that each line contains only two values to be added together.&lt;br /&gt;
&lt;br /&gt;
TestStr = &amp;quot;Multiple &amp;quot; + Str1 &lt;br /&gt;
&lt;br /&gt;
TestStr = TestStr + Str2 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;Multiple Hello World&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Due to a limitation in generated code the result of multiple concatenations in one operation is limited to 20 characters. So the result of Str1 + Str2 + Str3 should not exceed 20 characters.&lt;br /&gt;
&lt;br /&gt;
===Converting a numeric value/variable to a string===&lt;br /&gt;
&lt;br /&gt;
'''ToString$(value)''' &lt;br /&gt;
&lt;br /&gt;
Changes the numeric value to a String.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr = ToStr$(1234) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;1234&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a string to upper case===&lt;br /&gt;
&lt;br /&gt;
'''ToUpper$(string)''' &lt;br /&gt;
&lt;br /&gt;
Changes all letters to upper case.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
TestStr = ToUpper$(Str1) &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
TestStr is now &amp;quot;HELLO &amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a string to lower case===&lt;br /&gt;
&lt;br /&gt;
'''ToLower$(string)''' &lt;br /&gt;
&lt;br /&gt;
Changes all letters to lower case.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
TestStr = ToLower$(Str1) &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
TestStr is now &amp;quot;hello &amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Finding the length of a string===&lt;br /&gt;
&lt;br /&gt;
'''Length$(string)''' &lt;br /&gt;
&lt;br /&gt;
Retrieves the length of the string.&lt;br /&gt;
&lt;br /&gt;
This is not the Array size, but the number of characters in the array before a Null character is encountered.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal = Length$(Str1)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal is now 6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Str1 array size is 20, but has a String of only 6 characters currently assigned to it hence the return value of 6.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===String subset - characters from the start of the string===&lt;br /&gt;
&lt;br /&gt;
'''Left$(string, size)''' &lt;br /&gt;
Retrieves a substring from the string of size characters starting from the leftmost character.&lt;br /&gt;
&lt;br /&gt;
If the length of the string used to store the result is less than size of the substring returned then any extra characters are lost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr = Left$(Str1, 3) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;Hel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===String subset - characters from the end of the string===&lt;br /&gt;
&lt;br /&gt;
'''Right$(string, size)''' &lt;br /&gt;
&lt;br /&gt;
Retrieves a substring from the string of size characters starting from the rightmost character.&lt;br /&gt;
&lt;br /&gt;
i.e. a size of 4 retrieves the 4 rightmost characters.&lt;br /&gt;
&lt;br /&gt;
If the length of the string used to store the result is less than size of the substring returned then any extra characters are lost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr = Right$(Str1, 3) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;lo &amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===String subset - characters from an arbitrary position in the string===&lt;br /&gt;
&lt;br /&gt;
'''Mid$(string, start, size)''' &lt;br /&gt;
&lt;br /&gt;
Retrieves a substring from the string starting at position start of size characters. The first character of the string is at position zero.&lt;br /&gt;
&lt;br /&gt;
If the length of the string used to store the result is less than size of the substring returned then any extra characters are lost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr = Mid$(Str1, 2, 3) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;llo&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===String comparisons===&lt;br /&gt;
&lt;br /&gt;
'''Compare$(string1, string2, compare_type)''' &lt;br /&gt;
&lt;br /&gt;
Compares the two strings, parameters 1 and 2, and returns a BYTE value corresponding to the following results:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0 = strings are identical&lt;br /&gt;
&lt;br /&gt;
1 = string1&amp;gt;string2&lt;br /&gt;
&lt;br /&gt;
255 = string2&amp;gt;string1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The 3rd parameter, compare_type,  determines whether or not the check is case sensitive. values for compare_type are:&lt;br /&gt;
&lt;br /&gt;
0 = case sensitive&lt;br /&gt;
&lt;br /&gt;
1 = case insensitive.&lt;br /&gt;
&lt;br /&gt;
Examples&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Str1 = &amp;quot;ABC&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Str2 = &amp;quot;abc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal = Compare$(Str1, Str2, 0) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal is now 255 as Str2 is later in the ASCII sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal = Compare$(Str1, Str2, 1) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal is now 0 as when case insensitive the two strings are identical.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Str2 = Str1&lt;br /&gt;
&lt;br /&gt;
RetVal = Compare$(Str1, Str2, 0) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal is now 0 as both strings are identical.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Fcfile|StringCompare.fcfx|String Compare Example}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a floating point value/variable to a string===&lt;br /&gt;
&lt;br /&gt;
'''FloatToString$( float )'''&lt;br /&gt;
&lt;br /&gt;
Converts a floating point number into a string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float = Floating point number to convert.&lt;br /&gt;
&lt;br /&gt;
string = String variable to hold the conversion data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string = FloatToString( float )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a numeric value/variable to a hex string===&lt;br /&gt;
&lt;br /&gt;
'''NumberToHex$( number )'''&lt;br /&gt;
&lt;br /&gt;
Converts a byte or int number into a hexadecimal string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
number = byte or integer number to convert.&lt;br /&gt;
&lt;br /&gt;
string = String variable to hold the conversion data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string = FloatToString( INT )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a string to a numeric value/variable===&lt;br /&gt;
&lt;br /&gt;
'''StringToInt$(string)'''&lt;br /&gt;
&lt;br /&gt;
Converts a string of numeric ASCII data into an integer numeric data value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string = String variable containing numeric ASCII data.&lt;br /&gt;
&lt;br /&gt;
returns numeric data from the string in decimal form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
number = StringToInt$( string ) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a string into a floating point value/variable===&lt;br /&gt;
&lt;br /&gt;
'''StringToFloat$( string )'''&lt;br /&gt;
&lt;br /&gt;
Converts a string of numeric ASCII data into a floating point variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string = String variable containing numeric ASCII data.&lt;br /&gt;
&lt;br /&gt;
returns numeric data from the string in floating point form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float = StringToFloat$( string )&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Variable_Types&amp;diff=17616</id>
		<title>Variable Types</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Variable_Types&amp;diff=17616"/>
		<updated>2015-12-07T22:38:51Z</updated>

		<summary type="html">&lt;p&gt;Kersing: /* STRING */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;sidebar&amp;gt;Sidebar: Flowcode Help Overview:Variables&amp;lt;/sidebar&amp;gt;&lt;br /&gt;
[[File:Gen Create a New Variable Window.png|right|254x303px]]&lt;br /&gt;
A variable type defines what can be represented by that variable, as well as the ammount of storage the variable will take up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Integer types==&lt;br /&gt;
'''Signed''' integers can be positive or negative, but there is no fractional part. They are typically used in maths or graphical areas, but not so much when dealing with individual bits.&lt;br /&gt;
&lt;br /&gt;
'''Unsigned''' integers can only be positive. Unsigned integers will double the range of a variable if it is known the value can never be negative. Unsigned integers are useful for ''bit-masking'' and other logical operations, but are not usually used in mathematical operations as these will usually require a signed value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===BOOL===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| 0 or 1&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 1-bit unsigned integer&lt;br /&gt;
|}&lt;br /&gt;
A Boolean value is either '''true''' or '''false'''. In Flowcode, this means 1 or 0, respectively. On download, this may take up 1 byte or a single bit, depending on the compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Boolean values are used typically to set flags. Though internally a BOOL is stored as an integer, it is considered bad practice to mix Boolean values and integers in expressions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===BYTE===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| 0 to 255&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 8-bit unsigned integer&lt;br /&gt;
|}&lt;br /&gt;
A byte is the smallest storage unit most processors are able to read from in a single instruction. A byte can be used to store a single value or its bits may be used as ''flags'', almost like a compact array of BOOLs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===INT===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| -32768 to 32767&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 16-bit signed integer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UINT===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| 0 to 65535&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 16-bit unsigned integer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===LONG===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| -21474836648 to 21474836647&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 32-bit signed integer&lt;br /&gt;
|}&lt;br /&gt;
A 32-bit integer is useful for processing larger values and most integer-arithmetic uses found in embedded devices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ULONG===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| 0 to 4294967295&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 32-bit unsigned integer&lt;br /&gt;
|}&lt;br /&gt;
An unsigned 32-bit value offers the largest integer value of any of the types, and because of this, many of the simulation-only functions in Flowcode use ULONG, because simulation memory is not a consideration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Floating point==&lt;br /&gt;
A floating point value can represent a much wider range of values than an integer can, but at a loss of accuracy over large ranges. Floating point values when downloaded will be 64-bit if the target supports them, or 32-bit if it does not.&lt;br /&gt;
&lt;br /&gt;
===FLOAT===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| -Infinite to +Infinite&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 32-bit signed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Special types==&lt;br /&gt;
Flowcode also supports some structured types to help with programs.&lt;br /&gt;
&lt;br /&gt;
===STRING===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| 0 to 255 per character&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 8-bit unsigned array. Default size of the array is 20.&lt;br /&gt;
|}&lt;br /&gt;
A string is a byte-array used to store text. Hence in many circumstances a string and a byte array are interchangeable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One important difference is in Flowcode strings terminate at a null (0x00) character. This means the first zero-value byte that is encountered in the string marks the end of the string. If a string contains the exact number of characters specified in the declaration it will not contain a terminating zero, in all other cases it will.&lt;br /&gt;
&lt;br /&gt;
===HANDLE===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| Undefined&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 32-bit unsigned value&lt;br /&gt;
|}&lt;br /&gt;
An object handle is used to reference a more complicated piece of data (such as a file, Flowcode component or block of text) whose internal format is not known. Flowcode provides many [[API Overview|simulation macros]] that use handles to easily pass data around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In an embedded context, a handle can be thought of as a pointer to memory, except Flowcode manages the handles so referencing a non-existent handle will not cause any fatal errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A handle value of zero is considered ''null'' and invalid to Flowcode.&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Variable_Types&amp;diff=17615</id>
		<title>Variable Types</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Variable_Types&amp;diff=17615"/>
		<updated>2015-12-07T17:05:29Z</updated>

		<summary type="html">&lt;p&gt;Kersing: /* STRING */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;sidebar&amp;gt;Sidebar: Flowcode Help Overview:Variables&amp;lt;/sidebar&amp;gt;&lt;br /&gt;
[[File:Gen Create a New Variable Window.png|right|254x303px]]&lt;br /&gt;
A variable type defines what can be represented by that variable, as well as the ammount of storage the variable will take up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Integer types==&lt;br /&gt;
'''Signed''' integers can be positive or negative, but there is no fractional part. They are typically used in maths or graphical areas, but not so much when dealing with individual bits.&lt;br /&gt;
&lt;br /&gt;
'''Unsigned''' integers can only be positive. Unsigned integers will double the range of a variable if it is known the value can never be negative. Unsigned integers are useful for ''bit-masking'' and other logical operations, but are not usually used in mathematical operations as these will usually require a signed value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===BOOL===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| 0 or 1&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 1-bit unsigned integer&lt;br /&gt;
|}&lt;br /&gt;
A Boolean value is either '''true''' or '''false'''. In Flowcode, this means 1 or 0, respectively. On download, this may take up 1 byte or a single bit, depending on the compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Boolean values are used typically to set flags. Though internally a BOOL is stored as an integer, it is considered bad practice to mix Boolean values and integers in expressions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===BYTE===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| 0 to 255&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 8-bit unsigned integer&lt;br /&gt;
|}&lt;br /&gt;
A byte is the smallest storage unit most processors are able to read from in a single instruction. A byte can be used to store a single value or its bits may be used as ''flags'', almost like a compact array of BOOLs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===INT===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| -32768 to 32767&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 16-bit signed integer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UINT===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| 0 to 65535&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 16-bit unsigned integer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===LONG===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| -21474836648 to 21474836647&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 32-bit signed integer&lt;br /&gt;
|}&lt;br /&gt;
A 32-bit integer is useful for processing larger values and most integer-arithmetic uses found in embedded devices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ULONG===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| 0 to 4294967295&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 32-bit unsigned integer&lt;br /&gt;
|}&lt;br /&gt;
An unsigned 32-bit value offers the largest integer value of any of the types, and because of this, many of the simulation-only functions in Flowcode use ULONG, because simulation memory is not a consideration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Floating point==&lt;br /&gt;
A floating point value can represent a much wider range of values than an integer can, but at a loss of accuracy over large ranges. Floating point values when downloaded will be 64-bit if the target supports them, or 32-bit if it does not.&lt;br /&gt;
&lt;br /&gt;
===FLOAT===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| -Infinite to +Infinite&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 32-bit signed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Special types==&lt;br /&gt;
Flowcode also supports some structured types to help with programs.&lt;br /&gt;
&lt;br /&gt;
===STRING===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| 0 to 255 per character&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 8-bit unsigned array. Default size of the array is 20.&lt;br /&gt;
|}&lt;br /&gt;
A string is a byte-array used to store text. Hence in many circumstances a string and a byte array are interchangeable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One important difference is in Flowcode strings terminate at a zero character. This means the first zero-value byte that is encountered in the string marks the end of the string. If a string contains the exact number of characters specified in the declaration it will not contain a terminating zero, in all other cases it will.&lt;br /&gt;
&lt;br /&gt;
===HANDLE===&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Range:&lt;br /&gt;
| Undefined&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;col&amp;quot; width=&amp;quot;50%&amp;quot;| Bit Depth:&lt;br /&gt;
| 32-bit unsigned value&lt;br /&gt;
|}&lt;br /&gt;
An object handle is used to reference a more complicated piece of data (such as a file, Flowcode component or block of text) whose internal format is not known. Flowcode provides many [[API Overview|simulation macros]] that use handles to easily pass data around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In an embedded context, a handle can be thought of as a pointer to memory, except Flowcode manages the handles so referencing a non-existent handle will not cause any fatal errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A handle value of zero is considered ''null'' and invalid to Flowcode.&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Internal_Oscillator&amp;diff=17601</id>
		<title>Internal Oscillator</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Internal_Oscillator&amp;diff=17601"/>
		<updated>2015-07-22T07:26:22Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;sidebar&amp;gt;Sidebar: Flowcode Help Overview:ChipSpecific&amp;lt;/sidebar&amp;gt;&lt;br /&gt;
A lot of the devices have an inbuilt oscillator which can be used to reduce the number of devices required to drive the microcontroller.&lt;br /&gt;
&lt;br /&gt;
The device datasheet should detail the type of oscillator available to the device.&lt;br /&gt;
&lt;br /&gt;
Here we have the datasheet for the PIC16F88 device listing the options available for the internal oscillator.&lt;br /&gt;
&lt;br /&gt;
[[File:16F88OscCon.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using a C code icon at the very top of the Main macro we can specify which speed the microcontroller should start-up with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To access a register using PIC use the register name in all lower case. e.g. &amp;quot;osccon&amp;quot; &lt;br /&gt;
&lt;br /&gt;
For the PIC 16 bit devices (dsPIC and PIC24) and AVR use the register name in all upper case. e.g. &amp;quot;OSCCON&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Remember to end the line of C code with a semicolon to mark the end of the instruction.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example to configure the internal oscillator to 8MHz on the PIC16F88.&lt;br /&gt;
&lt;br /&gt;
[[File:16F88IntOsc1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example to configure the internal oscillator to 1MHz on the PIC16F88.&lt;br /&gt;
&lt;br /&gt;
[[File:16F88IntOsc2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be sure to set the clock speed in the project options to the same speed to allow your delays and any communications baud rates to be correct.&lt;br /&gt;
&lt;br /&gt;
[[File:16F88IntOscProj.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The configuration settings will also need to be edited from the default HS type oscillator to the IntOsc setting.&lt;br /&gt;
&lt;br /&gt;
[[File:16F88IntOscConf.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A [[One second LED flasher]] test can be very useful to confirm if your device is actually running at the intended speed.&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=String_Manipulation_Functions&amp;diff=17600</id>
		<title>String Manipulation Functions</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=String_Manipulation_Functions&amp;diff=17600"/>
		<updated>2015-07-10T15:16:34Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;sidebar&amp;gt;Sidebar: Flowcode Help Overview:Functions&amp;lt;/sidebar&amp;gt;&lt;br /&gt;
:''See [[Calculation Icon Properties]]''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==String Functions==&lt;br /&gt;
&lt;br /&gt;
The String functions are a set of string manipulation functions that can be used to edit, change and examine the strings.&lt;br /&gt;
&lt;br /&gt;
To add a function, drag it into the calculation box. The user can then edit this base code with the variables required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin:auto; text-align:center;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Btn_Calculation.gif|border]]&lt;br /&gt;
| width=&amp;quot;50px&amp;quot; |&amp;amp;rarr; &lt;br /&gt;
|[[File:Gen_Calculation_Flowchart_Icon_01.png]] &lt;br /&gt;
|width=&amp;quot;50px&amp;quot; |&amp;amp;rarr; &lt;br /&gt;
|[[File:Gen_StringFunctions_01.jpg]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Strings used in explaining the functions below:&lt;br /&gt;
&lt;br /&gt;
Str1[10]&lt;br /&gt;
&lt;br /&gt;
Str2[10]&lt;br /&gt;
&lt;br /&gt;
TestStr[30]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Assignment and Concatenation===&lt;br /&gt;
&lt;br /&gt;
=&lt;br /&gt;
&lt;br /&gt;
To assign a string value to a string variable you can simply use the = character.&lt;br /&gt;
&lt;br /&gt;
Str1 = &amp;quot;Hello &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Str2 = &amp;quot;World&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
+ &lt;br /&gt;
&lt;br /&gt;
Concatenates the two string together in the order presented from left to right.&lt;br /&gt;
&lt;br /&gt;
If the resulting string is longer than the array size of the receiving string then any extra characters are lost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr = Str1 + Str2 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;Hello World&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Multiple concatenations are best done like this to avoid using excess memory. Note that each line contains only two values to be added together.&lt;br /&gt;
&lt;br /&gt;
TestStr = &amp;quot;Multiple &amp;quot; + Str1 &lt;br /&gt;
&lt;br /&gt;
TestStr = TestStr + Str2 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;Multiple Hello World&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a numeric value/variable to a string===&lt;br /&gt;
&lt;br /&gt;
'''ToString$(value)''' &lt;br /&gt;
&lt;br /&gt;
Changes the numeric value to a String.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr = ToStr$(1234) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;1234&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a string to upper case===&lt;br /&gt;
&lt;br /&gt;
'''ToUpper$(string)''' &lt;br /&gt;
&lt;br /&gt;
Changes all letters to upper case.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
TestStr = ToUpper$(Str1) &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
TestStr is now &amp;quot;HELLO &amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a string to lower case===&lt;br /&gt;
&lt;br /&gt;
'''ToLower$(string)''' &lt;br /&gt;
&lt;br /&gt;
Changes all letters to lower case.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
TestStr = ToLower$(Str1) &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
TestStr is now &amp;quot;hello &amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Finding the length of a string===&lt;br /&gt;
&lt;br /&gt;
'''Length$(string)''' &lt;br /&gt;
&lt;br /&gt;
Retrieves the length of the string.&lt;br /&gt;
&lt;br /&gt;
This is not the Array size, but the number of characters in the array before a Null character is encountered.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal = Length$(Str1)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal is now 6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Str1 array size is 20, but has a String of only 6 characters currently assigned to it hence the return value of 6.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===String subset - characters from the start of the string===&lt;br /&gt;
&lt;br /&gt;
'''Left$(string, size)''' &lt;br /&gt;
Retrieves a substring from the string of size characters starting from the leftmost character.&lt;br /&gt;
&lt;br /&gt;
If the length of the string used to store the result is less than size of the substring returned then any extra characters are lost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr = Left$(Str1, 3) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;Hel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===String subset - characters from the end of the string===&lt;br /&gt;
&lt;br /&gt;
'''Right$(string, size)''' &lt;br /&gt;
&lt;br /&gt;
Retrieves a substring from the string of size characters starting from the rightmost character.&lt;br /&gt;
&lt;br /&gt;
i.e. a size of 4 retrieves the 4 rightmost characters.&lt;br /&gt;
&lt;br /&gt;
If the length of the string used to store the result is less than size of the substring returned then any extra characters are lost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr = Right$(Str1, 3) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;lo &amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===String subset - characters from an arbitrary position in the string===&lt;br /&gt;
&lt;br /&gt;
'''Mid$(string, start, size)''' &lt;br /&gt;
&lt;br /&gt;
Retrieves a substring from the string starting at position start of size characters. The first character of the string is at position zero.&lt;br /&gt;
&lt;br /&gt;
If the length of the string used to store the result is less than size of the substring returned then any extra characters are lost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr = Mid$(Str1, 2, 3) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TestStr is now &amp;quot;llo&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===String comparisons===&lt;br /&gt;
&lt;br /&gt;
'''Compare$(string1, string2, compare_type)''' &lt;br /&gt;
&lt;br /&gt;
Compares the two strings, parameters 1 and 2, and returns a BYTE value corresponding to the following results:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0 = strings are identical&lt;br /&gt;
&lt;br /&gt;
1 = string1&amp;gt;string2&lt;br /&gt;
&lt;br /&gt;
255 = string2&amp;gt;string1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The 3rd parameter, compare_type,  determines whether or not the check is case sensitive. values for compare_type are:&lt;br /&gt;
&lt;br /&gt;
0 = case sensitive&lt;br /&gt;
&lt;br /&gt;
1 = case insensitive.&lt;br /&gt;
&lt;br /&gt;
Examples&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Str1 = &amp;quot;ABC&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Str2 = &amp;quot;abc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal = Compare$(Str1, Str2, 0) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal is now 255 as Str2 is later in the ASCII sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal = Compare$(Str1, Str2, 1) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal is now 0 as when case insensitive the two strings are identical.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Str2 = Str1&lt;br /&gt;
&lt;br /&gt;
RetVal = Compare$(Str1, Str2, 0) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RetVal is now 0 as both strings are identical.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a floating point value/variable to a string===&lt;br /&gt;
&lt;br /&gt;
'''FloatToString$( float )'''&lt;br /&gt;
&lt;br /&gt;
Converts a floating point number into a string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float = Floating point number to convert.&lt;br /&gt;
&lt;br /&gt;
string = String variable to hold the conversion data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string = FloatToString( float )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a numeric value/variable to a hex string===&lt;br /&gt;
&lt;br /&gt;
'''NumberToHex$( number )'''&lt;br /&gt;
&lt;br /&gt;
Converts a byte or int number into a hexadecimal string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
number = byte or integer number to convert.&lt;br /&gt;
&lt;br /&gt;
string = String variable to hold the conversion data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string = FloatToString( INT )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a string to a numeric value/variable===&lt;br /&gt;
&lt;br /&gt;
'''StringToInt$(string)'''&lt;br /&gt;
&lt;br /&gt;
Converts a string of numeric ASCII data into an integer numeric data value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string = String variable containing numeric ASCII data.&lt;br /&gt;
&lt;br /&gt;
returns numeric data from the string in decimal form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
number = StringToInt$( string ) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Converting a string into a floating point value/variable===&lt;br /&gt;
&lt;br /&gt;
'''StringToFloat$( string )'''&lt;br /&gt;
&lt;br /&gt;
Converts a string of numeric ASCII data into a floating point variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string = String variable containing numeric ASCII data.&lt;br /&gt;
&lt;br /&gt;
returns numeric data from the string in floating point form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float = StringToFloat$( string )&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Flash_EEPROM_component&amp;diff=16574</id>
		<title>Flash EEPROM component</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Flash_EEPROM_component&amp;diff=16574"/>
		<updated>2014-12-21T22:21:48Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;50%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | Author&lt;br /&gt;
| The-Box Development&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | Version&lt;br /&gt;
| 1.0&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | License&lt;br /&gt;
| BSD&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | Category&lt;br /&gt;
| Storage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[File:Flash-eeprom.png|Image]] Flash EEPROM component==&lt;br /&gt;
The Flash EEPROM component provides EEPROM emulation for PIC24 and dsPIC series controllers using Flash memory. &lt;br /&gt;
The component simulates persistence between runs using an external file to store the information.&lt;br /&gt;
&lt;br /&gt;
The component provides storage for 253 words of 16 bits (UINT).&lt;br /&gt;
&lt;br /&gt;
The component uses a wear leveling algorithm which requires 2 full 'erase' pages of memory. The 'erase' page size for a particular device&lt;br /&gt;
can be found in the data sheet. Look for the 'erase program memory block size', typically a value of 1536 or 3072 bytes (512 or 1536 words).&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' The component stores values in primary flash. This part of flash memory will be wiped when programming new code to the controller!&lt;br /&gt;
&lt;br /&gt;
==Downloadable macro reference==&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;tt&amp;gt;Initialise&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;===&lt;br /&gt;
Initialize the internal state of the component.&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
''No parameters''&lt;br /&gt;
&lt;br /&gt;
'''Return value'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|BYTE]]&lt;br /&gt;
The macro returns 0 when successful. Any value unequal 0 means failure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;tt&amp;gt;Read&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;===&lt;br /&gt;
Reads one word of 16 bits (UINT).&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|Byte]] ''address''&lt;br /&gt;
::The address to read the data from. The address should not exceed 253.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Return value'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|UINT]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;tt&amp;gt;Write&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;===&lt;br /&gt;
Write a 16 bit word (UINT) to memory.&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|BYTE]] ''address''&lt;br /&gt;
::The address to write the data to. The address should not exceed 253.&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|UINT]] ''value''&lt;br /&gt;
::The 16 bit value to store.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Return value'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|BYTE]]&lt;br /&gt;
The macro returns 0 when successful. Any value unequal 0 means failure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Simulation macro reference==&lt;br /&gt;
&lt;br /&gt;
''This component does not contain any simulation macros''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Property reference==&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;Simulation file&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This property is of type ''Filename''&lt;br /&gt;
&lt;br /&gt;
The name of the file to store data during simulation runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;Auto Address&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This property is of type ''True or false'' and can be referenced with the variable name ''AUTOADDR''.&lt;br /&gt;
&lt;br /&gt;
If set to 'Yes' the component will automatically allocate the required flash memory. If set to ''No'' the property ''Address''&lt;br /&gt;
should be set to a valid value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;Address&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This property is of type ''Unsigned Integer'' and can be referenced with the variable name ''FLASHADDRESS''.&lt;br /&gt;
&lt;br /&gt;
This property is only available if ''Auto Address'' is set to ''No''. Set to a valid address in flash memory beyond the&lt;br /&gt;
end address of the program. The value must be at the start of an 'erase' page and there should be at least two full 'erase' &lt;br /&gt;
pages of flash available after the address. Do not use this feature if you are unsure which address can safely be used.&lt;br /&gt;
&lt;br /&gt;
==Download==&lt;br /&gt;
The component can be downloaded from the [http://www.matrixtsl.com/mmforums/viewtopic.php?f=58&amp;amp;t=15932 Matrix user forum]&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Flash_EEPROM_component&amp;diff=16573</id>
		<title>Flash EEPROM component</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Flash_EEPROM_component&amp;diff=16573"/>
		<updated>2014-12-21T22:21:27Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;50%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | Author&lt;br /&gt;
| The-Box Development&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | Version&lt;br /&gt;
| 1.0&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | License&lt;br /&gt;
| BSD&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | Category&lt;br /&gt;
| Storage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[File:Flash-eeprom.png|Image]] Flash EEPROM component==&lt;br /&gt;
The Flash EEPROM component provides EEPROM emulation for PIC24 and dsPIC series controllers using Flash memory. &lt;br /&gt;
The component simulates persistence between runs using an external file to store the information.&lt;br /&gt;
&lt;br /&gt;
The component provides storage for 253 words of 16 bits (UINT).&lt;br /&gt;
&lt;br /&gt;
The component uses a wear leveling algorithm which requires 2 full 'erase' pages of memory. The 'erase' page size for a particular device&lt;br /&gt;
can be found in the data sheet. Look for the 'erase program memory block size', typically a value of 1536 or 3072 bytes (512 or 1536 words).&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' The component stores values in primary flash. This part of flash memory will be wiped when programming new code to the controller!&lt;br /&gt;
&lt;br /&gt;
==Downloadable macro reference==&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;tt&amp;gt;Initialise&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;===&lt;br /&gt;
Initialize the internal state of the component.&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
''No parameters''&lt;br /&gt;
&lt;br /&gt;
'''Return value'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|BYTE]]&lt;br /&gt;
The macro returns 0 when successful. Any value unequal 0 means failure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;tt&amp;gt;Read&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;===&lt;br /&gt;
Reads one word of 16 bits (UINT).&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|Byte]] ''address''&lt;br /&gt;
::The address to read the data from. The address should not exceed 253.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Return value'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|UINT]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;tt&amp;gt;Write&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;===&lt;br /&gt;
Write a 16 bit word (UINT) to memory.&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|BYTE]] ''address''&lt;br /&gt;
::The address to write the data to. The address should not exceed 253.&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|UINT]] ''value''&lt;br /&gt;
::The 16 bit value to store.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Return value'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|BYTE]]&lt;br /&gt;
The macro returns 0 when successful. Any value unequal 0 means failure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Simulation macro reference==&lt;br /&gt;
&lt;br /&gt;
''This component does not contain any simulation macros''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Property reference==&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;Simulation file&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This property is of type ''Filename''&lt;br /&gt;
&lt;br /&gt;
The name of the file to store data during simulation runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;Auto Address&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This property is of type ''True or false'' and can be referenced with the variable name ''AUTOADDR''.&lt;br /&gt;
&lt;br /&gt;
If set to 'Yes' the component will automatically allocate the required flash memory. If set to ''No'' the property ''Address''&lt;br /&gt;
should be set to a valid value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;Address&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This property is of type ''Unsigned Integer'' and can be referenced with the variable name ''FLASHADDRESS''.&lt;br /&gt;
&lt;br /&gt;
This property is only available if ''Auto Address'' is set to ''No''. Set to a valid address in flash memory beyond the&lt;br /&gt;
end address of the program. The value must be at the start of an 'erase' page and there should be at least two full 'erase' &lt;br /&gt;
pages of flash available after the address. Do not use this feature if you are unsure which address can safely be used.&lt;br /&gt;
&lt;br /&gt;
==Component==&lt;br /&gt;
The component can be downloaded from the [http://www.matrixtsl.com/mmforums/viewtopic.php?f=58&amp;amp;t=15932 Matrix user forum]&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Flash_EEPROM_component&amp;diff=16571</id>
		<title>Flash EEPROM component</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Flash_EEPROM_component&amp;diff=16571"/>
		<updated>2014-12-21T21:57:47Z</updated>

		<summary type="html">&lt;p&gt;Kersing: Flash EEPROM component&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;50%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | Author&lt;br /&gt;
| The-Box Development&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | Version&lt;br /&gt;
| 1.0&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | License&lt;br /&gt;
| BSD&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;20%&amp;quot; style=&amp;quot;color: gray;&amp;quot; | Category&lt;br /&gt;
| Storage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[File:Flash-eeprom.png|Image]] Flash EEPROM component==&lt;br /&gt;
The Flash EEPROM component provides EEPROM emulation for PIC24 and dsPIC series controllers using Flash memory. &lt;br /&gt;
The component simulates persistence between runs using an external file to store the information.&lt;br /&gt;
&lt;br /&gt;
The component provides storage for 253 words of 16 bits (UINT).&lt;br /&gt;
&lt;br /&gt;
The component uses a wear leveling algorithm which requires 2 full 'erase' pages of memory. The 'erase' page size for a particular device&lt;br /&gt;
can be found in the data sheet. Look for the 'erase program memory block size', typically a value of 1536 or 3072 bytes (512 or 1536 words).&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' The component stores values in primary flash. This part of flash memory will be wiped when programming new code to the controller!&lt;br /&gt;
&lt;br /&gt;
==Downloadable macro reference==&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;tt&amp;gt;Initialise&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;===&lt;br /&gt;
Initialize the internal state of the component.&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
''No parameters''&lt;br /&gt;
&lt;br /&gt;
'''Return value'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|BYTE]]&lt;br /&gt;
The macro returns 0 when successful. Any value unequal 0 means failure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;tt&amp;gt;Read&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;===&lt;br /&gt;
Reads one word of 16 bits (UINT).&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|Byte]] ''address''&lt;br /&gt;
::The address to read the data from. The address should not exceed 253.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Return value'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|UINT]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;tt&amp;gt;Write&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;===&lt;br /&gt;
Write a 16 bit word (UINT) to memory.&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|BYTE]] ''address''&lt;br /&gt;
::The address to write the data to. The address should not exceed 253.&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|UINT]] ''value''&lt;br /&gt;
::The 16 bit value to store.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Return value'''&lt;br /&gt;
&lt;br /&gt;
:[[Variable Types|BYTE]]&lt;br /&gt;
The macro returns 0 when successful. Any value unequal 0 means failure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Simulation macro reference==&lt;br /&gt;
&lt;br /&gt;
''This component does not contain any simulation macros''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Property reference==&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;Simulation file&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This property is of type ''Filename''&lt;br /&gt;
&lt;br /&gt;
The name of the file to store data during simulation runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;Auto Address&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This property is of type ''True or false'' and can be referenced with the variable name ''AUTOADDR''.&lt;br /&gt;
&lt;br /&gt;
If set to 'Yes' the component will automatically allocate the required flash memory. If set to ''No'' the property ''Address''&lt;br /&gt;
should be set to a valid value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-weight: normal;&amp;quot;&amp;gt;&amp;lt;u&amp;gt;Address&amp;lt;/u&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This property is of type ''Unsigned Integer'' and can be referenced with the variable name ''FLASHADDRESS''.&lt;br /&gt;
&lt;br /&gt;
This property is only available if ''Auto Address'' is set to ''No''. Set to a valid address in flash memory beyond the&lt;br /&gt;
end address of the program. The value must be at the start of an 'erase' page and there should be at least two full 'erase' &lt;br /&gt;
pages of flash available after the address. Do not use this feature if you are unsure which address can safely be used.&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=File:Flash-eeprom.png&amp;diff=16570</id>
		<title>File:Flash-eeprom.png</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=File:Flash-eeprom.png&amp;diff=16570"/>
		<updated>2014-12-21T21:21:48Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=DLL_Support&amp;diff=16557</id>
		<title>DLL Support</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=DLL_Support&amp;diff=16557"/>
		<updated>2014-11-24T23:25:58Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;sidebar&amp;gt;Sidebar: Flowcode Help Overview:Simulation&amp;lt;/sidebar&amp;gt;&lt;br /&gt;
==DLLs included with Flowcode==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A DLL or Dynamic Link Library is a common way of wrapping a set of software functions up into a library that can be called by an application. They are usually created to allow programs to do certain tasks without having to rewrite the task and re-compile the code each time. In Windows there are DLL calls to allow you to create and control application windows, play and record audio as well as a whole host of other things.&lt;br /&gt;
&lt;br /&gt;
Some of the components that are packaged with Flowcode already come with their own DLL files built in to allow the components to do things like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Collect the system time and date - [[Component:_Injector_(GPS_NMEA)_(Simulation)|GPS NMEA Data Injector Component]]&lt;br /&gt;
&lt;br /&gt;
Synthesize speech - [[Component:_Speech_(Outputs)|Speech Component]]&lt;br /&gt;
&lt;br /&gt;
Communicate over USB - [[Component:_USB_Serial_(Comms)|USB Serial]], [[Component:_USB_Slave_(Comms)|USB Slave]], [[Component:_USB_HID_(Comms)|USB HID]]&lt;br /&gt;
&lt;br /&gt;
Communicate over MIDI - [[Component:_MIDI_(Comms)|Midi Component]]&lt;br /&gt;
&lt;br /&gt;
Communicate over a COM port - [[Component:_COM_Port_(Advanced)|COM Port Component]]&lt;br /&gt;
&lt;br /&gt;
Communicate over a network - [[Component:_TCP_Base_(Comms)|TCPIP Base Component]]&lt;br /&gt;
&lt;br /&gt;
Talk to existing third party hardware - [[Component:_K8055D_(Simulation)|Vellemann KS0108]], [[Component:_PS2000_(Simulation)|Pico Scope 2000 series]], [[Component:_MIAC_USB_Slave_(MIAC_Module)|MIAC USB Slave]]&lt;br /&gt;
&lt;br /&gt;
==Adding your own DLL calls into Flowcode==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A DLL can easily be added to your program using the standard macro interface.&lt;br /&gt;
&lt;br /&gt;
Start by placing the DLL file into a known location on your computer. A good place for stable DLL files is inside the &amp;quot;Flowcode v6/Components/DLL&amp;quot; folder or in the same folder as the Flowcode project file for portability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:DLLMacro.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The syntax looks like this - (DLL Function Name) : (DLL Type) [(Path to DLL)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
'''ReadTime:DLLs[$(appdir)components/dll/DateTime.dll]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DLL Function name is the name of the function in the DLL you are trying to call, if the call cannot be found then the component debugger window will display the error.&lt;br /&gt;
&lt;br /&gt;
DLL Type is the type of DLL, there is &amp;quot;DLLs&amp;quot; which is a standard type DLL and &amp;quot;DLLc&amp;quot; which is an alternative custom style DLL.&lt;br /&gt;
&lt;br /&gt;
Path to DLL is the file path on your system, [$(appdir)components/dll/DLLNAME.dll] can be used for the Components/DLL directory [$(srcdir)DLLNAME.dll] can be used for the project directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you don't already know the explicit DLL function names then they can be found by using a tool like [http://www.nirsoft.net/utils/dll_export_viewer.html DLL Export Viewer] to see inside the DLL file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The DLL based macro appears like this in the [[Project_Explorer|Project explorer pane]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:DLLPane.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The DLL based macro can then be called as part of your program just like any other macro or component macro. &lt;br /&gt;
&lt;br /&gt;
The DLL call can even be wrapped up inside a component macro call as part of the component export process using the [[Interface_Manager#Interface_Manager|Interface manager]]. By specifying the macro as a simulation macro a user using your exported component can easily see that this is a macro that cannot be downloaded to an embedded target.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:DLLFunc.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating your own DLLs==&lt;br /&gt;
&lt;br /&gt;
You can create your own DLLs to suit your requirements by using free to use applications such as Microsoft Visual Studio. &lt;br /&gt;
&lt;br /&gt;
A guide on creating a DLL in visual studio can be found here: [[Create a dll]]&amp;lt;br&amp;gt;&lt;br /&gt;
Or a more generic example (resulting DLL is not directly compatible): [http://msdn.microsoft.com/en-us/library/ms235636.aspx Walkthrough: Creating and Using a Dynamic Link Library (C++)]&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Create_a_dll&amp;diff=16556</id>
		<title>Create a dll</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Create_a_dll&amp;diff=16556"/>
		<updated>2014-11-23T14:47:45Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flowcode 6 allows the use of DLLs in simulation. This page explains a possible way to create your own DLL for use with Flowcode.&lt;br /&gt;
&lt;br /&gt;
==Requirements:==&lt;br /&gt;
To create a DLL a compiler is required. Microsoft provides [http://www.visualstudio.com/products/visual-studio-community-vs Visual Studio Community edition] for free (certain restrictions apply, see the FAQ on the page). The installer is relatively small, however it will download and install all required software which (depending on your internet connection) might take considerable time.&lt;br /&gt;
&lt;br /&gt;
This walkthrough assumes the reader is familiar with the C language as the code for the DLL will be written in C.&lt;br /&gt;
&lt;br /&gt;
==Create a DLL project==&lt;br /&gt;
All code and associated settings in Visual Studio are stored inside a project. As we are creating a DLL we need to appropriate project.&lt;br /&gt;
&lt;br /&gt;
# From the ''FILE'' menu, select ''New''-&amp;gt;''Project''.&lt;br /&gt;
# In the left pane, select ''Installed'', ''Templates'', ''Visual C++'', ''Win32''. In the right pane select ''Win32 Console Application''&lt;br /&gt;
# In the bottom pane enter the name for the application and a solution name. We will use 'DemoDLL' for the ''Name'' and 'DynamicLibraries' for the ''Solution Name''.&amp;lt;br&amp;gt;[[File:Project-DLL.png|640px]]&lt;br /&gt;
# Choose the ''OK'' button to create the project. This opens the ''Win32 Application Wizard''. Choose the ''Next'' button on the first page of the wizard.&lt;br /&gt;
# On the ''Application Settings'' page, select ''DLL'' and choose the ''Finish'' button.&amp;lt;br&amp;gt;[[File:Wizard-app.png|480px]]&lt;br /&gt;
&lt;br /&gt;
==Add code to the project==&lt;br /&gt;
For this demonstration we will implement a few simple functions to show how various data types are passed between Flowcode and the DLL.&lt;br /&gt;
&lt;br /&gt;
The functions are:&lt;br /&gt;
# unsigned char GetCounter() - Returns the current counter value (0-255) and increments it&lt;br /&gt;
# ResetCounter() - Resets the counter to zero&lt;br /&gt;
# bool GetCounterString(TCHAR *string, DWORD size) - Returns the current counter value as a string&lt;br /&gt;
&lt;br /&gt;
First we create a new file with the definitions of the functions:&lt;br /&gt;
# In ''PROJECT'' choose menu item ''Add New Item''.&lt;br /&gt;
# In the left pane, select ''Installed'', ''Visual C++'', ''Code''. In the right pane select ''Header File (.h)''.&lt;br /&gt;
# At the bottom, enter a usefull ''Name''. We will use ''DemoDLLDefs.h'', next choose the ''Add'' button.&amp;lt;br&amp;gt;[[File:Include-file.png|480px]]&lt;br /&gt;
# Add the following code to the file and save:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #ifdef DEMODLL_EXPORTS&lt;br /&gt;
 #define DEMODLL_API __declspec(dllexport)&lt;br /&gt;
 #else&lt;br /&gt;
 #define DEMODLL_API __declspec(dllimport)&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 extern &amp;quot;C&amp;quot; {&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 	DEMODLL_API unsigned char GetCounter();&lt;br /&gt;
 	DEMODLL_API void ResetCounter();&lt;br /&gt;
 	DEMODLL_API bool GetCounterString(TCHAR *str, DWORD size);&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 }&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While creating the project Visual Studio automatically created a define for the symbol ''DEMODLL_EXPORTS''. In the definitions it is used to select the dllexport specification when compiling the DLL code. The ''extern &amp;quot;C&amp;quot;'' code is added to make sure the compiler generates code using the correct calling convention. (C uses plain names, C++ adds information to functions to allow for overloading)&lt;br /&gt;
&lt;br /&gt;
Next a couple of project options need to be set:&lt;br /&gt;
# Select ''DemoDLL Properties'' in the ''PROJECT'' menu.&lt;br /&gt;
# In the ''Configuration'' drop down select ''All Configurations''&lt;br /&gt;
# Set the ''Character Set'' to ''Not Set''&lt;br /&gt;
## In the left pane select ''Configuration Properties'', ''General''&lt;br /&gt;
## Select the drop down to the right of ''Character Set'', select ''Not Set''.&lt;br /&gt;
## Choose the ''Apply'' button&amp;lt;br&amp;gt;[[File:Options-charset.png|480px]]&lt;br /&gt;
# Allow use of less secure string manipulation functions:&lt;br /&gt;
## In the left pane select ''Configuration Properties'', ''C/C++'', ''Preprocessor''.&lt;br /&gt;
## Modify the ''Preprocessor Definitions'', include ''_CRT_SECURE_NO_WARNINGS;'' between ''WIN32;'' and ''&amp;lt;different options&amp;gt;''.&lt;br /&gt;
## Click outside the definitions line and choose the ''OK'' button.&amp;lt;br&amp;gt;[[File:Options-preprocessor.png|480px]]&lt;br /&gt;
&lt;br /&gt;
Finally we implement the functions.&lt;br /&gt;
# Open the ''DemoDLL.cpp'' tab.&lt;br /&gt;
# Add the following code and save:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #include &amp;quot;stdafx.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;DemoDLLDefs.h&amp;quot;&lt;br /&gt;
 #include &amp;lt;tchar.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 extern &amp;quot;C&amp;quot; {&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 	static unsigned char counter = 0;&lt;br /&gt;
 &lt;br /&gt;
 	unsigned char GetCounter()&lt;br /&gt;
 	{&lt;br /&gt;
 		return counter++;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	void ResetCounter()&lt;br /&gt;
 	{&lt;br /&gt;
 		counter = 0;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	bool GetCounterString(TCHAR *str, DWORD size)&lt;br /&gt;
 	{&lt;br /&gt;
 		DWORD required = 0;&lt;br /&gt;
 		TCHAR buffer[40];&lt;br /&gt;
 &lt;br /&gt;
 		_stprintf(buffer, &amp;quot;%d&amp;quot;, counter);&lt;br /&gt;
 &lt;br /&gt;
 		required = _tcslen(buffer);&lt;br /&gt;
 		if (IsBadWritePtr(str, required))&lt;br /&gt;
 		{&lt;br /&gt;
 			SetLastError(ERROR_INSUFFICIENT_BUFFER);&lt;br /&gt;
 			return FALSE;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		_tcsncpy(str, buffer,size - 1);&lt;br /&gt;
 		return TRUE;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 }&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Compilation &amp;amp; Installation ==&lt;br /&gt;
The everything required has now been created. The next step is to compile the code:&lt;br /&gt;
# At the top of the screen, just below the menu bar there is a drop down ''Debug''. Select the down arrow and choose ''Release''.&lt;br /&gt;
# In the ''BUILD'' menu choose ''Build Solution''.&lt;br /&gt;
# After successful compilation the output window at the bottom of the screen should list something like ''DemoDLL.vcxproj -&amp;gt; C:\Users\kersing\Documents\Visual Studio 2013\Projects\DynamicLibraries\Release\DemoDLL.dll''.&lt;br /&gt;
# Browse to the directory listed in the output window and copy the file ''DemoDLL.dll'' to the ''Components\dll' folder of your Flowcode installation. (Usually ''C:\Program Files (x86)\Flowcode 6\Components\dll'')&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
Use [[media:Demo.fcfx|Demo.fcfx]] to test your newly created DLL. Output will appear in the ''Component Debugger'' window (open from the ''View'' menu if not already open).&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=File:Options-charset.png&amp;diff=16553</id>
		<title>File:Options-charset.png</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=File:Options-charset.png&amp;diff=16553"/>
		<updated>2014-11-23T14:39:23Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=File:Options-preprocessor.png&amp;diff=16554</id>
		<title>File:Options-preprocessor.png</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=File:Options-preprocessor.png&amp;diff=16554"/>
		<updated>2014-11-23T14:39:23Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=File:Demo.fcfx&amp;diff=16555</id>
		<title>File:Demo.fcfx</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=File:Demo.fcfx&amp;diff=16555"/>
		<updated>2014-11-23T14:39:23Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Create_a_dll&amp;diff=16552</id>
		<title>Create a dll</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Create_a_dll&amp;diff=16552"/>
		<updated>2014-11-23T14:36:34Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==!!This page is a work in progress!!==&lt;br /&gt;
&lt;br /&gt;
Flowcode 6 allows the use of DLLs in simulation. This page explains a possible way to create your own DLL for use with Flowcode.&lt;br /&gt;
&lt;br /&gt;
==Requirements:==&lt;br /&gt;
To create a DLL a compiler is required. Microsoft provides [http://www.visualstudio.com/products/visual-studio-community-vs Visual Studio Community edition] for free (certain restrictions apply, see the FAQ on the page). The installer is relatively small, however it will download and install all required software which (depending on your internet connection) might take considerable time.&lt;br /&gt;
&lt;br /&gt;
This walkthrough assumes the reader is familiar with the C language as the code for the DLL will be written in C.&lt;br /&gt;
&lt;br /&gt;
==Create a DLL project==&lt;br /&gt;
All code and associated settings in Visual Studio are stored inside a project. As we are creating a DLL we need to appropriate project.&lt;br /&gt;
&lt;br /&gt;
# From the ''FILE'' menu, select ''New''-&amp;gt;''Project''.&lt;br /&gt;
# In the left pane, select ''Installed'', ''Templates'', ''Visual C++'', ''Win32''. In the right pane select ''Win32 Console Application''&lt;br /&gt;
# In the bottom pane enter the name for the application and a solution name. We will use 'DemoDLL' for the ''Name'' and 'DynamicLibraries' for the ''Solution Name''.&amp;lt;br&amp;gt;[[File:Project-DLL.png|640px]]&lt;br /&gt;
# Choose the ''OK'' button to create the project. This opens the ''Win32 Application Wizard''. Choose the ''Next'' button on the first page of the wizard.&lt;br /&gt;
# On the ''Application Settings'' page, select ''DLL'' and choose the ''Finish'' button.&amp;lt;br&amp;gt;[[File:Wizard-app.png|480px]]&lt;br /&gt;
&lt;br /&gt;
==Add code to the project==&lt;br /&gt;
For this demonstration we will implement a few simple functions to show how various data types are passed between Flowcode and the DLL.&lt;br /&gt;
&lt;br /&gt;
The functions are:&lt;br /&gt;
# unsigned char GetCounter() - Returns the current counter value (0-255) and increments it&lt;br /&gt;
# ResetCounter() - Resets the counter to zero&lt;br /&gt;
# bool GetCounterString(TCHAR *string, DWORD size) - Returns the current counter value as a string&lt;br /&gt;
&lt;br /&gt;
First we create a new file with the definitions of the functions:&lt;br /&gt;
# In ''PROJECT'' choose menu item ''Add New Item''.&lt;br /&gt;
# In the left pane, select ''Installed'', ''Visual C++'', ''Code''. In the right pane select ''Header File (.h)''.&lt;br /&gt;
# At the bottom, enter a usefull ''Name''. We will use ''DemoDLLDefs.h'', next choose the ''Add'' button.&amp;lt;br&amp;gt;[[File:Include-file.png|480px]]&lt;br /&gt;
# Add the following code to the file and save:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #ifdef DEMODLL_EXPORTS&lt;br /&gt;
 #define DEMODLL_API __declspec(dllexport)&lt;br /&gt;
 #else&lt;br /&gt;
 #define DEMODLL_API __declspec(dllimport)&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 extern &amp;quot;C&amp;quot; {&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 	DEMODLL_API unsigned char GetCounter();&lt;br /&gt;
 	DEMODLL_API void ResetCounter();&lt;br /&gt;
 	DEMODLL_API bool GetCounterString(TCHAR *str, DWORD size);&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 }&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While creating the project Visual Studio automatically created a define for the symbol ''DEMODLL_EXPORTS''. In the definitions it is used to select the dllexport specification when compiling the DLL code. The ''extern &amp;quot;C&amp;quot;'' code is added to make sure the compiler generates code using the correct calling convention. (C uses plain names, C++ adds information to functions to allow for overloading)&lt;br /&gt;
&lt;br /&gt;
Next a couple of project options need to be set:&lt;br /&gt;
# Select ''DemoDLL Properties'' in the ''PROJECT'' menu.&lt;br /&gt;
# In the ''Configuration'' drop down select ''All Configurations''&lt;br /&gt;
# Set the ''Character Set'' to ''Not Set''&lt;br /&gt;
## In the left pane select ''Configuration Properties'', ''General''&lt;br /&gt;
## Select the drop down to the right of ''Character Set'', select ''Not Set''.&lt;br /&gt;
## Choose the ''Apply'' button&lt;br /&gt;
# Allow use of less secure string manipulation functions:&lt;br /&gt;
## In the left pane select ''Configuration Properties'', ''C/C++'', ''Preprocessor''.&lt;br /&gt;
## Modify the ''Preprocessor Definitions'', include ''_CRT_SECURE_NO_WARNINGS;'' between ''WIN32;'' and ''&amp;lt;different options&amp;gt;''.&lt;br /&gt;
## Click outside the definitions line and choose the ''OK'' button.&lt;br /&gt;
&lt;br /&gt;
Finally we implement the functions.&lt;br /&gt;
# Open the ''DemoDLL.cpp'' tab.&lt;br /&gt;
# Add the following code and save:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #include &amp;quot;stdafx.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;DemoDLLDefs.h&amp;quot;&lt;br /&gt;
 #include &amp;lt;tchar.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 extern &amp;quot;C&amp;quot; {&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 	static unsigned char counter = 0;&lt;br /&gt;
 &lt;br /&gt;
 	unsigned char GetCounter()&lt;br /&gt;
 	{&lt;br /&gt;
 		return counter++;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	void ResetCounter()&lt;br /&gt;
 	{&lt;br /&gt;
 		counter = 0;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	bool GetCounterString(TCHAR *str, DWORD size)&lt;br /&gt;
 	{&lt;br /&gt;
 		DWORD required = 0;&lt;br /&gt;
 		TCHAR buffer[40];&lt;br /&gt;
 &lt;br /&gt;
 		_stprintf(buffer, &amp;quot;%d&amp;quot;, counter);&lt;br /&gt;
 &lt;br /&gt;
 		required = _tcslen(buffer);&lt;br /&gt;
 		if (IsBadWritePtr(str, required))&lt;br /&gt;
 		{&lt;br /&gt;
 			SetLastError(ERROR_INSUFFICIENT_BUFFER);&lt;br /&gt;
 			return FALSE;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		_tcsncpy(str, buffer,size - 1);&lt;br /&gt;
 		return TRUE;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 }&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Compilation &amp;amp; Installation ==&lt;br /&gt;
The everything required has now been created. The next step is to compile the code:&lt;br /&gt;
# At the top of the screen, just below the menu bar there is a drop down ''Debug''. Select the down arrow and choose ''Release''.&lt;br /&gt;
# In the ''BUILD'' menu choose ''Build Solution''.&lt;br /&gt;
# After successful compilation the output window at the bottom of the screen should list something like ''DemoDLL.vcxproj -&amp;gt; C:\Users\kersing\Documents\Visual Studio 2013\Projects\DynamicLibraries\Release\DemoDLL.dll''.&lt;br /&gt;
# Browse to the directory listed in the output window and copy the file ''DemoDLL.dll'' to the ''Components\dll' folder of your Flowcode installation. (Usually ''C:\Program Files (x86)\Flowcode 6\Components\dll'')&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=File:Include-file.png&amp;diff=16551</id>
		<title>File:Include-file.png</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=File:Include-file.png&amp;diff=16551"/>
		<updated>2014-11-23T14:26:15Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=File:Wizard-app.png&amp;diff=16550</id>
		<title>File:Wizard-app.png</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=File:Wizard-app.png&amp;diff=16550"/>
		<updated>2014-11-23T14:26:14Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=File:Project-DLL.png&amp;diff=16549</id>
		<title>File:Project-DLL.png</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=File:Project-DLL.png&amp;diff=16549"/>
		<updated>2014-11-23T14:25:18Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Create_a_dll&amp;diff=16548</id>
		<title>Create a dll</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Create_a_dll&amp;diff=16548"/>
		<updated>2014-11-23T14:10:40Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==!!This page is a work in progress!!==&lt;br /&gt;
&lt;br /&gt;
Flowcode 6 allows the use of DLLs in simulation. This page explains a possible way to create your own DLL for use with Flowcode.&lt;br /&gt;
&lt;br /&gt;
==Requirements:==&lt;br /&gt;
To create a DLL a compiler is required. Microsoft provides [http://www.visualstudio.com/products/visual-studio-community-vs Visual Studio Community edition] for free (certain restrictions apply, see the FAQ on the page). The installer is relatively small, however it will download and install all required software which (depending on your internet connection) might take considerable time.&lt;br /&gt;
&lt;br /&gt;
This walkthrough assumes the reader is familiar with the C language as the code for the DLL will be written in C.&lt;br /&gt;
&lt;br /&gt;
==Create a DLL project==&lt;br /&gt;
All code and associated settings in Visual Studio are stored inside a project. As we are creating a DLL we need to appropriate project.&lt;br /&gt;
&lt;br /&gt;
# From the ''FILE'' menu, select ''New''-&amp;gt;''Project''.&lt;br /&gt;
# In the left pane, select ''Installed'', ''Templates'', ''Visual C++'', ''Win32''. In the right pane select ''Win32 Console Application''&lt;br /&gt;
# In the bottom pane enter the name for the application and a solution name. We will use 'DemoDLL' for the ''Name'' and 'DynamicLibraries' for the ''Solution Name''.&lt;br /&gt;
# Choose the ''OK'' button to create the project. This opens the ''Win32 Application Wizard''. Choose the ''Next'' button on the first page of the wizard.&lt;br /&gt;
# On the ''Application Settings'' page, select ''DLL'' and choose the ''Finish'' button.&lt;br /&gt;
&lt;br /&gt;
==Add code to the project==&lt;br /&gt;
For this demonstration we will implement a few simple functions to show how various data types are passed between Flowcode and the DLL.&lt;br /&gt;
&lt;br /&gt;
The functions are:&lt;br /&gt;
# unsigned char GetCounter() - Returns the current counter value (0-255) and increments it&lt;br /&gt;
# ResetCounter() - Resets the counter to zero&lt;br /&gt;
# bool GetCounterString(TCHAR *string, DWORD size) - Returns the current counter value as a string&lt;br /&gt;
&lt;br /&gt;
First we create a new file with the definitions of the functions:&lt;br /&gt;
# In ''PROJECT'' choose menu item ''Add New Item''.&lt;br /&gt;
# In the left pane, select ''Installed'', ''Visual C++'', ''Code''. In the right pane select ''Header File (.h)''.&lt;br /&gt;
# At the bottom, enter a usefull ''Name''. We will use ''DemoDLLDefs.h'', next choose the ''Add'' button.&lt;br /&gt;
# Add the following code to the file and save:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #ifdef DEMODLL_EXPORTS&lt;br /&gt;
 #define DEMODLL_API __declspec(dllexport)&lt;br /&gt;
 #else&lt;br /&gt;
 #define DEMODLL_API __declspec(dllimport)&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 extern &amp;quot;C&amp;quot; {&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 	DEMODLL_API unsigned char GetCounter();&lt;br /&gt;
 	DEMODLL_API void ResetCounter();&lt;br /&gt;
 	DEMODLL_API bool GetCounterString(TCHAR *str, DWORD size);&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 }&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While creating the project Visual Studio automatically created a define for the symbol ''DEMODLL_EXPORTS''. In the definitions it is used to select the dllexport specification when compiling the DLL code. The ''extern &amp;quot;C&amp;quot;'' code is added to make sure the compiler generates code using the correct calling convention. (C uses plain names, C++ adds information to functions to allow for overloading)&lt;br /&gt;
&lt;br /&gt;
Next a couple of project options need to be set:&lt;br /&gt;
# Select ''DemoDLL Properties'' in the ''PROJECT'' menu.&lt;br /&gt;
# In the ''Configuration'' drop down select ''All Configurations''&lt;br /&gt;
# Set the ''Character Set'' to ''Not Set''&lt;br /&gt;
## In the left pane select ''Configuration Properties'', ''General''&lt;br /&gt;
## Select the drop down to the right of ''Character Set'', select ''Not Set''.&lt;br /&gt;
## Choose the ''Apply'' button&lt;br /&gt;
# Allow use of less secure string manipulation functions:&lt;br /&gt;
## In the left pane select ''Configuration Properties'', ''C/C++'', ''Preprocessor''.&lt;br /&gt;
## Modify the ''Preprocessor Definitions'', include ''_CRT_SECURE_NO_WARNINGS;'' between ''WIN32;'' and ''&amp;lt;different options&amp;gt;''.&lt;br /&gt;
## Click outside the definitions line and choose the ''OK'' button.&lt;br /&gt;
&lt;br /&gt;
Finally we implement the functions.&lt;br /&gt;
# Open the ''DemoDLL.cpp'' tab.&lt;br /&gt;
# Add the following code and save:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #include &amp;quot;stdafx.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;DemoDLLDefs.h&amp;quot;&lt;br /&gt;
 #include &amp;lt;tchar.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 extern &amp;quot;C&amp;quot; {&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 	static unsigned char counter = 0;&lt;br /&gt;
 &lt;br /&gt;
 	unsigned char GetCounter()&lt;br /&gt;
 	{&lt;br /&gt;
 		return counter++;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	void ResetCounter()&lt;br /&gt;
 	{&lt;br /&gt;
 		counter = 0;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	bool GetCounterString(TCHAR *str, DWORD size)&lt;br /&gt;
 	{&lt;br /&gt;
 		DWORD required = 0;&lt;br /&gt;
 		TCHAR buffer[40];&lt;br /&gt;
 &lt;br /&gt;
 		_stprintf(buffer, &amp;quot;%d&amp;quot;, counter);&lt;br /&gt;
 &lt;br /&gt;
 		required = _tcslen(buffer);&lt;br /&gt;
 		if (IsBadWritePtr(str, required))&lt;br /&gt;
 		{&lt;br /&gt;
 			SetLastError(ERROR_INSUFFICIENT_BUFFER);&lt;br /&gt;
 			return FALSE;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		_tcsncpy(str, buffer,size - 1);&lt;br /&gt;
 		return TRUE;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 #ifdef __cplusplus&lt;br /&gt;
 }&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Compilation &amp;amp; Installation ==&lt;br /&gt;
The everything required has now been created. The next step is to compile the code:&lt;br /&gt;
# At the top of the screen, just below the menu bar there is a drop down ''Debug''. Select the down arrow and choose ''Release''.&lt;br /&gt;
# In the ''BUILD'' menu choose ''Build Solution''.&lt;br /&gt;
# After successful compilation the output window at the bottom of the screen should list something like ''DemoDLL.vcxproj -&amp;gt; C:\Users\kersing\Documents\Visual Studio 2013\Projects\DynamicLibraries\Release\DemoDLL.dll''.&lt;br /&gt;
# Browse to the directory listed in the output window and copy the file ''DemoDLL.dll'' to the ''Components\dll' folder of your Flowcode installation. (Usually ''C:\Program Files (x86)\Flowcode 6\Components\dll'')&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Create_a_dll&amp;diff=16547</id>
		<title>Create a dll</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Create_a_dll&amp;diff=16547"/>
		<updated>2014-11-23T11:55:08Z</updated>

		<summary type="html">&lt;p&gt;Kersing: Created page with &amp;quot;==!!This page is a work in progress!!==  Flowcode 6 allows the use of DLLs in simulation. This page explains a possible way to create your own DLL for use with Flowcode.  ==Re...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==!!This page is a work in progress!!==&lt;br /&gt;
&lt;br /&gt;
Flowcode 6 allows the use of DLLs in simulation. This page explains a possible way to create your own DLL for use with Flowcode.&lt;br /&gt;
&lt;br /&gt;
==Requirements:==&lt;br /&gt;
To create a DLL a compiler is required. Microsoft provides [http://www.visualstudio.com/products/visual-studio-community-vs Visual Studio Community edition] for free (certain restrictions apply, see the FAQ on the page). The installer is relatively small, however it will download and install all required software which (depending on your internet connection) might take considerable time.&lt;br /&gt;
&lt;br /&gt;
This walkthrough assumes the reader is familiar with the C language as the code for the DLL will be written in C.&lt;br /&gt;
&lt;br /&gt;
==Create a DLL project==&lt;br /&gt;
All code and associated settings in Visual Studio are stored inside a project. As we are creating a DLL we need to appropriate project.&lt;br /&gt;
&lt;br /&gt;
# From the ''FILE'' menu, select ''New''-&amp;gt;''Project''.&lt;br /&gt;
# In the left pane, select ''Installed'', ''Templates'', ''Visual C++'', ''Win32''. In the right pane select ''Win32 Console Application''&lt;br /&gt;
# In the bottom pane enter the name for the application and a solution name. We will use 'DemoDLL' for the ''Name'' and 'DynamicLibraries' for the ''Solution Name''.&lt;br /&gt;
# Choose the ''OK'' button to create the project. This opens the ''Win32 Application Wizard''. Choose the ''Next'' button on the first page of the wizard.&lt;br /&gt;
# On the ''Application Settings'' page, select ''DLL'' and choose the ''Finish'' button.&lt;br /&gt;
&lt;br /&gt;
==Add code to the project==&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Sidebar:_Flowcode_Help_Overview:ComponentCreation&amp;diff=15496</id>
		<title>Sidebar: Flowcode Help Overview:ComponentCreation</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Sidebar:_Flowcode_Help_Overview:ComponentCreation&amp;diff=15496"/>
		<updated>2014-09-20T10:28:18Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Navigation&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** Flowcode_Help_Overview|Flowcode Help&lt;br /&gt;
** Usage_Cases|Usage Cases&lt;br /&gt;
** Concepts|Concepts&lt;br /&gt;
** Learning_To_Program|Learning To Program&lt;br /&gt;
** Components|Component Help&lt;br /&gt;
** Simulation_Functionality|Simulation Functionality&lt;br /&gt;
*SEARCH&lt;br /&gt;
*Flowcode help&lt;br /&gt;
** New_in_Version_6|Version 6&lt;br /&gt;
** Activating_Flowcode|Getting Started&lt;br /&gt;
** Icon_Properties|Flowcharts&lt;br /&gt;
** Creating_a_New_Macro|Macros&lt;br /&gt;
** Mathematical_Functions|Functions&lt;br /&gt;
** Creating_Variables|Variables&lt;br /&gt;
** Panels_Where_And_Why|Panels&lt;br /&gt;
** Tools_and_Views|Tools and Views&lt;br /&gt;
** Common_Components|Components&lt;br /&gt;
** Component_Creation|Component Creation&lt;br /&gt;
** Starting_Flowchart_Simulation|Simulation&lt;br /&gt;
** Compiling_a_Flowchart_to_a_Chip|Chip Specifics&lt;br /&gt;
** Frequently_Asked_Questions|Support&lt;br /&gt;
*Component Creation&lt;br /&gt;
** Creating_a_Property|Creating a Property&lt;br /&gt;
** Panel_Managers|Panel Managers&lt;br /&gt;
** Assigning_Code_to_an_Existing_Component|Overriding an Existing Component&lt;br /&gt;
** Base_Components|Base Components&lt;br /&gt;
** Using_A_Base_Component|Using A Base Component&lt;br /&gt;
&lt;br /&gt;
[[Category:Sidebar]]&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Help:Component_Creation&amp;diff=15494</id>
		<title>Help:Component Creation</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Help:Component_Creation&amp;diff=15494"/>
		<updated>2014-09-20T10:27:20Z</updated>

		<summary type="html">&lt;p&gt;Kersing: Kersing moved page Component Creation to Help:Component Creation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Component Creation ==&lt;br /&gt;
&lt;br /&gt;
Starting with Flowcode 6, users can easily create new components. A new component is basically a Flowcode program, with macros to implement the functionality required for the component. Flowcode 6 components can include simulation as well. Simulation is implemented using macros as well.&lt;br /&gt;
&lt;br /&gt;
A typical component will include at least an initialization macro and a graphic element to represent the component on a panel.&lt;br /&gt;
&lt;br /&gt;
New components can be build from scratch or build on existing components.&lt;br /&gt;
&lt;br /&gt;
The [[Exercises]] page contains examples on component creation at the bottom of the page.&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Component_Creation&amp;diff=15495</id>
		<title>Component Creation</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Component_Creation&amp;diff=15495"/>
		<updated>2014-09-20T10:27:20Z</updated>

		<summary type="html">&lt;p&gt;Kersing: Kersing moved page Component Creation to Help:Component Creation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Help:Component Creation]]&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Help:Component_Creation&amp;diff=15492</id>
		<title>Help:Component Creation</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Help:Component_Creation&amp;diff=15492"/>
		<updated>2014-09-20T10:25:14Z</updated>

		<summary type="html">&lt;p&gt;Kersing: Kersing moved page Help:Contents to Component Creation: Option to create the page created it in the wrong section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Component Creation ==&lt;br /&gt;
&lt;br /&gt;
Starting with Flowcode 6, users can easily create new components. A new component is basically a Flowcode program, with macros to implement the functionality required for the component. Flowcode 6 components can include simulation as well. Simulation is implemented using macros as well.&lt;br /&gt;
&lt;br /&gt;
A typical component will include at least an initialization macro and a graphic element to represent the component on a panel.&lt;br /&gt;
&lt;br /&gt;
New components can be build from scratch or build on existing components.&lt;br /&gt;
&lt;br /&gt;
The [[Exercises]] page contains examples on component creation at the bottom of the page.&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Help:Contents&amp;diff=15493</id>
		<title>Help:Contents</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Help:Contents&amp;diff=15493"/>
		<updated>2014-09-20T10:25:14Z</updated>

		<summary type="html">&lt;p&gt;Kersing: Kersing moved page Help:Contents to Component Creation: Option to create the page created it in the wrong section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Component Creation]]&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Help:Component_Creation&amp;diff=15491</id>
		<title>Help:Component Creation</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Help:Component_Creation&amp;diff=15491"/>
		<updated>2014-09-20T10:19:49Z</updated>

		<summary type="html">&lt;p&gt;Kersing: Created page with &amp;quot;== Component Creation ==  Starting with Flowcode 6, users can easily create new components. A new component is basically a Flowcode program, with macros to implement the funct...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Component Creation ==&lt;br /&gt;
&lt;br /&gt;
Starting with Flowcode 6, users can easily create new components. A new component is basically a Flowcode program, with macros to implement the functionality required for the component. Flowcode 6 components can include simulation as well. Simulation is implemented using macros as well.&lt;br /&gt;
&lt;br /&gt;
A typical component will include at least an initialization macro and a graphic element to represent the component on a panel.&lt;br /&gt;
&lt;br /&gt;
New components can be build from scratch or build on existing components.&lt;br /&gt;
&lt;br /&gt;
The [[Exercises]] page contains examples on component creation at the bottom of the page.&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=C_Code_Icon_Properties&amp;diff=15269</id>
		<title>C Code Icon Properties</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=C_Code_Icon_Properties&amp;diff=15269"/>
		<updated>2014-05-18T18:21:30Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;sidebar&amp;gt;Sidebar: Icon Properties&amp;lt;/sidebar&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin:auto; text-align:center;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Btn_C_Code.gif|border]]&lt;br /&gt;
| width=&amp;quot;50px&amp;quot; |&amp;amp;rarr; &lt;br /&gt;
|[[File:Gen_C_Code_Flowchart_Icon.png]] &lt;br /&gt;
|width=&amp;quot;50px&amp;quot; |&amp;amp;rarr; &lt;br /&gt;
|[[File:Gen_C_Code_Icon_Properties.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Flowcode is designed to allow those new to microcontroller programming to design programs with little knowledge of other programming languages. However it is possible to embed code written in other languages into Flowcode programs. Programs written in C and Assembly code can be embedded in Flowcode using the Code icon. This means that it is possible to take complex programs (you will find lots of programs on the internet) written in C or assembly and embed them into your designs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code can not be simulated by Flowcode, but is passed on to the microcontroller during compilation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Display Name'''&lt;br /&gt;
&lt;br /&gt;
The name of the icon that appears on the flowchart.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Variable Box'''&lt;br /&gt;
&lt;br /&gt;
Quickly browse the variables defined in your project. You can reference ports directly or select from a list of available Global or Local variables. Dragging and dropping the variables into the C Code box will automatically add the correct Flowcode specific prefix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''C Code'''&lt;br /&gt;
&lt;br /&gt;
Enter any C code you wish to include in the flowchart. The C code is not checked by Flowcode but is passed straight to the C compiler when the flowchart is compiled. It is important to verify that the C code entered is correct, as syntax errors will cause the compilation of the whole flowchart to fail. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To access Flowcode variables, macro functions and connection points, it is necessary to color the variable in your C code with the prefixes FCV_, FCM_ and FCC_MacroName_ respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, to use a Flowcode variable called DELAY in your C code, you must refer to it using FCV_DELAY&lt;br /&gt;
&lt;br /&gt;
Note that all Flowcode defined variables are upper case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To call a Flowcode macro called TEST in your C code, you must call FCM_TEST();&lt;br /&gt;
&lt;br /&gt;
Note that for Flowcode versions up to Flowcode 6, all Flowcode macro names are upper case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To jump to a connection point called A, defined in a Flowcode macro called TEST, the users C code must be goto FCC_TEST_A;. Connection points defined in the main flowchart of a Flowcode file are prefixed FCC_Main_.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Assembly Code'''&lt;br /&gt;
&lt;br /&gt;
Assembly code can be added into the code field in a C assembly code wrapper.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a single line of code use the asm operator in front of each instruction, e.g.&lt;br /&gt;
&lt;br /&gt;
 asm movlw 5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or enclose several statements within an asm block:&lt;br /&gt;
&lt;br /&gt;
 asmTo access Flowcode variables, macro functions and connection points, it is necessary to further color the prefixes used above with a preceding underscore, _FCV_, _FCM_ and _FCC_MacroName_ respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The examples used above now become _FCV_DELAY, _FCM_TEST() and _FCC_TEST_A.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Video instructions====&lt;br /&gt;
&lt;br /&gt;
See the [http://www.youtube.com/watch?v=JgjQlV6LQYI&amp;amp;list=PLQDWBb7bxuCgg6aJgPJcfXBMzZdLILceQ Custom code] video to learn how to add custom C code to the flowchart using the C Code icon to set the value of a variable to 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
{{#ev:youtube|JgjQlV6LQYI|640}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
	<entry>
		<id>https://www.flowcode.co.uk/wiki/index.php?title=Decision_Icon_Properties&amp;diff=13001</id>
		<title>Decision Icon Properties</title>
		<link rel="alternate" type="text/html" href="https://www.flowcode.co.uk/wiki/index.php?title=Decision_Icon_Properties&amp;diff=13001"/>
		<updated>2013-11-15T13:06:07Z</updated>

		<summary type="html">&lt;p&gt;Kersing: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;sidebar&amp;gt;Sidebar: Icon Properties&amp;lt;/sidebar&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin:auto; text-align:center;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Btn_Decision.gif|border]]&lt;br /&gt;
| width=&amp;quot;50px&amp;quot; |&amp;amp;rarr; &lt;br /&gt;
|[[File:Gen_Decision_Flowchart_Icon.png]] &lt;br /&gt;
|width=&amp;quot;50px&amp;quot; |&amp;amp;rarr; &lt;br /&gt;
|[[File:Gen_Decision_Icon_Properties.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Decision icons allow you to test a condition and redirect the flow according to the outcome.&lt;br /&gt;
Icons can be placed in either branch from the decision icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Display Name'''&lt;br /&gt;
&lt;br /&gt;
The name of the icon that appears on the flowchart.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Condition'''&lt;br /&gt;
&lt;br /&gt;
The decision box tests this condition to see which branch to continue down. If the condition evaluates to 0 or false then the 'No' branch is chosen. If the condition evaluates to a non zero number or true then the 'Yes' branch is chosen. Conditions can be made up from numbers, variables and operators:&lt;br /&gt;
&lt;br /&gt;
See [[Calculation Icon Properties]] for a list of valid operators.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Numeric values can be in decimal (unmarked) or in HEX format (preceded by 0x) or in Binary format (preceded by 0b) e.g. 255 or 0xFF or 0b01010101.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Assuming that the variables have been previously defined, all the following are valid conditions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DELAY = DELAY + 1&lt;br /&gt;
&lt;br /&gt;
DELAY = (MYVAR + 3) * 3&lt;br /&gt;
&lt;br /&gt;
NEXTBIT = LASTBIT &amp;gt;&amp;gt; 2 &amp;amp; MASK&lt;br /&gt;
&lt;br /&gt;
AANDB = PORT_A AND PORT_B&lt;br /&gt;
&lt;br /&gt;
INVX = NOT X&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To test for two or more conditions, write tests for the individual conditions and combine them with logical operators. &lt;br /&gt;
&lt;br /&gt;
When both conditions must be true: condition1 &amp;amp;&amp;amp; condition2&lt;br /&gt;
&lt;br /&gt;
When one condition being true suffices: condition1 || condition2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Assuming that the variables have been previously defined, all the following are valid conditions.&lt;br /&gt;
&lt;br /&gt;
(DELAY = 1) &amp;amp;&amp;amp; (X = 0)&lt;br /&gt;
&lt;br /&gt;
(DELAY = 1) || (DELAY = 4)&lt;br /&gt;
&lt;br /&gt;
(DELAY = 1) || ( (DELAY = 3) &amp;amp;&amp;amp; (X = 0) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Variables Arrow'''&lt;br /&gt;
&lt;br /&gt;
Clicking on the down arrow brings up the variables dialog window allowing you to select an existing variable or to [[Creating Variables|create a new one]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Swap Yes and No'''&lt;br /&gt;
&lt;br /&gt;
Normally the 'Yes' path of execution goes off to the right of the decision icon and the 'No' path carries on down the flowchart. Select this option to swap the two branches around.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''Boolean values'''&lt;br /&gt;
&lt;br /&gt;
Flowcode treats zero as false and any non-zero value as true.&lt;br /&gt;
&lt;br /&gt;
This allows the use of variables in a true or false context.&lt;br /&gt;
&lt;br /&gt;
For example 'If TIMEUP' would execute the 'Yes' path if TIMEUP was non-zero.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Video instructions====&lt;br /&gt;
&lt;br /&gt;
See the [http://www.youtube.com/watch?v=iLT7rwsSL88&amp;amp;list=PLQDWBb7bxuCgg6aJgPJcfXBMzZdLILceQ Decision] video to learn how to use the Decision icon effectively with other icons such as [[Input Icon Properties|Input]], [[Output Icon Properties|Output]] and [[Delay Icon Properties|Delay]] icons.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
{{#ev:youtube|iLT7rwsSL88|640}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kersing</name></author>
		
	</entry>
</feed>