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

From Flowcode Help
Jump to navigationJump to search
 
(11 intermediate revisions by the same user not shown)
Line 15: Line 15:
 
Drives the Matrix Control hardware via the AllCode API.
 
Drives the Matrix Control hardware via the AllCode API.
  
==Component Pack==
+
==Component Source Code==
  
FREE
+
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]
 +
 
 +
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]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
 
''No detailed description exists yet for this component''
 
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 29: Line 63:
  
  
==Downloadable macro reference==
 
  
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
==Macro reference==
 +
 +
===CheckErrorStatus===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPrescaler'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckErrorStatus'''
 
|-
 
|-
| colspan="2" | Configures the automatic mode prescaler, for running really slowly. Defaults off so no need to call this unless you are using it. 
+
| colspan="2" | Returns the Error status value indicating if there has been any errors. 0 = No Error 1 = Timeout Error 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Prescaler
 
|-
 
| colspan="2" | 0=Off, 2=Div by 2, 3=Div By 3 etc 
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetAPI===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetOutput'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAPI'''
 
|-
 
|-
| colspan="2" | Gets the output value as an integer value betwen 0 and 100 representing the output PWM duty 
+
| colspan="2" | Gets the API version number 
 
|-
 
|-
 
|-
 
|-
Line 62: Line 103:
  
  
 +
===GetDataArray===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoOnOff'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDataArray'''
 
|-
 
|-
| colspan="2" | Enable the auto PID control using the on-board microcontroller 
+
| colspan="2" | Collects a data array from the Control board. Returns number of samples collected. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Channel
+
| width="90%" | data
 
|-
 
