Difference between revisions of "Component: Control (AllCode)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix TSL
 
| Matrix TSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| AllCode
 
| AllCode
 
|}
 
|}
  
  
 
+
==Control component==
==[[File:Component Icon bd23228f_b173_4135_ab3b_a4c3c4caa7a8.png|Image]] Control component==
 
 
Drives the Matrix Control hardware via the AllCode API.
 
Drives the Matrix Control hardware via the AllCode API.
  
==Examples==
+
==Component Source Code==
''<span style="color:red;">No additional examples</span>''
 
  
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Control_ComponentSource.fcsx FC_Comp_Source_Control_ComponentSource.fcsx]
  
==Downloadable macro reference==
+
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Control_ComponentSource.fcsx FC_Comp_Source_Control_ComponentSource.fcsx]
  
''This component does not contain any downloadable macros''
+
==Detailed description==
  
==Simulation macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>SetAutoPrescaler</tt></u></span>===
 
Configures the automatic mode prescaler, for running really slowly.
 
  
Defaults off so no need to call this unless you are using it.
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Prescaler''
 
::0=Off, 2=Div by 2, 3=Div By 3 etc
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>GetOutput</tt></u></span>===
 
Gets the output value as an integer value betwen 0 and 100 representing
 
  
the output PWM duty
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
 
  
 +
''No detailed description exists yet for this component''
  
===<span style="font-weight: normal;"><u><tt>SetAutoOnOff</tt></u></span>===
+
==Examples==
Enable the auto PID control using the on-board microcontroller
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Channel''
 
::Range: 0-1
 
  
:[[Variable Types|BYTE]] ''Enable''
 
::0=Off, 1=5Hz, 2=10Hz, 3=20Hz, 4=50Hz, 5=100Hz, 6=200Hz, 7=500Hz, 8=1KHz
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>SetWIFIPort</tt></u></span>===
 
Configures the WIFI Port number.
 
  
Default 1245.
 
  
'''Parameters'''
 
  
:[[Variable Types|UINT]] ''Port''
 
::Default 1245
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>SetAutoPIDFlip</tt></u></span>===
 
Controls if the PID response is flipped, a negative response vs a positive
 
  
'''Parameters'''
 
  
:[[Variable Types|BOOL]] ''Flip''
+
''<span style="color:red;">No additional examples</span>''
::Default: 0=Not Flipped, 1=Flipped
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>SetBluetoothDetails</tt></u></span>===
 
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.
 
  
'''Parameters'''
 
  
:[[Variable Types|<- STRING]] ''Name''
 
::Bluetooth Device String, Max 20 Characters
 
::''This parameter may be returned back to the caller''
 
  
:[[Variable Types|<- STRING]] ''Pin''
 
::Pin String, 4 Numeric Characters e.g. "1234"
 
::''This parameter may be returned back to the caller''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
+
==Macro reference==
  
 +
===CheckErrorStatus===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckErrorStatus'''
 +
|-
 +
| colspan="2" | Returns the Error status value indicating if there has been any errors. 0 = No Error 1 = Timeout Error&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>GetDataArray</tt></u></span>===
 
Collects a data array from the Control board.
 
  
Returns number of samples collected.
+
===GetAPI===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAPI'''
 +
|-
 +
| colspan="2" | Gets the API version number&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|FLOAT]] ''data''
+
===GetDataArray===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDataArray'''
 +
|-
 +
| colspan="2" | Collects a data array from the Control board. Returns number of samples collected.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | data
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
  
'''Return value'''
+
===GetFeedback===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetFeedback'''
 +
|-
 +
| colspan="2" | Gets the feedback as a value in real world units&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|BYTE]]
 
  
 +
===GetOutput===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetOutput'''
 +
|-
 +
| colspan="2" | Gets the output value as an integer value betwen 0 and 100 representing the output PWM duty&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>GetWifiIP</tt></u></span>===
 
Collects the IP address of the robot arm WIFI connection.
 
  
'''Parameters'''
+
===GetPIDComponent===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPIDComponent'''
 +
