Component: Control (AllCode)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category AllCode


Control component

Drives the Matrix Control hardware via the AllCode API.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_Control_ComponentSource.fcsx

Please click here to view the component source code (Beta): FC_Comp_Source_Control_ComponentSource.fcsx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

CheckErrorStatus

Fc9-comp-macro.png CheckErrorStatus
Returns the Error status value indicating if there has been any errors. 0 = No Error 1 = Timeout Error 
Fc9-u8-icon.png - BYTE Return


GetAPI

Fc9-comp-macro.png GetAPI
Gets the API version number 
Fc9-u8-icon.png - BYTE Return


GetDataArray

Fc9-comp-macro.png GetDataArray
Collects a data array from the Control board. Returns number of samples collected. 
Fc9-f32-icon.png - FLOAT data
 
Fc9-u8-icon.png - BYTE Return


GetFeedback

Fc9-comp-macro.png GetFeedback
Gets the feedback as a value in real world units 
Fc9-f32-icon.png - FLOAT Return


GetOutput

Fc9-comp-macro.png GetOutput
Gets the output value as an integer value betwen 0 and 100 representing the output PWM duty 
Fc9-u8-icon.png - BYTE Return


GetPIDComponent

Fc9-comp-macro.png GetPIDComponent
Gets one of the PID controller output components in real world units 
Fc9-u8-icon.png - BYTE Index
Range 0-2, 0=P, 1=I, 2=D 
Fc9-f32-icon.png - FLOAT Return


GetWifiIP

Fc9-comp-macro.png GetWifiIP
Collects the IP address of the robot arm WIFI connection. 
Fc9-string-icon.png - STRING Return


Initialise

Fc9-comp-macro.png Initialise
 
Fc9-void-icon.png - VOID Return


ResetToBoot

Fc9-comp-macro.png ResetToBoot
Resets the board into bootload mode for reprogramming. Comms port will be closed on calling this macro, 
Fc9-void-icon.png - VOID Return


SetAutoOnOff

Fc9-comp-macro.png SetAutoOnOff
Enable the auto PID control using the on-board microcontroller 
Fc9-u8-icon.png - BYTE Channel
Range: 0-1 
Fc9-u8-icon.png - BYTE Enable
0=Off, 1=5Hz, 2=10Hz, 3=20Hz, 4=50Hz, 5=100Hz, 6=200Hz, 7=500Hz, 8=1KHz 
Fc9-void-icon.png - VOID Return


SetAutoOnOffParam

Fc9-comp-macro.png SetAutoOnOffParam
Sets the Hysteresis parameter for the Auto on-board On/Off 
Fc9-f32-icon.png - FLOAT Hysteresis
Hysterists in real world units 
Fc9-void-icon.png - VOID Return


SetAutoPID

Fc9-comp-macro.png SetAutoPID
Enable the auto PID control using the on-board microcontroller 
Fc9-u8-icon.png - BYTE Channel
Range: 0-1 
Fc9-u8-icon.png - BYTE Enable
0=Off, 1=5Hz, 2=10Hz, 3=20Hz, 4=50Hz, 5=100Hz, 6=200Hz, 7=500Hz, 8=1KHz 
Fc9-void-icon.png - VOID Return


SetAutoPIDFlip

Fc9-comp-macro.png SetAutoPIDFlip
Controls if the PID response is flipped, a negative response vs a positive 
Fc9-bool-icon.png - BOOL Flip
Default: 0=Not Flipped, 1=Flipped 
Fc9-void-icon.png - VOID Return


SetAutoPIDParam

Fc9-comp-macro.png SetAutoPIDParam
Sets one of the P, I, D parameters for the Auto on-board PID 
Fc9-u8-icon.png - BYTE Index
Range: 0-5 Where 0=P, 1=I, 2=D, 3=IntClamp, 4=DFilt, 5=FiltCo 
Fc9-f32-icon.png - FLOAT Value
Range: 0.0 to 65.535 
Fc9-void-icon.png - VOID Return


SetAutoPrescaler

Fc9-comp-macro.png SetAutoPrescaler
Configures the automatic mode prescaler, for running really slowly. Defaults off so no need to call this unless you are using it. 
Fc9-u8-icon.png - BYTE Prescaler
0=Off, 2=Div by 2, 3=Div By 3 etc 
Fc9-void-icon.png - VOID Return


SetBluetoothDetails

Fc9-comp-macro.png SetBluetoothDetails
Configures the Bluetooth device name and pin and stores into the none volatie memory onboard the robot arm. Call the SetBluetoothMode macro after this to action the change. 
Fc9-string-icon.png - STRING Name
Bluetooth Device String, Max 20 Characters 
Fc9-string-icon.png - STRING Pin
Pin String, 4 Numeric Characters e.g. "1234" 
Fc9-void-icon.png - VOID Return


