Difference between revisions of "Component: Electrical Machines (AllCode)"

From Flowcode Help
Jump to navigationJump to search
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_EM_Functions.fcsx FC_Comp_Source_EM_Functions.fcsx]
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/EM_Functions.fcsx FC_Comp_Source_temp/EM_Functions.fcsx]
  
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_EM_Functions.fcsx FC_Comp_Source_EM_Functions.fcsx]
+
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/EM_Functions.fcsx FC_Comp_Source_temp/EM_Functions.fcsx]
  
 
==Detailed description==
 
==Detailed description==
Line 57: Line 57:
  
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
 +
 +
  
  
Line 65: Line 67:
 
==Macro reference==
 
==Macro reference==
  
===GetLogDataReady===
+
===Get3PhaseMode===
 
{| 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;" | '''GetLogDataReady'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Get3PhaseMode'''
 
|-
 
|-
| colspan="2" | Checks to see if the logging is complete and ready to read.&nbsp;
+
| colspan="2" | Checks to see if the brushless mode is enabled&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 79: Line 81:
  
  
===GetRPM===
+
===GetAPIVersion===
 
{| 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;" | '''GetRPM'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAPIVersion'''
 
|-
 
|-
| colspan="2" | Reads the speed in RPM&nbsp;
+
| colspan="2" | Reads the API firmware version&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
+
| 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''
 
|}
 
|}
  
  
===GetWeight===
+
===GetAbsPosition===
 
{| 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;" | '''GetWeight'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAbsPosition'''
 
|-
 
|-
| colspan="2" | Reads the voltage of a single channel&nbsp;
+
| colspan="2" | Reads the absolute position of the encoder&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Scale
 
|-
 
| colspan="2" | Range: 0-1 -  0=Weight, 1=Torque&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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===SetControlKP===
+
===GetCommsOK===
 
{| 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;" | '''SetControlKP'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCommsOK'''
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | Checks if comms are ok and stable&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Value
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===SetControlSetpoint===
+
===GetControlFeedback===
 
{| 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;" | '''SetControlSetpoint'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetControlFeedback'''
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Value
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===GetAPIVersion===
+
===GetControlOutputs===
 
{| 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;" | '''GetAPIVersion'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetControlOutputs'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 
|-
 
|-
| colspan="2" | Reads the API firmware version&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="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''
 
|}
 
|}
  
  
===GetLogData===
+
===GetCurrent===
 
{| 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;" | '''GetLogData'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCurrent'''
 
|-
 
|-
| colspan="2" | Gets a 64-byte packet of log data. 250 packets make up a single log. Returns 0 if comms failed and 1 if comms OK&nbsp;
+
| colspan="2" | Reads the current of a single channel&nbsp;
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Buffer
+
| width="90%" | Channel
 
|-
 
|-
| colspan="2" | Buffer to store the incoming log data&nbsp;
+
| colspan="2" | Range: 0-6 - 0=DC1, 1=DC2, 2=U, 3=V, 4=W, 5=Dyno, 6=I, 7=TotalDriver&nbsp;
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
Line 202: Line 194:
  
  
===GetSafetySwitch===
+
===GetErrorStatus===
 
{| 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;" | '''GetSafetySwitch'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetErrorStatus'''
 
|-
 
|-
| colspan="2" | Reads the safety switch&nbsp;
+
| colspan="2" | Gets the current error status. Error status will automatically resolve itself once the causing condition has been removed. 0 = No Error 1 = Error - likely over current or brownout&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
+
| 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''
 
|}
 
|}
  
  
===SetControlKI===
+
===GetLogData===
 
{| 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;" | '''SetControlKI'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLogData'''
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | Gets a 64-byte packet of log data. 250 packets make up a single log. Returns 0 if comms failed and 1 if comms OK&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
+
| width="90%" | Buffer
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | Buffer to store the incoming log data&nbsp;
 
|-
 
|-
| 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-bool-icon.png]] - BOOL
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===ZeroLoadCell===
+
===GetLogDataReady===
 
{| 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;" | '''ZeroLoadCell'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLogDataReady'''
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | Checks to see if the logging is complete and ready to read.&nbsp;
 
|-
 
|-
 
|-
 
|-
| 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-bool-icon.png]] - BOOL
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===SetControlMaxDrivePercentage===
+
===GetLogStartAngle===
 