|-
 +
| colspan="2" | Gets one of the PID controller output components in real world units&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Index
 +
|-
 +
| colspan="2" | Range 0-2, 0=P, 1=I, 2=D&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:''This macro has no parameters''
 
  
 +
===GetWifiIP===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetWifiIP'''
 +
|-
 +
| colspan="2" | Collects the IP address of the robot arm WIFI connection.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|STRING]]
+
===Initialise===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>SetWifiDetails</tt></u></span>===
+
===ResetToBoot===
Configures the WIFI SSID and Password strings and stores into the none volatie memory onboard the robot arm.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetToBoot'''
 +
|-
 +
| colspan="2" | Resets the board into bootload mode for reprogramming. Comms port will be closed on calling this macro,&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
Call the SetWifiMode macro after this to action the change.
 
  
'''Parameters'''
+
===SetAutoOnOff===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoOnOff'''
 +
|-
 +
| colspan="2" | Enable the auto PID control using the on-board microcontroller&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | Range: 0-1&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Enable
 +
|-
 +
| colspan="2" | 0=Off, 1=5Hz, 2=10Hz, 3=20Hz, 4=50Hz, 5=100Hz, 6=200Hz, 7=500Hz, 8=1KHz&nbsp;
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|<- STRING]] ''SSID''
 
::Netword ID String, Max 32 Characters
 
::''This parameter may be returned back to the caller''
 
  
:[[Variable Types|<- STRING]] ''Password''
+
===SetAutoOnOffParam===
::Password String, Max 32 Characters
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::''This parameter may be returned back to the caller''
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoOnOffParam'''
 +
|-
 +
| colspan="2" | Sets the Hysteresis parameter for the Auto on-board On/Off&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | Hysteresis
 +
|-
 +
| colspan="2" | Hysterists in real world units&nbsp;
 +
|-
 +
| 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''
 +
|}
  
  
'''Return value'''
+
===SetAutoPID===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPID'''
 +
|-
 +
| colspan="2" | Enable the auto PID control using the on-board microcontroller&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | Range: 0-1&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Enable
 +
|-
 +
| colspan="2" | 0=Off, 1=5Hz, 2=10Hz, 3=20Hz, 4=50Hz, 5=100Hz, 6=200Hz, 7=500Hz, 8=1KHz&nbsp;
 +
|-
 +
| 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''
 +
|}
  
:''This call does not return a value''
 
  
 +
===SetAutoPIDFlip===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPIDFlip'''
 +
|-
 +
| colspan="2" | Controls if the PID response is flipped, a negative response vs a positive&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | Flip
 +
|-
 +
| colspan="2" | Default: 0=Not Flipped, 1=Flipped&nbsp;
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>ResetToBoot</tt></u></span>===
 
Resets the board into bootload mode for reprogramming.
 
  
Comms port will be closed on calling this macro,
+
===SetAutoPIDParam===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPIDParam'''
 +
|-
 +
| colspan="2" | Sets one of the P, I, D parameters for the Auto on-board PID&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Index
 +
|-
 +
| colspan="2" | Range: 0-5 Where 0=P, 1=I, 2=D, 3=IntClamp, 4=DFilt, 5=FiltCo&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | Value
 +
|-
 +
| colspan="2" | Range: 0.0 to 65.535&nbsp;
 +
|-
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
===SetAutoPrescaler===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPrescaler'''
 +
|-
 +
| colspan="2" | Configures the automatic mode prescaler, for running really slowly. Defaults off so no need to call this unless you are using it.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Prescaler
 +
|-
 +
| colspan="2" | 0=Off, 2=Div by 2, 3=Div By 3 etc&nbsp;
 +
|-
 +
| 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''
 +
