Difference between revisions of "Component: Control (AllCode)"
From Flowcode Help
Jump to navigationJump to search| Line 61: | Line 61: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
| + | |||
| + | |||
| Line 67: | Line 69: | ||
==Macro reference== | ==Macro reference== | ||
| + | ===SetAutoPrescaler=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 85: | Line 88: | ||
| + | ===GetOutput=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 98: | Line 102: | ||
| + | ===SetAutoOnOff=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 121: | Line 126: | ||
| + | ===SetWIFIPort=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 139: | Line 145: | ||
| + | ===SetAutoPIDFlip=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 157: | Line 164: | ||
| + | ===SetBluetoothDetails=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 180: | Line 188: | ||
| + | ===GetDataArray=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 198: | Line 207: | ||
| + | ===GetWifiIP=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 211: | Line 221: | ||
| + | ===SetWifiDetails=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 234: | Line 245: | ||
| + | ===ResetToBoot=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 247: | Line 259: | ||
| + | ===SetAutoOnOffParam=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 265: | Line 278: | ||
| + | ===SetWifiMode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 283: | Line 297: | ||
| + | ===GetPIDComponent=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 301: | Line 316: | ||
| + | ===SetEthernetPort=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 319: | Line 335: | ||
| + | ===SetEthernetIP=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 337: | Line 354: | ||
| + | ===SetCANID=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 355: | Line 373: | ||
| + | ===GetFeedback=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 368: | Line 387: | ||
| + | ===GetAPI=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 381: | Line 401: | ||
| + | ===SetManualDuty=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 404: | Line 425: | ||
| + | ===CheckErrorStatus=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 417: | Line 439: | ||
| + | ===SetCANMode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 435: | Line 458: | ||
| + | ===SetAutoPID=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 458: | Line 482: | ||
| + | ===SetLogDivider=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 476: | Line 501: | ||
| + | ===ZeroSensor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 489: | Line 515: | ||
| + | ===SetAutoPIDParam=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 512: | Line 539: | ||
| + | ===SetEthernetMode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 530: | Line 558: | ||
| + | ===SetBluetoothMode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 548: | Line 577: | ||
| + | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 561: | Line 591: | ||
| + | ===SetFeedbackMethod=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 589: | Line 620: | ||
| + | ===SetSetpoint=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Revision as of 11:48, 3 February 2023
| Author | Matrix TSL |
| Version | 1.0 |
| Category | AllCode |
Contents
- 1 Control component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 SetAutoPrescaler
- 5.2 GetOutput
- 5.3 SetAutoOnOff
- 5.4 SetWIFIPort
- 5.5 SetAutoPIDFlip
- 5.6 SetBluetoothDetails
- 5.7 GetDataArray
- 5.8 GetWifiIP
- 5.9 SetWifiDetails
- 5.10 ResetToBoot
- 5.11 SetAutoOnOffParam
- 5.12 SetWifiMode
- 5.13 GetPIDComponent
- 5.14 SetEthernetPort
- 5.15 SetEthernetIP
- 5.16 SetCANID
- 5.17 GetFeedback
- 5.18 GetAPI
- 5.19 SetManualDuty
- 5.20 CheckErrorStatus
- 5.21 SetCANMode
- 5.22 SetAutoPID
- 5.23 SetLogDivider
- 5.24 ZeroSensor
- 5.25 SetAutoPIDParam
- 5.26 SetEthernetMode
- 5.27 SetBluetoothMode
- 5.28 Initialise
- 5.29 SetFeedbackMethod
- 5.30 SetSetpoint
- 6 Property reference
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
SetAutoPrescaler
GetOutput
| GetOutput | |
| Gets the output value as an integer value betwen 0 and 100 representing the output PWM duty | |
| Return | |
SetAutoOnOff
SetWIFIPort
| SetWIFIPort | |
| Configures the WIFI Port number. Default 1245. | |
| Port | |
| Default 1245 | |
| Return | |
SetAutoPIDFlip
| SetAutoPIDFlip | |
| Controls if the PID response is flipped, a negative response vs a positive | |
| Flip | |
| Default: 0=Not Flipped, 1=Flipped | |
| Return | |
SetBluetoothDetails
GetDataArray
| GetDataArray | |
| Collects a data array from the Control board. Returns number of samples collected. | |
| data | |
| Return | |
GetWifiIP
| GetWifiIP | |
| Collects the IP address of the robot arm WIFI connection. | |
| Return | |
SetWifiDetails
ResetToBoot
| ResetToBoot | |
| Resets the board into bootload mode for reprogramming. Comms port will be closed on calling this macro, | |
| Return | |
SetAutoOnOffParam
| SetAutoOnOffParam | |
| Sets the Hysteresis parameter for the Auto on-board On/Off | |
| Hysteresis | |
| Hysterists in real world units | |
| Return | |
SetWifiMode
GetPIDComponent
| GetPIDComponent | |
| Gets one of the PID controller output components in real world units | |
| Index | |
| Range 0-2, 0=P, 1=I, 2=D | |
| Return | |
SetEthernetPort
| SetEthernetPort | |
| Configures the Ethernet Port number. Default 1245. | |
| Port | |
| Default 1245 | |
| Return | |
SetEthernetIP
| SetEthernetIP | |
| Configures the Ethernet IP Address. | |
| IP | |
| IP Address string e.g. "192.168.1.100" | |
| Return | |
SetCANID
| SetCANID | |
| Stores the specified CAN ID into an internal none volatile memory location. | |
| ID | |
| Return | |
GetFeedback
| GetFeedback | |
| Gets the feedback as a value in real world units | |
| Return | |
GetAPI
| GetAPI | |
| Gets the API version number | |
| Return | |
SetManualDuty
| SetManualDuty | |
| Sets duty parameter for one of the manual controlled outputs | |
| Channel | |
| Range: 0-1 | |
| Duty | |
| Duty Cycle Output in Percentage Range 0 - 100% | |
| Return | |
CheckErrorStatus
| CheckErrorStatus | |
| Returns the Error status value indicating if there has been any errors. 0 = No Error 1 = Timeout Error | |
| Return | |
SetCANMode
| SetCANMode | |
| Configures if the CAN API mde is enabled or disabled. | |
| Mode | |
| 0=Disabled / 1=Enabled | |
| Return | |
SetAutoPID
| SetAutoPID | |
| Enable the auto PID control using the on-board microcontroller | |
| Channel | |
| Range: 0-1 | |
| Enable | |
| 0=Off, 1=5Hz, 2=10Hz, 3=20Hz, 4=50Hz, 5=100Hz, 6=200Hz, 7=500Hz, 8=1KHz | |
| Return | |
SetLogDivider
| SetLogDivider | |
| Configures the rate of the PID logging. | |
| Divider | |
| Divides the rate by the selected value | |
| Return | |
ZeroSensor
| ZeroSensor | |
| Zeros the attached sensor reading. Useful for Pressure and Level control applications. | |
| Return | |
SetAutoPIDParam
SetEthernetMode
| SetEthernetMode | |
| Configures the Ethernet mode. | |
| Mode | |
| 0=Disabled, 1=Enabled | |
| Return | |
SetBluetoothMode
| SetBluetoothMode | |
| Configures the Bluetooth mode. | |
| Mode | |
| 0=Disabled, 1=Enabled | |
| Return | |
Initialise
| Initialise | |
| Return | |
SetFeedbackMethod
SetSetpoint
| SetSetpoint | |
| Sets Setpoint parameter for the Auto on-board PID | |
| Setpoint | |
| Required Output in Real World Units | |
| Return | |