Difference between revisions of "Component: MIAC NXT AllCode API (AllCode)"
From Flowcode Help
Jump to navigationJump to search(6 intermediate revisions by the same user not shown) | |||
Line 16: | Line 16: | ||
==Component Source Code== | ==Component Source Code== | ||
+ | |||
+ | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_MIAC_NXT_AllCode_Component_Source.fcsx FC_Comp_Source_MIAC_NXT_AllCode_Component_Source.fcsx] | ||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_MIAC_NXT_AllCode_Component_Source.fcsx FC_Comp_Source_MIAC_NXT_AllCode_Component_Source.fcsx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_MIAC_NXT_AllCode_Component_Source.fcsx FC_Comp_Source_MIAC_NXT_AllCode_Component_Source.fcsx] | ||
Line 27: | Line 29: | ||
− | |||
− | |||
Line 35: | Line 35: | ||
+ | ''No detailed description exists yet for this component'' | ||
+ | ==Examples== | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ''<span style="color:red;">No additional examples</span>'' | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ==Macro reference== | ||
+ | ===DisplayClear=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayClear''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Clears the MIAC display |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | |||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 295: | Line 79: | ||
+ | ===DisplayCursor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 318: | Line 103: | ||
− | + | ===DisplayFloat=== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 395: | Line 127: | ||
− | + | ===DisplayNumber=== | |
− | |||
− | == | ||
− | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
− | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9- | + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayNumber''' |
|- | |- | ||
+ | | colspan="2" | Prints a number to the MIAC display starting from the current cursor position. | ||
|- | |- | ||
− | |||
− | |||
|- | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG | ||
+ | | width="90%" | Value | ||
|- | |- | ||
− | | | + | | colspan="2" | Range: Signed Long |
− | |||
|- | |- | ||
− | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |
− | + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | |
− | + | |} | |
− | + | ||
− | |||
− | |||
− | |||
− | | width="10%" align="center" style=" | ||
− | | width="90%" style=" | ||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ===DisplayPixel=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayPixel''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Controls a single pixel on the MIAC display |
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
− | | width="90%" | | + | | width="90%" | X |
|- | |- | ||
− | | colspan="2" | Range: | + | | colspan="2" | Range: 0-119 |
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | | + | | width="90%" | Y |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Range: 0-31 |
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
− | | width="90%" | | + | | width="90%" | State |
|- | |- | ||
− | + | | colspan="2" | Range: 0-1 | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | colspan="2" | Range: 0- | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 475: | Line 175: | ||
+ | ===DisplayPrint=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 493: | Line 194: | ||
+ | ===GetAPIVersion=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 506: | Line 208: | ||
+ | ===ReadAnalogInput=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAnalogInput''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Reads a single analog input with range 0 to 4095 corresponding to input voltage 0V to +V. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | | + | | width="90%" | Channel |
|- | |- | ||
− | | colspan="2" | Range: | + | | colspan="2" | Range: 1 - 8 |
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===ReadDigitalInput=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDigitalInput''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Reads a single digital input. |
|- | |- | ||
|- | |- | ||
Line 535: | Line 239: | ||
| width="90%" | Channel | | width="90%" | Channel | ||
|- | |- | ||
− | | colspan="2" | Range: 1- | + | | colspan="2" | Range: 1 - 8 |
|- | |- | ||
− | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===ReadDigitalInputs=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDigitalInputs''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Reads all digital inputs at once and returns as a binary value. Input 1 = Bit 0 Input 8 = Bit 7 |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===ReadKey=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 578: | Line 274: | ||
+ | ===SetAPIVerbose=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAPIVerbose''' |
|- | |- | ||
− | | colspan="2" | Controls | + | | colspan="2" | Controls the Verbose mode. When enabled the LCD automatically displays an account of the incoming API commands and parameters. When switched off the LCD is free for the user to control as required. |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
− | | width="90%" | | + | | width="90%" | Mode |
|- | |- | ||
− | | colspan="2" | Range: 0-1 | + | | colspan="2" | Range: 0-1 : 0=Off or User Mode / 1=API Verbose Mode |
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 606: | Line 293: | ||
+ | ===WriteRelay=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 629: | Line 317: | ||
+ | ===WriteRelays=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 647: | Line 336: | ||
+ | ===WriteTran=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteTran''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Allows a single transistor output to be switched on or off. |
|- | |- | ||
|- | |- | ||
Line 658: | Line 348: | ||
| width="90%" | Channel | | width="90%" | Channel | ||
|- | |- | ||
− | | colspan="2" | Range | + | | colspan="2" | Range 1-6 where 1=A / 2=B / 3=C / 4=D / 5=E / 6=F |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
− | | width="90%" | | + | | width="90%" | Value |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | 0 = Off, 1 = On |
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 683: | Line 360: | ||
+ | ===WriteTranPWMDuty=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteTranPWMDuty''' |
|- | |- | ||
− | | colspan="2" | Sets the | + | | colspan="2" | Sets the PWM duty on the selected channel. |
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
− | | width="90%" | | + | | width="90%" | Channel |
+ | |- | ||
+ | | colspan="2" | Range: 1-4 Where 1=A / 2=B / 3=C / 4=D | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
+ | | width="90%" | EnableOrState | ||
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | 1 = Enable / 0 = State |
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | | + | | width="90%" | Duty |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | |
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 706: | Line 389: | ||
+ | ===WriteTranPWMEnable=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteTranPWMEnable''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Allows pulse width modulated transistor outputs to be switched on or off. |
|- | |- | ||
|- | |- | ||
Line 717: | Line 401: | ||
| width="90%" | Channel | | width="90%" | Channel | ||
|- | |- | ||
− | | colspan="2" | Range: 1 - | + | | colspan="2" | Range: 1-4 Where 1=A / 2=B / 3=C / 4=D |
|- | |- | ||
− | | width="10%" align="center | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
− | | width="90% | + | | width="90%" | EnableOrState |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | + | | colspan="2" | PWM on Enable Pin or State Pin - 1 = Enable / 0 = State | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | colspan="2" | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
− | | width="90%" | | + | | width="90%" | OnOrOff |
|- | |- | ||
− | | colspan="2" | 0 = | + | | colspan="2" | 1 = Enabled / 0 = Disabled |
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 760: | Line 418: | ||
+ | ===WriteTrans=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteTrans''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Allows all transistor outputs to be switched on or off in a single command. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| width="90%" | Value | | width="90%" | Value | ||
|- | |- | ||
− | | colspan="2" | Range: | + | | colspan="2" | Range: 0-63 or 0b000000 to 0b111111 |
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | |||
− | |||
Latest revision as of 13:11, 7 February 2023
Author | Matrix TSL |
Version | 1.1 |
Category | AllCode |
Contents
- 1 MIAC NXT AllCode API component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 DisplayClear
- 5.2 DisplayCursor
- 5.3 DisplayFloat
- 5.4 DisplayNumber
- 5.5 DisplayPixel
- 5.6 DisplayPrint
- 5.7 GetAPIVersion
- 5.8 ReadAnalogInput
- 5.9 ReadDigitalInput
- 5.10 ReadDigitalInputs
- 5.11 ReadKey
- 5.12 SetAPIVerbose
- 5.13 WriteRelay
- 5.14 WriteRelays
- 5.15 WriteTran
- 5.16 WriteTranPWMDuty
- 5.17 WriteTranPWMEnable
- 5.18 WriteTrans
- 6 Property reference
MIAC NXT AllCode API component
Controls the MIAC NXT hardware loaded with the MIAC NXT AllCode firmware. Usefull for SCADA, Control or Test applications. Compatible with USB / Bluetooth / Wifi / Ethernet
Component Source Code
Please click here to download the component source project: FC_Comp_Source_MIAC_NXT_AllCode_Component_Source.fcsx
Please click here to view the component source code (Beta): FC_Comp_Source_MIAC_NXT_AllCode_Component_Source.fcsx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
DisplayClear
![]() |
DisplayClear |
Clears the MIAC display | |
![]() |
Return |
DisplayCursor
![]() |
DisplayCursor |
Sets the cursor position for the MIAC display | |
![]() |
X |
Range: 0-21 | |
![]() |
Y |
Range: 0-3 | |
![]() |
Return |
DisplayFloat
![]() |
DisplayFloat |
Prints a floating point number to the MIAC display starting from the current cursor position. | |
![]() |
Value |
Range: Float | |
![]() |
NumDP |
Number of decimal places to display | |
![]() |
Return |
DisplayNumber
![]() |
DisplayNumber |
Prints a number to the MIAC display starting from the current cursor position. | |
![]() |
Value |
Range: Signed Long | |
![]() |
Return |
DisplayPixel
![]() |
DisplayPixel |
Controls a single pixel on the MIAC display | |
![]() |
X |
Range: 0-119 | |
![]() |
Y |
Range: 0-31 | |
![]() |
State |
Range: 0-1 | |
![]() |
Return |
DisplayPrint
![]() |
DisplayPrint |
Prints a string to the MIAC display starting from the current cursor position. | |
![]() |
data |
Range: 0-21 | |
![]() |
Return |
GetAPIVersion
![]() |
GetAPIVersion |
Gets the API version of the MIAC NXT AllCode Firmware. Useful to see if the MIAC NXT is responding to commands. | |
![]() |
Return |
ReadAnalogInput
![]() |
ReadAnalogInput |
Reads a single analog input with range 0 to 4095 corresponding to input voltage 0V to +V. | |
![]() |
Channel |
Range: 1 - 8 | |
![]() |
Return |
ReadDigitalInput
![]() |
ReadDigitalInput |
Reads a single digital input. | |
![]() |
Channel |
Range: 1 - 8 | |
![]() |
Return |
ReadDigitalInputs
![]() |
ReadDigitalInputs |
Reads all digital inputs at once and returns as a binary value. Input 1 = Bit 0 Input 8 = Bit 7 | |
![]() |
Return |
ReadKey
![]() |
ReadKey |
Reads a keypress from the keypad. Returns 0 for no keypress or 1-9 for a valid keypress. 1 = TopLeft, 2=TopMiddle, 3=TopRight, 4=CenterLeft etc | |
![]() |
Return |
SetAPIVerbose
WriteRelay
![]() |
WriteRelay |
Allows a single relay to be switched on or off. | |
![]() |
Channel |
Range 1-2 | |
![]() |
Value |
0 = Off, 1 = On | |
![]() |
Return |
WriteRelays
![]() |
WriteRelays |
Allows all relays to be switched on or off in a single command. | |
![]() |
Value |
Range: 0-3 or 0b00 to 0b11 | |
![]() |
Return |
WriteTran
![]() |
WriteTran |
Allows a single transistor output to be switched on or off. | |
![]() |
Channel |
Range 1-6 where 1=A / 2=B / 3=C / 4=D / 5=E / 6=F | |
![]() |
Value |
0 = Off, 1 = On | |
![]() |
Return |
WriteTranPWMDuty
![]() |
WriteTranPWMDuty |
Sets the PWM duty on the selected channel. | |
![]() |
Channel |
Range: 1-4 Where 1=A / 2=B / 3=C / 4=D | |
![]() |
EnableOrState |
1 = Enable / 0 = State | |
![]() |
Duty |
![]() |
Return |
WriteTranPWMEnable
WriteTrans
![]() |
WriteTrans |
Allows all transistor outputs to be switched on or off in a single command. | |
![]() |
Value |
Range: 0-63 or 0b000000 to 0b111111 | |
![]() |
Return |