|}
  
  
'''Return value'''
+
===SetBluetoothDetails===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBluetoothDetails'''
 +
|-
 +
| colspan="2" | 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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Name
 +
|-
 +
| colspan="2" | Bluetooth Device String, Max 20 Characters&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Pin
 +
|-
 +
| colspan="2" | Pin String, 4 Numeric Characters e.g. "1234"&nbsp;
 +
|-
 +
| 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''
 +
|}
  
:''This call does not return a value''
 
  
 +
===SetBluetoothMode===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBluetoothMode'''
 +
|-
 +
| colspan="2" | Configures the Bluetooth mode.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | Mode
 +
|-
 +
| colspan="2" | 0=Disabled, 1=Enabled&nbsp;
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>SetAutoOnOffParam</tt></u></span>===
 
Sets the Hysteresis parameter for the Auto on-board On/Off
 
  
'''Parameters'''
+
===SetCANID===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCANID'''
 +
|-
 +
| colspan="2" | Stores the specified CAN ID into an internal none volatile memory location.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ID
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|FLOAT]] ''Hysteresis''
 
::Hysterists in real world units
 
  
 +
===SetCANMode===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCANMode'''
 +
|-
 +
| colspan="2" | Configures if the CAN API mde is enabled or disabled.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Mode
 +
|-
 +
| colspan="2" | 0=Disabled / 1=Enabled&nbsp;
 +
|-
 +
| 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''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
+
===SetEthernetIP===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEthernetIP'''
 +
|-
 +
| colspan="2" | Configures the Ethernet IP Address.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | IP
 +
|-
 +
| colspan="2" | IP Address string e.g. "192.168.1.100"&nbsp;
 +
|-
 +
| 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''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>SetWifiMode</tt></u></span>===
+
===SetEthernetMode===
Configures the WIFI mode.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEthernetMode'''
 +
|-
 +
| colspan="2" | Configures the Ethernet mode.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Mode
 +
|-
 +
| colspan="2" | 0=Disabled, 1=Enabled&nbsp;
 +
|-
 +
| 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''
 +
|}
  
When enabled the control system can either create its own WIFI network or join an existing WIFI network,
 
  
'''Parameters'''
+
===SetEthernetPort===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEthernetPort'''
 +
|-
 +
| colspan="2" | Configures the Ethernet Port number.  Default 1245.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Port
 +
|-
 +
| colspan="2" | Default 1245&nbsp;
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|BYTE]] ''Mode''
 
::0=Disabled, 1=Host Network, 2=Join Network
 
  
 +
===SetFeedbackMethod===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFeedbackMethod'''
 +
|-
 +
| colspan="2" | Sets feedback method to dictate which control application we are running&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | FBMethod
 +
|-
 +
| colspan="2" | Range: 0-3 Where 0=Level, 1=Flow, 2=Pressure, 3=Temp&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | InputScaler
 +
|-
 +
| colspan="2" | Feedback scaling factor used to convert the feedback reading into a meaningful value&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | OutputScaler
 +
|-
 +
| colspan="2" | Value used to convert input to 0-100% duty&nbsp;
 +
|-
 +
| 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''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
+
===SetLogDivider===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLogDivider'''
 +
|-
 +
| colspan="2" | Configures the rate of the PID logging.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Divider
 +
|-
 +
| colspan="2" | Divides the rate by the selected value&nbsp;
 +
|-
 +
| 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''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>GetPIDComponent</tt></u></span>===
+
===SetManualDuty===
Gets one of the PID controller output components in real world units
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetManualDuty'''
 +
|-
 +
| colspan="2" | Sets duty parameter for one of the manual controlled outputs&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | Range: 0-1&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | Duty
 +
|-
 +
| colspan="2" | Duty Cycle Output in Percentage Range 0 - 100%&nbsp;
 +
|-
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Index''
+
===SetSetpoint===
::Range 0-2, 0=P, 1=I, 2=D
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSetpoint'''
 +
|-
 +
| colspan="2" | Sets Setpoint parameter for the Auto on-board PID&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | Setpoint
 +
|-
 +
| colspan="2" | Required Output in Real World Units&nbsp;
 +
|-
 +
| 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''
 +
|}
  
  
'''Return value'''
+
===SetWIFIPort===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWIFIPort'''
 +