SetBluetoothMode

Fc9-comp-macro.png SetBluetoothMode
Configures the Bluetooth mode. 
Fc9-bool-icon.png - BOOL Mode
0=Disabled, 1=Enabled 
Fc9-void-icon.png - VOID Return


SetCANID

Fc9-comp-macro.png SetCANID
Stores the specified CAN ID into an internal none volatile memory location. 
Fc9-u16-icon.png - UINT ID
 
Fc9-void-icon.png - VOID Return


SetCANMode

Fc9-comp-macro.png SetCANMode
Configures if the CAN API mde is enabled or disabled. 
Fc9-u8-icon.png - BYTE Mode
0=Disabled / 1=Enabled 
Fc9-void-icon.png - VOID Return


SetEthernetIP

Fc9-comp-macro.png SetEthernetIP
Configures the Ethernet IP Address. 
Fc9-string-icon.png - STRING IP
IP Address string e.g. "192.168.1.100" 
Fc9-void-icon.png - VOID Return


SetEthernetMode

Fc9-comp-macro.png SetEthernetMode
Configures the Ethernet mode. 
Fc9-u8-icon.png - BYTE Mode
0=Disabled, 1=Enabled 
Fc9-void-icon.png - VOID Return


SetEthernetPort

Fc9-comp-macro.png SetEthernetPort
Configures the Ethernet Port number. Default 1245. 
Fc9-u16-icon.png - UINT Port
Default 1245 
Fc9-void-icon.png - VOID Return


SetFeedbackMethod

Fc9-comp-macro.png SetFeedbackMethod
Sets feedback method to dictate which control application we are running 
Fc9-u8-icon.png - BYTE FBMethod
Range: 0-3 Where 0=Level, 1=Flow, 2=Pressure, 3=Temp 
Fc9-f32-icon.png - FLOAT InputScaler
Feedback scaling factor used to convert the feedback reading into a meaningful value 
Fc9-f32-icon.png - FLOAT OutputScaler
Value used to convert input to 0-100% duty 
Fc9-void-icon.png - VOID Return


SetLogDivider

Fc9-comp-macro.png SetLogDivider
Configures the rate of the PID logging. 
Fc9-u8-icon.png - BYTE Divider
Divides the rate by the selected value 
Fc9-void-icon.png - VOID Return


SetManualDuty

Fc9-comp-macro.png SetManualDuty
Sets duty parameter for one of the manual controlled outputs 
Fc9-u8-icon.png - BYTE Channel
Range: 0-1 
Fc9-f32-icon.png - FLOAT Duty
Duty Cycle Output in Percentage Range 0 - 100% 
Fc9-void-icon.png - VOID Return


SetSetpoint

Fc9-comp-macro.png SetSetpoint
Sets Setpoint parameter for the Auto on-board PID 
Fc9-f32-icon.png - FLOAT Setpoint
Required Output in Real World Units 
Fc9-void-icon.png - VOID Return


SetWIFIPort

Fc9-comp-macro.png SetWIFIPort
Configures the WIFI Port number. Default 1245. 
Fc9-u16-icon.png - UINT Port
Default 1245 
Fc9-void-icon.png - VOID Return


SetWifiDetails

Fc9-comp-macro.png SetWifiDetails
Configures the WIFI SSID and Password strings and stores into the none volatie memory onboard the robot arm. Call the SetWifiMode macro after this to action the change. 
Fc9-string-icon.png - STRING SSID
Netword ID String, Max 32 Characters 
Fc9-string-icon.png - STRING Password
Password String, Max 32 Characters 
Fc9-void-icon.png - VOID Return


SetWifiMode

Fc9-comp-macro.png SetWifiMode
Configures the WIFI mode. When enabled the control system can either create its own WIFI network or join an existing WIFI network, 
Fc9-u8-icon.png - BYTE Mode
0=Disabled, 1=Host Network, 2=Join Network 
Fc9-void-icon.png - VOID Return


ZeroSensor

Fc9-comp-macro.png ZeroSensor
Zeros the attached sensor reading. Useful for Pressure and Level control applications. 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Comms Method
Selects the method to communicate with the Matrix 3 Axis Robot Arm. USB connection requires the USB drivers to be installed. Bluetooth connection requires the device first be paired using the Windows Bluetooth control panel. WIFI connection requires the connection settings to be configured first on the robot using USB or Bluetooth. CAN connection does not simulate and works on embedded hardware e.g. the MIAC. 
Fc9-conn-icon.png COM Port Settings
Fc9-type-7-icon.png Autodetect
Autodetects the COM port, only works for USB AllCode connection. 
Fc9-type-16-icon.png COM Port
Selects which port to communicate with, only lists ports which are currently available.  
Fc9-type-1-icon.png Text Colour