{| 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;" | '''SetControlMaxDrivePercentage'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLogStartAngle'''
 +
|-
 +
| colspan="2" | Collects the U Phase angle at the start of logging.  Used to calculate and re-create the 3Phase voltage data.&nbsp;
 +
|-
 
|-
 
|-
| 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''
 +
|}
 +
 
 +
 
 +
===GetMotorDirection===
 +
{| 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;" | '''GetMotorDirection'''
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| colspan="2" | Reads the motor direction&nbsp;
| width="90%" | Value
 
 
|-
 
|-
| colspan="2" | Range 0.0-1.0&nbsp;
 
 
|-
 
|-
| 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-u16-icon.png]] - UINT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===SetMotorType===
+
===GetRPM===
 
{| 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;" | '''SetMotorType'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRPM'''
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | Reads the speed in RPM&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | MotorType
 
|-
 
| colspan="2" | 0=DC, 1=1 Phase, 2=3 Phase&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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===SetLoadCellCalibration===
+
===GetSafetySwitch===
 
{| 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;" | '''SetLoadCellCalibration'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetSafetySwitch'''
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | Reads the safety switch&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Value
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
Line 325: Line 316:
  
  
===GetControlFeedback===
+
===GetWeight===
 
{| 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;" | '''GetControlFeedback'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetWeight'''
 +
|-
 +
| colspan="2" | Reads the voltage of a single channel&nbsp;
 +
|-
 
|-
 
|-
| colspan="2" | &nbsp;
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Scale
 
|-
 
|-
 +
| colspan="2" | Range: 0-1 -  0=Weight, 1=Torque&nbsp;
 
|-
 
|-
 
| 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-f32-icon.png]] - FLOAT
Line 339: Line 335:
  
  
===SetControlKD===
+
===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;" | '''SetControlKD'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | Returns 1 if the connection is ok and communications have been established&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
+
| width="90%" | MotorType
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | 0=DC, 1=1Phase, 2=3Phase, 3=AngleControl&nbsp;
 
|-
 
|-
| 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-bool-icon.png]] - BOOL
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===SetCapacitorBank===
+
===SetAbsPosition===
 