|-
 +
| colspan="2" | Configures the WIFI Port number.  Default 1245.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Port
 +
|-
 +
| colspan="2" | Default 1245&nbsp;
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|FLOAT]]
 
  
 +
===SetWifiDetails===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWifiDetails'''
 +
|-
 +
| colspan="2" | 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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | SSID
 +
|-
 +
| colspan="2" | Netword ID String, Max 32 Characters&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Password
 +
|-
 +
| colspan="2" | Password String, Max 32 Characters&nbsp;
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>SetEthernetPort</tt></u></span>===
 
Configures the Ethernet Port number.
 
  
Default 1245.
+
===SetWifiMode===
 
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
'''Parameters'''
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
:[[Variable Types|UINT]] ''Port''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWifiMode'''
::Default 1245
+
|-
 
+
| colspan="2" | Configures the WIFI mode. When enabled the control system can either create its own WIFI network or join an existing WIFI network,&nbsp;
 
+
|-
'''Return value'''
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
:''This call does not return a value''
+
| width="90%" | Mode
 
+
|-
 
+
| colspan="2" | 0=Disabled, 1=Host Network, 2=Join Network&nbsp;
===<span style="font-weight: normal;"><u><tt>SetEthernetIP</tt></u></span>===
+
|-
Configures the Ethernet IP Address.
+
| 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''
'''Parameters'''
+
|}
 
 
:[[Variable Types|<- STRING]] ''IP''
 
::IP Address string e.g. "192.168.1.100"
 
::''This parameter may be returned back to the caller''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetCANID</tt></u></span>===
 
Stores the specified CAN ID into an internal none volatile memory location.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|UINT]] ''ID''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetFeedback</tt></u></span>===
 
Gets the feedback as a value in real world units
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|FLOAT]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetAPI</tt></u></span>===
 
Gets the API version number
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BYTE]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetManualDuty</tt></u></span>===
 
Sets duty parameter for one of the manual controlled outputs
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Channel''
 
::Range: 0-1
 
 
 
:[[Variable Types|FLOAT]] ''Duty''
 
::Duty Cycle Output in Percentage Range 0 - 100%
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>CheckErrorStatus</tt></u></span>===
 
Returns the Error status value indicating if there has been any errors.
 
 
 
0 = No Error
 
 
 
1 = Timeout Error
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BYTE]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetCANMode</tt></u></span>===
 
Configures if the CAN API mde is enabled or disabled.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Mode''
 
::0=Disabled / 1=Enabled
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetAutoPID</tt></u></span>===
 
Enable the auto PID control using the on-board microcontroller
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Channel''
 
::Range: 0-1
 
 
 
:[[Variable Types|BYTE]] ''Enable''
 
::0=Off, 1=5Hz, 2=10Hz, 3=20Hz, 4=50Hz, 5=100Hz, 6=200Hz, 7=500Hz, 8=1KHz
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetLogDivider</tt></u></span>===
 
Configures the rate of the PID logging.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Divider''
 
::Divides the rate by the selected value
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>ZeroSensor</tt></u></span>===
 
Zeros the attached sensor reading.
 
 
 
Useful for Pressure and Level control applications.
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetAutoPIDParam</tt></u></span>===
 
Sets one of the P, I, D parameters for the Auto on-board PID
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Index''
 
::Range: 0-5 Where 0=P, 1=I, 2=D, 3=IntClamp, 4=DFilt, 5=FiltCo
 
 
 
:[[Variable Types|FLOAT]] ''Value''
 
::Range: 0.0 to 65.535
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetEthernetMode</tt></u></span>===
 
Configures the Ethernet mode.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Mode''
 
::0=Disabled, 1=Enabled
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetBluetoothMode</tt></u></span>===
 
Configures the Bluetooth mode.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BOOL]] ''Mode''
 
