Difference between revisions of "Component: MIAC NXT AllCode API (AllCode)"
From Flowcode Help
Jump to navigationJump to search| Line 52: | Line 52: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
| + | |||
| + | |||
| Line 57: | Line 59: | ||
==Macro reference== | ==Macro reference== | ||
| + | ===WriteTranPWMEnable=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 85: | Line 88: | ||
| + | ===WriteTrans=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 103: | Line 107: | ||
| + | ===DisplayPrint=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 121: | Line 126: | ||
| + | ===GetAPIVersion=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 134: | Line 140: | ||
| + | ===DisplayNumber=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 152: | Line 159: | ||
| + | ===WriteTranPWMDuty=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 180: | Line 188: | ||
| + | ===DisplayClear=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 193: | Line 202: | ||
| + | ===ReadKey=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 206: | Line 216: | ||
| + | ===DisplayPixel=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 234: | Line 245: | ||
| + | ===WriteRelay=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 257: | Line 269: | ||
| + | ===WriteRelays=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 275: | Line 288: | ||
| + | ===ReadAnalogInput=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 293: | Line 307: | ||
| + | ===SetAPIVerbose=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 311: | Line 326: | ||
| + | ===DisplayCursor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 334: | Line 350: | ||
| + | ===ReadDigitalInput=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 352: | Line 369: | ||
| + | ===ReadDigitalInputs=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 365: | Line 383: | ||
| + | ===WriteTran=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 388: | Line 407: | ||
| + | ===DisplayFloat=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Revision as of 11:51, 3 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 WriteTranPWMEnable
- 5.2 WriteTrans
- 5.3 DisplayPrint
- 5.4 GetAPIVersion
- 5.5 DisplayNumber
- 5.6 WriteTranPWMDuty
- 5.7 DisplayClear
- 5.8 ReadKey
- 5.9 DisplayPixel
- 5.10 WriteRelay
- 5.11 WriteRelays
- 5.12 ReadAnalogInput
- 5.13 SetAPIVerbose
- 5.14 DisplayCursor
- 5.15 ReadDigitalInput
- 5.16 ReadDigitalInputs
- 5.17 WriteTran
- 5.18 DisplayFloat
- 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
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 | |
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 | |
DisplayNumber
| DisplayNumber | |
| Prints a number to the MIAC display starting from the current cursor position. | |
| Value | |
| Range: Signed Long | |
| 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 | |
DisplayClear
| DisplayClear | |
| Clears the MIAC display | |
| 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 | |
DisplayPixel
| DisplayPixel | |
| Controls a single pixel on the MIAC display | |
| X | |
| Range: 0-119 | |
| Y | |
| Range: 0-31 | |
| State | |
| Range: 0-1 | |
| Return | |
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 | |
ReadAnalogInput
| ReadAnalogInput | |
| Reads a single analog input with range 0 to 4095 corresponding to input voltage 0V to +V. | |
| Channel | |
| Range: 1 - 8 | |
| Return | |
SetAPIVerbose
DisplayCursor
| DisplayCursor | |
| Sets the cursor position for the MIAC display | |
| X | |
| Range: 0-21 | |
| Y | |
| Range: 0-3 | |
| 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 | |
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 | |
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 | |