|-
| colspan="2" | Range: 0-1 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[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 
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetFeedback===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWIFIPort'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetFeedback'''
 
|-
 
|-
| colspan="2" | Configures the WIFI Port number.  Default 1245. 
+
| colspan="2" | Gets the feedback as a value in real world units 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Port
 
|-
 
| colspan="2" | Default 1245 
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetOutput===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPIDFlip'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetOutput'''
 
|-
 
|-
| colspan="2" | Controls if the PID response is flipped, a negative response vs a positive 
+
| colspan="2" | Gets the output value as an integer value betwen 0 and 100 representing the output PWM duty 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Flip
 
|-
 
| colspan="2" | Default: 0=Not Flipped, 1=Flipped 
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetPIDComponent===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBluetoothDetails'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPIDComponent'''
 
|-
 
|-
| 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. 
+
| colspan="2" | Gets one of the PID controller output components in real world units 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Name
+
| width="90%" | Index
 
|-
 
|-
| colspan="2" | Bluetooth Device String, Max 20 Characters 
+
| colspan="2" | Range 0-2, 0=P, 1=I, 2=D 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Pin
 
|-
 
| colspan="2" | Pin String, 4 Numeric Characters e.g. "1234" 
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetWifiIP===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDataArray'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetWifiIP'''
 
|-
 
|-
| colspan="2" | Collects a data array from the Control board. Returns number of samples collected. 
+
| colspan="2" | Collects the IP address of the robot arm WIFI connection. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | data
 
|-
 
| colspan="2" |  
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===Initialise===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetWifiIP'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| colspan="2" | Collects the IP address of the robot arm WIFI connection. 
+
| colspan="2" |  
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===ResetToBoot===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWifiDetails'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetToBoot'''
 
|-
 
|-
| 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. 
+
| colspan="2" | Resets the board into bootload mode for reprogramming. Comms port will be closed on calling this macro, 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | SSID
 
|-
 
| colspan="2" | Netword ID String, Max 32 Characters 
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Password
 
 
|-
 
|-
| colspan="2" | Password String, Max 32 Characters 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 198: Line 211:
  
  
 +
===SetAutoOnOff===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetToBoot'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoOnOff'''
 +
|-
 +
| colspan="2" | Enable the auto PID control using the on-board microcontroller 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | Range: 0-1 
 
|-
 
|-
| colspan="2" | Resets the board into bootload mode for reprogramming. Comms port will be closed on calling this macro, 
+
| 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 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 211: Line 235:
  
  
 +
===SetAutoOnOffParam===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 229: Line 254:
  
  
 +
===SetAutoPID===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWifiMode'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPID'''
 +
|-
 +
| colspan="2" | Enable the auto PID control using the on-board microcontroller 
 +
|-
 
|-
 
|-
| colspan="2" | Configures the WIFI mode. When enabled the control system can either create its own WIFI network or join an existing WIFI network, 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Channel
 
|-
 
|-
 +
| colspan="2" | Range: 0-1 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mode
+
| width="90%" | Enable
 
|-
 
|-
| colspan="2" | 0=Disabled, 1=Host Network, 2=Join Network 
+
| colspan="2" | 0=Off, 1=5Hz, 2=10Hz, 3=20Hz, 4=50Hz, 5=100Hz, 6=200Hz, 7=500Hz, 8=1KHz 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 247: Line 278:
  
  
 +
===SetAutoPIDFlip===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPIDComponent'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPIDFlip'''
 
|-
 
|-
| colspan="2" | Gets one of the PID controller output components in real world units 
+
| colspan="2" | Controls if the PID response is flipped, a negative response vs a positive 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Index
+
| width="90%" | Flip
 
|-
 
|-
| colspan="2" | Range 0-2, 0=P, 1=I, 2=D 
+
| colspan="2" | Default: 0=Not Flipped, 1=Flipped 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SetAutoPIDParam===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEthernetPort'''
+
| 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 
 +
|-
 
|-
 
|-
| colspan="2" | Configures the Ethernet Port number. Default 1245. 
+
| 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 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Port
+
| width="90%" | Value
 
|-
 
|-
| colspan="2" | Default 1245 
+
| colspan="2" | Range: 0.0 to 65.535 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 283: Line 321:
  
  
 +
===SetAutoPrescaler===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEthernetIP'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPrescaler'''
 
|-
 
|-
| colspan="2" | Configures the Ethernet IP Address. 
+
| colspan="2" | Configures the automatic mode prescaler, for running really slowly. Defaults off so no need to call this unless you are using it. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | IP
+
| width="90%" | Prescaler
 
|-
 
|-
| colspan="2" | IP Address string e.g. "192.168.1.100" 
+
| colspan="2" | 0=Off, 2=Div by 2, 3=Div By 3 etc 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 301: Line 340:
  
  
 +
===SetBluetoothDetails===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCANID'''
+
| 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. 
 +
|-
 
|-
 
|-
| colspan="2" | Stores the specified CAN ID into an internal none volatile memory location. 
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Name
 
|-
 
|-
 +
| colspan="2" | Bluetooth Device String, Max 20 Characters 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | ID
+
| width="90%" | Pin
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Pin String, 4 Numeric Characters e.g. "1234" 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 319: Line 364:
  
  
 +
===SetBluetoothMode===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetFeedback'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBluetoothMode'''
 +
|-
 +
| colspan="2" | Configures the Bluetooth mode. 
 +
|-
 
|-
 
|-
| colspan="2" | Gets the feedback as a value in real world units 
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | Mode
 
|-
 
|-
 +
| colspan="2" | 0=Disabled, 1=Enabled 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SetCANID===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAPI'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCANID'''
 +
|-
 +
| colspan="2" | Stores the specified CAN ID into an internal none volatile memory location. 
 +
|-
 
|-
 
|-
| colspan="2" | Gets the API version number 
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ID
 
|-
 
|-
 +
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SetCANMode===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetManualDuty'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCANMode'''
 
|-
 
|-
| colspan="2" | Sets duty parameter for one of the manual controlled outputs 
+
| colspan="2" | Configures if the CAN API mde is enabled or disabled. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
+
| width="90%" | Mode
 
|-
 
|-
| colspan="2" | Range: 0-1 
+
| colspan="2" | 0=Disabled / 1=Enabled 
|-
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="90%" | Duty
 
|-
 
| colspan="2" | Duty Cycle Output in Percentage Range 0 - 100% 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 368: Line 421:
  
  
 +
===SetEthernetIP===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckErrorStatus'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEthernetIP'''
 +
|-
 +
| colspan="2" | Configures the Ethernet IP Address. 
 +
|-
 
|-
 
|-
| colspan="2" | Returns the Error status value indicating if there has been any errors. 0 = No Error 1 = Timeout Error 
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | IP
 
|-
 
|-
 +
| colspan="2" | IP Address string e.g. "192.168.1.100" 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SetEthernetMode===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCANMode'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEthernetMode'''
 
|-
 
|-
| colspan="2" | Configures if the CAN API mde is enabled or disabled. 
+
| colspan="2" | Configures the Ethernet mode. 
 
|-
 
|-
 
|-
 
|-
Line 392: Line 452:
 
| width="90%" | Mode
 
| width="90%" | Mode
 
|-
 
|-
| colspan="2" | 0=Disabled / 1=Enabled 
+
| colspan="2" | 0=Disabled, 1=Enabled 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 399: Line 459:
  
  
 +
===SetEthernetPort===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPID'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEthernetPort'''
 
|-
 
|-
| colspan="2" | Enable the auto PID control using the on-board microcontroller 
+
| colspan="2" | Configures the Ethernet Port number.  Default 1245. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Channel
+
| width="90%" | Port
 
|-
 
|-
| colspan="2" | Range: 0-1 
+
| colspan="2" | Default 1245 
|-
 
| 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 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 422: Line 478:
  
  
 +
===SetFeedbackMethod===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLogDivider'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFeedbackMethod'''
 
|-
 
|-
| colspan="2" | Configures the rate of the PID logging. 
+
| colspan="2" | Sets feedback method to dictate which control application we are running 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Divider
+
| width="90%" | FBMethod
 +
|-
 +
| colspan="2" | Range: 0-3 Where 0=Level, 1=Flow, 2=Pressure, 3=Temp 
 +
|-
 +
| 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 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | OutputScaler
 
|-
 
|-
| colspan="2" | Divides the rate by the selected value 
+
| colspan="2" | Value used to convert input to 0-100% duty 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 440: Line 507:
  
  
 +
===SetLogDivider===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ZeroSensor'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLogDivider'''
 
|-
 
|-
| colspan="2" | Zeros the attached sensor reading.  Useful for Pressure and Level control applications. 
+
| colspan="2" | Configures the rate of the PID logging. 
 
|-
 
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Divider
 +
|-
 +
| colspan="2" | Divides the rate by the selected value 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 453: Line 526:
  
  
 +
===SetManualDuty===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoPIDParam'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetManualDuty'''
 
|-
 
|-
| colspan="2" | Sets one of the P, I, D parameters for the Auto on-board PID 
+
| colspan="2" | Sets duty parameter for one of the manual controlled outputs 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Index
+
| width="90%" | Channel
 
|-
 
|-
| colspan="2" | Range: 0-5 Where 0=P, 1=I, 2=D, 3=IntClamp, 4=DFilt, 5=FiltCo 
+
| colspan="2" | Range: 0-1 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Value
+
| width="90%" | Duty
 
|-
 
|-
| colspan="2" | Range: 0.0 to 65.535 
+
| colspan="2" | Duty Cycle Output in Percentage Range 0 - 100% 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 476: Line 550:
  
  
 +
===SetSetpoint===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEthernetMode'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSetpoint'''
 
|-
 
|-
| colspan="2" | Configures the Ethernet mode. 
+
| colspan="2" | Sets Setpoint parameter for the Auto on-board PID 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Mode
+
| width="90%" | Setpoint
 
|-
 
|-
| colspan="2" | 0=Disabled, 1=Enabled 
+
| colspan="2" | Required Output in Real World Units 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 494: Line 569:
  
  
 +
===SetWIFIPort===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBluetoothMode'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWIFIPort'''
 
|-
 
|-
| colspan="2" | Configures the Bluetooth mode. 
+
| colspan="2" | Configures the WIFI Port number.  Default 1245. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Mode
+
| width="90%" | Port
 
|-
 
|-
| colspan="2" | 0=Disabled, 1=Enabled 
+
| colspan="2" | Default 1245 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 512: Line 588:
  
  
 +
===SetWifiDetails===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
+
| 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. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | SSID
 +
|-
 +
| colspan="2" | Netword ID String, Max 32 Characters 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Password
 
|-
 
|-
 +
| colspan="2" | Password String, Max 32 Characters 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 525: Line 612:
  
  
 +
===SetWifiMode===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFeedbackMethod'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWifiMode'''
 
|-
 
|-
| colspan="2" | Sets feedback method to dictate which control application we are running 
+
| colspan="2" | Configures the WIFI mode. When enabled the control system can either create its own WIFI network or join an existing WIFI network, 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | FBMethod
+
| width="90%" | Mode
 
|-
 
|-
| colspan="2" | Range: 0-3 Where 0=Level, 1=Flow, 2=Pressure, 3=Temp 
+
| colspan="2" | 0=Disabled, 1=Host Network, 2=Join Network 
|-
 
| 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 
 
|-
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="90%" | OutputScaler
 
|-
 
| colspan="2" | Value used to convert input to 0-100% duty 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 553: Line 631:
  
  
 +
===ZeroSensor===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSetpoint'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ZeroSensor'''
 
|-
 
|-
| colspan="2" | Sets Setpoint parameter for the Auto on-board PID 
+
| colspan="2" | Zeros the attached sensor reading.  Useful for Pressure and Level control applications. 
 
|-
 
|-
|-
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="90%" | Setpoint
 
|-
 
| colspan="2" | Required Output in Real World Units 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  
Line 585: Line 657:
 
|-
 
|-
 
| 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. 
 
| 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. 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | COM Port Settings
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
Line 595: Line 671:
 
|-
 
|-
 
| colspan="2" | 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.  
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Network Interface
 
|-
 
| colspan="2" | Some computers may have several network interfaces such as ethernet ports and wifi access. 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. 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
| width="90%" | Local IP Address
 
|-
 
| colspan="2" | IP Address of the selected network interface. 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
| width="90%" | Control IP Address
 
|-
 
| colspan="2" | 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. 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Port
 
|-
 
| colspan="2" | Allows the Control TCP/IP Port to be selected. Default 1245. 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Channel
 
|-
 
| colspan="2" | Switches between Internal CAN peripheral and External CAN controller IC MCP2515. 
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
Line 625: Line 676:
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
|-
 
 
|}
 
|}

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