::0=Disabled, 1=Enabled
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetFeedbackMethod</tt></u></span>===
 
Sets feedback method to dictate which control application we are running
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''FBMethod''
 
::Range: 0-3 Where 0=Level, 1=Flow, 2=Pressure, 3=Temp
 
 
 
:[[Variable Types|FLOAT]] ''InputScaler''
 
::Feedback scaling factor used to convert the feedback reading into a meaningful value
 
 
 
:[[Variable Types|FLOAT]] ''OutputScaler''
 
::Value used to convert input to 0-100% duty
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetSetpoint</tt></u></span>===
 
Sets Setpoint parameter for the Auto on-board PID
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|FLOAT]] ''Setpoint''
 
::Required Output in Real World Units
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
  
  
 +
===ZeroSensor===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ZeroSensor'''
 +
|-
 +
| colspan="2" | Zeros the attached sensor reading.  Useful for Pressure and Level control applications.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Comms Method</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''CommsMethod''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Selects the method to communicate with the Matrix 3 Axis Robot Arm.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
USB connection requires the USB drivers to be installed.
+
|-
 
+
|-
Bluetooth connection requires the device first be paired using the Windows Bluetooth control panel.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Comms Method
WIFI connection requires the connection settings to be configured first on the robot using USB or Bluetooth.  
+
|-
 
+
| colspan="2" | 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.&nbsp;
CAN connection does not simulate and works on embedded hardware e.g. the MIAC.
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
<span style="font-weight: normal;"><u>Autodetect</u></span>
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | COM Port Settings
 
+
|-
This property is of type ''True or false'' and can be referenced with the variable name ''Autodetect''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
Autodetects the COM port, only works for USB AllCode connection.
+
| width="90%" | Autodetect
 
+
|-
<span style="font-weight: normal;"><u>COM Port</u></span>
+
| colspan="2" | Autodetects the COM port, only works for USB AllCode connection.&nbsp;
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''COMPort1::COM_port''.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | COM Port
Selects which port to communicate with, only lists ports which are currently available.
+
|-
 
+
| colspan="2" | Selects which port to communicate with, only lists ports which are currently available. &nbsp;
<span style="font-weight: normal;"><u>Network Interface</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''NetworkComms1::NetworkInterface''.
+
| width="90%" | Text Colour
 
+
|-
Some computers may have several network interfaces such as ethernet ports and wifi access.
+
| colspan="2" | &nbsp;
 
+
|}
Select the correct network interface for the network you wish to connect to.
 
 
 
Use the IP address to confirm you are connected to the right network.
 
 
 
<span style="font-weight: normal;"><u>Local IP Address</u></span>
 
 
 
This property is of type ''Line of text'' and can be referenced with the variable name ''NetworkComms1::IPAddress''.
 
 
 
IP Address of the selected network interface.
 
 
 
<span style="font-weight: normal;"><u>Control IP Address</u></span>
 
 
 
This property is of type ''Line of text'' and can be referenced with the variable name ''ArmIP''.
 
 
 
IP address of the Control Board.
 
 
 
You can find the IP address by connecting using USB and running the GetIP component macro.
 
 
 
You may first need to configure the Control Board in WIFI mode by providing the network SSID and Password.
 
 
 
<span style="font-weight: normal;"><u>Port</u></span>
 
 
 
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Port''.
 
 
 
Allows the Control TCP/IP Port to be selected. Default 1245.
 
 
 
<span style="font-weight: normal;"><u>Channel</u></span>
 
 
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''can1::CHANNEL_CAN''.
 
 
 
Switches between Internal CAN peripheral and External CAN controller IC MCP2515.
 
 
 
<span style="font-weight: normal;"><u>Text Colour</u></span>
 
 
 
This property is of type ''Color picker'' and can be referenced with the variable name ''TextColour''.
 
 
 
''<span style="color:red;">No additional information</span>''
 

Latest revision as of 13:09, 7 February 2023

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