{| 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;" | '''SetCapacitorBank'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAbsPosition'''
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | Resets the absolute motor position to 0&nbsp;
 
|-
 
|-
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Cap
 
|-
 
| colspan="2" | &nbsp;
 
 
|-
 
|-
 
| 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 377: Line 368:
  
  
===GetCommsOK===
+
===SetActive===
 
{| 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;" | '''GetCommsOK'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetActive'''
 
|-
 
|-
| colspan="2" | Checks if comms are ok and stable&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | Active
|}
 
 
 
 
 
===GetLogStartAngle===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | 0=Off, 1=On&nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLogStartAngle'''
 
 
|-
 
|-
| colspan="2" | Collects the U Phase angle at the start of logging.  Used to calculate and re-create the 3Phase voltage data.&nbsp;
+
| 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-u8-icon.png]] - BYTE
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===SetVoltage===
+
===SetCapacitorBank===
 
{| 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;" | '''SetVoltage'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCapacitorBank'''
 
|-
 
|-
| colspan="2" | Sets the DC Voltage from 0 to 24V&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
|-
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="90%" | Voltage
 
|-
 
| colspan="2" | &nbsp;
 
 
|-
 
|-
 
| 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%" | Cap
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 429: Line 406:
  
  
===Get3PhaseMode===
+
===SetControlKD===
 
{| 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;" | '''Get3PhaseMode'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlKD'''
 
|-
 
|-
| colspan="2" | Checks to see if the brushless mode is enabled&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | Value
|}
 
 
 
 
 
===GetAbsPosition===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | &nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAbsPosition'''
 
 
|-
 
|-
| colspan="2" | Reads the absolute position of the encoder&nbsp;
+
| 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-u32-icon.png]] - ULONG
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===SetFan===
+
===SetControlKI===
 
{| 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;" | '''SetFan'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlKI'''
 
|-
 
|-
| colspan="2" | |Sets the speed of the FAN from 0 (MIN)  to 3000 (MAX)&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Speed
+
| width="90%" | Value
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 476: Line 444:
  
  
===SetMotorDirection===
+
===SetControlKP===
 
{| 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;" | '''SetMotorDirection'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlKP'''
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | MotorDirection
+
| width="90%" | Value
 
|-
 
|-
| colspan="2" | 0=FW, 1=BW&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
 
| 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 495: Line 463:
  
  
===GetMotorDirection===
+
===SetControlMaxDrivePercentage===
 
{| 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;" | '''GetMotorDirection'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlMaxDrivePercentage'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 
|-
 
|-
| colspan="2" | Reads the motor direction&nbsp;
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | Value
 
|-
 
|-
 +
| colspan="2" | Range 0.0-1.0&nbsp;
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
+
| 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''
 
|}
 
|}
  
  
===SetThreePhaseDriveMode===
+
===SetControlSetpoint===
 
{| 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;" | '''SetThreePhaseDriveMode'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlSetpoint'''
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Mode
+
| width="90%" | Value
 
|-
 
|-
| colspan="2" | 0=Simple, 1=Accurate&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
 
| 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 528: Line 501:
  
  
===GetCurrent===
+
===SetDriveMode===
 
{| 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;" | '''GetCurrent'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDriveMode'''
 
|-
 
|-
| colspan="2" | Reads the current of a single channel&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
 
|-
 
|-
 
| 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-6 - 0=DC1, 1=DC2, 2=U, 3=V, 4=W, 5=Dyno, 6=I, 7=TotalDriver&nbsp;
+
| colspan="2" | 0=PWM, 1=On/Off/Float&nbsp;
 
|-
 
|-
| 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''
 
|}
 
|}
  
  
===SetFrequency===
+
===SetDynoLoad===
 
{| 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;" | '''SetFrequency'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDynoLoad'''
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Frequency
+
| width="90%" | Load
 
|-
 
|-
| colspan="2" | Frequency of sine wave in Hz&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
 
| 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 566: Line 539:
  
  
===SetDynoLoad===
+
===SetFan===
 
{| 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;" | '''SetDynoLoad'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFan'''
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | |Sets the speed of the FAN from 0 (MIN)  to 3000 (MAX)&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Load
+
| width="90%" | Speed
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 585: Line 558:
  
  
===GetErrorStatus===
+
===SetFrequency===
 
{| 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;" | '''GetErrorStatus'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFrequency'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 
|-
 
|-
| colspan="2" | Gets the current error status. Error status will automatically resolve itself once the causing condition has been removed. 0 = No Error 1 = Error - likely over current or brownout&nbsp;
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Frequency
 
|-
 
|-
 +
| colspan="2" | Frequency of sine wave in Hz&nbsp;
 
|-
 
|-
| 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''
 
|}
 
|}
  
  
===GetControlOutputs===
+
===SetLoadCellCalibration===
 
{| 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;" | '''GetControlOutputs'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLoadCellCalibration'''
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 609: Line 587:
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Data
+
| width="90%" | Value
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 618: Line 596:
  
  
===SetActive===
+
===SetMotorDirection===
 
{| 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;" | '''SetActive'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMotorDirection'''
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 628: Line 606:
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Active
+
| width="90%" | MotorDirection
 
|-
 
|-
| colspan="2" | 0=Off, 1=On&nbsp;
+
| colspan="2" | 0=FW, 1=BW&nbsp;
 
|-
 
|-
 
| 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 637: Line 615:
  
  
===SetDriveMode===
+
===SetMotorType===
 
{| 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;" | '''SetDriveMode'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMotorType'''
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 647: Line 625:
 
|-
 
|-
 
| 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%" | MotorType
 
|-
 
|-
| colspan="2" | 0=PWM, 1=On/Off/Float&nbsp;
+
| colspan="2" | 0=DC, 1=1 Phase, 2=3 Phase&nbsp;
 
|-
 
|-
 
| 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 695: Line 673:
  
  
===SetAbsPosition===
+
===SetThreePhaseDriveMode===
 
{| 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;" | '''SetAbsPosition'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetThreePhaseDriveMode'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 
|-
 
|-
| colspan="2" | Resets the absolute motor position to 0&nbsp;
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | Mode
 
|-
 
|-
 +
| colspan="2" | 0=Simple, 1=Accurate&nbsp;
 
|-
 
|-
 
| 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 709: Line 692:
  
  
===Initialise===
+
===SetVoltage===
 
{| 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;" | '''SetVoltage'''
 +
|-
 +
| colspan="2" | Sets the DC Voltage from 0 to 24V&nbsp;
 +
|-
 
|-
 
|-
| colspan="2" | Returns 1 if the connection is ok and communications have been established&nbsp;
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | Voltage
 
|-
 
|-
 +
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | MotorType
+
| width="90%" | Index
 +
|-
 +
| 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''
 +
|}
 +
 
 +
 
 +
===ZeroLoadCell===
 +
{| 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;" | '''ZeroLoadCell'''
 +
|-
 +
| colspan="2" | &nbsp;
 
|-
 
|-
| colspan="2" | 0=DC, 1=1Phase, 2=3Phase, 3=AngleControl&nbsp;
 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
+
| 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''
 
|}
 
|}

Revision as of 12:00, 3 February 2023

Author Matrix TSL
Version 2.0
Category AllCode


Electrical Machines component

A set of functions to communicate with the Matrix EM hardware. Allows the functions to be easily standardised across all SCADA programs.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_temp/EM_Functions.fcsx

Please click here to view the component source code (Beta): FC_Comp_Source_temp/EM_Functions.fcsx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples





Macro reference

Get3PhaseMode

Fc9-comp-macro.png Get3PhaseMode
Checks to see if the brushless mode is enabled 
Fc9-bool-icon.png - BOOL Return


GetAPIVersion

Fc9-comp-macro.png GetAPIVersion
Reads the API firmware version 
Fc9-u8-icon.png - BYTE Return


GetAbsPosition

Fc9-comp-macro.png GetAbsPosition
Reads the absolute position of the encoder 
Fc9-u32-icon.png - ULONG Return


GetCommsOK

Fc9-comp-macro.png GetCommsOK
Checks if comms are ok and stable 
Fc9-bool-icon.png - BOOL Return


GetControlFeedback

Fc9-comp-macro.png GetControlFeedback
 
Fc9-f32-icon.png - FLOAT Return


GetControlOutputs

Fc9-comp-macro.png GetControlOutputs
 
Fc9-f32-icon.png - FLOAT Data
 
Fc9-void-icon.png - VOID Return


GetCurrent

Fc9-comp-macro.png GetCurrent
Reads the current of a single channel 
Fc9-u8-icon.png - BYTE Channel
Range: 0-6 - 0=DC1, 1=DC2, 2=U, 3=V, 4=W, 5=Dyno, 6=I, 7=TotalDriver 
Fc9-f32-icon.png - FLOAT Return


GetDataArray

Fc9-comp-macro.png GetDataArray
Collects a data array from the EM box full of control data. Each set of data includes: Setpoint, Feedback, Poutput, Ioutput, Doutput Returns the number of complete data samples collected. 
Fc9-f32-icon.png - FLOAT data
 
Fc9-u8-icon.png - BYTE Return


GetErrorStatus

Fc9-comp-macro.png GetErrorStatus
Gets the current error status. Error status will automatically resolve itself once the causing condition has been removed. 0 = No Error 1 = Error - likely over current or brownout 
Fc9-u8-icon.png - BYTE Return


GetLogData

Fc9-comp-macro.png GetLogData
Gets a 64-byte packet of log data. 250 packets make up a single log. Returns 0 if comms failed and 1 if comms OK 
Fc9-u8-icon.png - BYTE Buffer
Buffer to store the incoming log data 
Fc9-bool-icon.png - BOOL Return


GetLogDataReady

Fc9-comp-macro.png GetLogDataReady
Checks to see if the logging is complete and ready to read. 
Fc9-bool-icon.png - BOOL Return


GetLogStartAngle

Fc9-comp-macro.png GetLogStartAngle
Collects the U Phase angle at the start of logging. Used to calculate and re-create the 3Phase voltage data. 
Fc9-u8-icon.png - BYTE Return


GetMotorDirection

Fc9-comp-macro.png GetMotorDirection
Reads the motor direction 
Fc9-u16-icon.png - UINT Return


GetRPM

Fc9-comp-macro.png GetRPM
Reads the speed in RPM 
Fc9-u16-icon.png - UINT Return


GetSafetySwitch

Fc9-comp-macro.png GetSafetySwitch
Reads the safety switch 
Fc9-u16-icon.png - UINT Return


GetVoltage

Fc9-comp-macro.png GetVoltage
Reads the voltage of a single channel 
Fc9-u8-icon.png - BYTE Channel
Range: 0-5 - 0=DC1, 1=DC2, 2=U, 3=V, 4=W, 5=VEXT 
Fc9-f32-icon.png - FLOAT Return


GetWeight

Fc9-comp-macro.png GetWeight
Reads the voltage of a single channel 
Fc9-u8-icon.png - BYTE Scale
Range: 0-1 - 0=Weight, 1=Torque 
Fc9-f32-icon.png - FLOAT Return


Initialise

Fc9-comp-macro.png Initialise
Returns 1 if the connection is ok and communications have been established 
Fc9-u8-icon.png - BYTE MotorType
0=DC, 1=1Phase, 2=3Phase, 3=AngleControl 
Fc9-bool-icon.png - BOOL Return


SetAbsPosition

Fc9-comp-macro.png SetAbsPosition
Resets the absolute motor position to 0 
Fc9-void-icon.png - VOID Return


SetActive

Fc9-comp-macro.png SetActive
 
Fc9-bool-icon.png - BOOL Active
0=Off, 1=On 
Fc9-void-icon.png - VOID Return


SetCapacitorBank

Fc9-comp-macro.png SetCapacitorBank
 
Fc9-u8-icon.png - BYTE Cap
 
Fc9-void-icon.png - VOID Return


SetControlKD

Fc9-comp-macro.png SetControlKD
 
Fc9-f32-icon.png - FLOAT Value
 
Fc9-void-icon.png - VOID Return


SetControlKI

Fc9-comp-macro.png SetControlKI
 
Fc9-f32-icon.png - FLOAT Value
 
Fc9-void-icon.png - VOID Return


SetControlKP

Fc9-comp-macro.png SetControlKP
 
Fc9-f32-icon.png - FLOAT Value
 
Fc9-void-icon.png - VOID Return


SetControlMaxDrivePercentage

Fc9-comp-macro.png SetControlMaxDrivePercentage
 
Fc9-f32-icon.png - FLOAT Value
Range 0.0-1.0 
Fc9-void-icon.png - VOID Return


SetControlSetpoint

Fc9-comp-macro.png SetControlSetpoint
 
Fc9-f32-icon.png - FLOAT Value
 
Fc9-void-icon.png - VOID Return


SetDriveMode

Fc9-comp-macro.png SetDriveMode
 
Fc9-u8-icon.png - BYTE Mode
0=PWM, 1=On/Off/Float 
Fc9-void-icon.png - VOID Return


SetDynoLoad

Fc9-comp-macro.png SetDynoLoad
 
Fc9-f32-icon.png - FLOAT Load
 
Fc9-void-icon.png - VOID Return


SetFan

Fc9-comp-macro.png SetFan
|Sets the speed of the FAN from 0 (MIN) to 3000 (MAX) 
Fc9-u16-icon.png - UINT Speed
 
Fc9-void-icon.png - VOID Return


SetFrequency

Fc9-comp-macro.png SetFrequency
 
Fc9-u16-icon.png - UINT Frequency
Frequency of sine wave in Hz 
Fc9-void-icon.png - VOID Return


SetLoadCellCalibration

Fc9-comp-macro.png SetLoadCellCalibration
 
Fc9-f32-icon.png - FLOAT Value
 
Fc9-void-icon.png - VOID Return


SetMotorDirection

Fc9-comp-macro.png SetMotorDirection
 
Fc9-bool-icon.png - BOOL MotorDirection
0=FW, 1=BW 
Fc9-void-icon.png - VOID Return


SetMotorType

Fc9-comp-macro.png SetMotorType
 
Fc9-u8-icon.png - BYTE MotorType
0=DC, 1=1 Phase, 2=3 Phase 
Fc9-void-icon.png - VOID Return


SetTCPProps

Fc9-comp-macro.png SetTCPProps
Sets the TCP IP address and Port 
Fc9-u8-icon.png - BYTE IP0
 
Fc9-u8-icon.png - BYTE IP1
 
Fc9-u8-icon.png - BYTE IP2
 
Fc9-u8-icon.png - BYTE IP3
 
Fc9-u16-icon.png - UINT Port
 
Fc9-void-icon.png - VOID Return


SetThreePhaseDriveMode

Fc9-comp-macro.png SetThreePhaseDriveMode
 
Fc9-bool-icon.png - BOOL Mode
0=Simple, 1=Accurate 
Fc9-void-icon.png - VOID Return


SetVoltage

Fc9-comp-macro.png SetVoltage
Sets the DC Voltage from 0 to 24V 
Fc9-f32-icon.png - FLOAT Voltage
 
Fc9-u8-icon.png - BYTE Index
 
Fc9-void-icon.png - VOID Return


ZeroLoadCell

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



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Communications
Fc9-type-16-icon.png Comms Mode
 
Fc9-type-7-icon.png Stop On Error
Automatically allows the runtime to stop if there is a communications error. 
Fc9-conn-icon.png USB Communications
Fc9-type-7-icon.png Autodetect Port
 
Fc9-conn-icon.png Runtime Statistics
Fc9-type-7-icon.png Console Data
Allow console data to be generated showing the high level EM communications and returns