Jump to content

Component: MIAC NXT AllCode API (AllCode)

From Flowcode Help
Revision as of 17:49, 9 November 2022 by Wiki bot (talk | contribs) (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.1 |- | width="20%" style="color:gray...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 for the component source code: FC_Comp_Source_MIAC_NXT_AllCode_Component_Source.fcsx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Downloadable macro reference

WriteTranPWMEnable
Allows pulse width modulated transistor outputs to be switched on or off. 
- BYTE Channel
Range: 1-4 Where 1=A / 2=B / 3=C / 4=D 
- BOOL EnableOrState
PWM on Enable Pin or State Pin - 1 = Enable / 0 = State 
- BOOL OnOrOff
1 = Enabled / 0 = Disabled 
- VOID Return


WriteTrans
Allows all transistor outputs to be switched on or off in a single command. 
- BYTE Value
Range: 0-63 or 0b000000 to 0b111111 
- VOID Return


DisplayPrint
Prints a string to the MIAC display starting from the current cursor position. 
- STRING data
Range: 0-21 
- VOID Return


GetAPIVersion
Gets the API version of the MIAC NXT AllCode Firmware. Useful to see if the MIAC NXT is responding to commands. 
- BYTE Return


DisplayNumber
Prints a number to the MIAC display starting from the current cursor position. 
- LONG Value
Range: Signed Long 
- VOID Return


WriteTranPWMDuty
Sets the PWM duty on the selected channel. 
- BYTE Channel
Range: 1-4 Where 1=A / 2=B / 3=C / 4=D 
- BOOL EnableOrState
1 = Enable / 0 = State 
- UINT Duty
 
- VOID Return


DisplayClear
Clears the MIAC display 
- VOID Return


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 
- BYTE Return


DisplayPixel
Controls a single pixel on the MIAC display 
- BYTE X
Range: 0-119 
- BYTE Y
Range: 0-31 
- BOOL State
Range: 0-1 
- VOID Return


WriteRelay
Allows a single relay to be switched on or off. 
- BYTE Channel
Range 1-2 
- BOOL Value
0 = Off, 1 = On 
- VOID Return


WriteRelays
Allows all relays to be switched on or off in a single command. 
- BYTE Value
Range: 0-3 or 0b00 to 0b11 
- VOID Return


ReadAnalogInput
Reads a single analog input with range 0 to 4095 corresponding to input voltage 0V to +V. 
- BYTE Channel
Range: 1 - 8 
- UINT Return


SetAPIVerbose
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. 
- BOOL Mode
Range: 0-1 : 0=Off or User Mode / 1=API Verbose Mode 
- VOID Return


DisplayCursor
Sets the cursor position for the MIAC display 
- BYTE X
Range: 0-21 
- BYTE Y
Range: 0-3 
- VOID Return


ReadDigitalInput
Reads a single digital input. 
- BYTE Channel
Range: 1 - 8 
- BYTE Return


ReadDigitalInputs
Reads all digital inputs at once and returns as a binary value. Input 1 = Bit 0 Input 8 = Bit 7 
- BYTE Return


WriteTran
Allows a single transistor output to be switched on or off. 
- BYTE Channel
Range 1-6 where 1=A / 2=B / 3=C / 4=D / 5=E / 6=F 
- BOOL Value
0 = Off, 1 = On 
- VOID Return


DisplayFloat
Prints a floating point number to the MIAC display starting from the current cursor position. 
- FLOAT Value
Range: Float 
- BYTE NumDP
Number of decimal places to display 
- VOID Return



Property reference

Properties
Connections
API Connection Type
API connection mode. COM - Bluetooth / RS232 / RS485 WIFI - Network 
Warnings On Error
Generates a warning dialogue if the communication to the device fails allowing the program to be ended. 
Connection Properties
Auto Detect