Component: MIAC NXT AllCode API (AllCode): Difference between revisions
Appearance
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 66: | Line 66: | ||
===DisplayClear=== | ===DisplayClear=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DisplayClear''' | ||
|- | |- | ||
| colspan="2" | Clears the MIAC display | | colspan="2" | Clears the MIAC display | ||
| Line 80: | Line 80: | ||
===DisplayCursor=== | ===DisplayCursor=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DisplayCursor''' | ||
|- | |- | ||
| colspan="2" | Sets the cursor position for the MIAC display | | colspan="2" | Sets the cursor position for the MIAC display | ||
| Line 104: | Line 104: | ||
===DisplayFloat=== | ===DisplayFloat=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DisplayFloat''' | ||
|- | |- | ||
| colspan="2" | Prints a floating point number to the MIAC display starting from the current cursor position. | | colspan="2" | Prints a floating point number to the MIAC display starting from the current cursor position. | ||
| Line 128: | Line 128: | ||
===DisplayNumber=== | ===DisplayNumber=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DisplayNumber''' | ||
|- | |- | ||
| colspan="2" | Prints a number to the MIAC display starting from the current cursor position. | | colspan="2" | Prints a number to the MIAC display starting from the current cursor position. | ||
| Line 147: | Line 147: | ||
===DisplayPixel=== | ===DisplayPixel=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DisplayPixel''' | ||
|- | |- | ||
| colspan="2" | Controls a single pixel on the MIAC display | | colspan="2" | Controls a single pixel on the MIAC display | ||
| Line 176: | Line 176: | ||
===DisplayPrint=== | ===DisplayPrint=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DisplayPrint''' | ||
|- | |- | ||
| colspan="2" | Prints a string to the MIAC display starting from the current cursor position. | | colspan="2" | Prints a string to the MIAC display starting from the current cursor position. | ||
| Line 195: | Line 195: | ||
===GetAPIVersion=== | ===GetAPIVersion=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetAPIVersion''' | ||
|- | |- | ||
| colspan="2" | Gets the API version of the MIAC NXT AllCode Firmware. Useful to see if the MIAC NXT is responding to commands. | | colspan="2" | Gets the API version of the MIAC NXT AllCode Firmware. Useful to see if the MIAC NXT is responding to commands. | ||
| Line 209: | Line 209: | ||
===ReadAnalogInput=== | ===ReadAnalogInput=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadAnalogInput''' | ||
|- | |- | ||
| colspan="2" | Reads a single analog input with range 0 to 4095 corresponding to input voltage 0V to +V. | | colspan="2" | Reads a single analog input with range 0 to 4095 corresponding to input voltage 0V to +V. | ||
| Line 228: | Line 228: | ||
===ReadDigitalInput=== | ===ReadDigitalInput=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadDigitalInput''' | ||
|- | |- | ||
| colspan="2" | Reads a single digital input. | | colspan="2" | Reads a single digital input. | ||
| Line 247: | Line 247: | ||
===ReadDigitalInputs=== | ===ReadDigitalInputs=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadDigitalInputs''' | ||
|- | |- | ||
| colspan="2" | Reads all digital inputs at once and returns as a binary value. Input 1 = Bit 0 Input 8 = Bit 7 | | colspan="2" | Reads all digital inputs at once and returns as a binary value. Input 1 = Bit 0 Input 8 = Bit 7 | ||
| Line 261: | Line 261: | ||
===ReadKey=== | ===ReadKey=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadKey''' | ||
|- | |- | ||
| colspan="2" | 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 | | colspan="2" | 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 | ||
| Line 275: | Line 275: | ||
===SetAPIVerbose=== | ===SetAPIVerbose=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetAPIVerbose''' | ||
|- | |- | ||
| 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. | | 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. | ||
| Line 294: | Line 294: | ||
===WriteRelay=== | ===WriteRelay=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteRelay''' | ||
|- | |- | ||
| colspan="2" | Allows a single relay to be switched on or off. | | colspan="2" | Allows a single relay to be switched on or off. | ||
| Line 318: | Line 318: | ||
===WriteRelays=== | ===WriteRelays=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteRelays''' | ||
|- | |- | ||
| colspan="2" | Allows all relays to be switched on or off in a single command. | | colspan="2" | Allows all relays to be switched on or off in a single command. | ||
| Line 337: | Line 337: | ||
===WriteTran=== | ===WriteTran=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteTran''' | ||
|- | |- | ||
| colspan="2" | Allows a single transistor output to be switched on or off. | | colspan="2" | Allows a single transistor output to be switched on or off. | ||
| Line 361: | Line 361: | ||
===WriteTranPWMDuty=== | ===WriteTranPWMDuty=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteTranPWMDuty''' | ||
|- | |- | ||
| colspan="2" | Sets the PWM duty on the selected channel. | | colspan="2" | Sets the PWM duty on the selected channel. | ||
| Line 390: | Line 390: | ||
===WriteTranPWMEnable=== | ===WriteTranPWMEnable=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteTranPWMEnable''' | ||
|- | |- | ||
| colspan="2" | Allows pulse width modulated transistor outputs to be switched on or off. | | colspan="2" | Allows pulse width modulated transistor outputs to be switched on or off. | ||
| Line 419: | Line 419: | ||
===WriteTrans=== | ===WriteTrans=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteTrans''' | ||
|- | |- | ||
| colspan="2" | Allows all transistor outputs to be switched on or off in a single command. | | colspan="2" | Allows all transistor outputs to be switched on or off in a single command. | ||
| Line 439: | Line 439: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
|- | |- | ||
| Line 459: | Line 459: | ||
| colspan="2" | Generates a warning dialogue if the communication to the device fails allowing the program to be ended. | | colspan="2" | Generates a warning dialogue if the communication to the device fails allowing the program to be ended. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connection Properties | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:36, 13 July 2026
| Author | Matrix TSL |
| Version | 1.1 |
| Category | AllCode |
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 | |