Jump to content

Component: Electrical Machines (AllCode): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(13 intermediate revisions by 2 users not shown)
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/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_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_EM_Functions.fcsx FC_Comp_Source_EM_Functions.fcsx]


==Detailed description==
==Detailed description==




Line 30: Line 40:


==Examples==
==Examples==




Line 39: Line 57:


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''




==Macro reference==
==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Get3PhaseMode===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLogDataReady'''
| width="90%" class="mtx-class-macrohead" | '''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 56: Line 85:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetAPIVersion===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRPM'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetAbsPosition===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''GetAbsPosition'''
|-
| colspan="2" | Reads the absolute position of the encoder&nbsp;
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetWeight'''
|-
|-
| colspan="2" | Reads the voltage of a single channel&nbsp;
| 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''
|}
 
 
===GetCommsOK===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''GetCommsOK'''
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| colspan="2" | Checks if comms are ok and stable&nbsp;
| 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-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetControlFeedback===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlKP'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetControlOutputs===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlSetpoint'''
| width="90%" class="mtx-class-macrohead" | '''GetControlOutputs'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 114: Line 151:
|-
|-
| 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%" | Data
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 123: Line 160:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetCurrent===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAPIVersion'''
| width="90%" class="mtx-class-macrohead" | '''GetCurrent'''
|-
|-
| colspan="2" | Reads the API firmware version&nbsp;
| colspan="2" | Reads the current of a single channel&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''
|}
 
 
{| 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;" | '''GetLogData'''
|-
| 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-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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetDataArray===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDataArray'''
| width="90%" class="mtx-class-macrohead" | '''GetDataArray'''
|-
|-
| colspan="2" | 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.&nbsp;
| colspan="2" | 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.&nbsp;
Line 172: Line 198:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetErrorStatus===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetSafetySwitch'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetLogData===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlKI'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetLogDataReady===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ZeroLoadCell'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetLogStartAngle===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlMaxDrivePercentage'''
| width="90%" class="mtx-class-macrohead" | '''GetLogStartAngle'''
|-
|-
| colspan="2" | &nbsp;
| 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-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===GetMotorDirection===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetRPM===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMotorType'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetSafetySwitch===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLoadCellCalibration'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetVoltage===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetVoltage'''
| width="90%" class="mtx-class-macrohead" | '''GetVoltage'''
|-
|-
| colspan="2" | Reads the voltage of a single channel&nbsp;
| colspan="2" | Reads the voltage of a single channel&nbsp;
Line 288: Line 320:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetWeight===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetControlFeedback'''
| width="90%" class="mtx-class-macrohead" | '''GetWeight'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Reads the voltage of a single channel&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 301: Line 339:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Initialise===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlKD'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetAbsPosition===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCapacitorBank'''
| width="90%" class="mtx-class-macrohead" | '''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 337: Line 372:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetActive===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCommsOK'''
| width="90%" class="mtx-class-macrohead" | '''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
|}
 
 
{| 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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetCapacitorBank===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetVoltage'''
| width="90%" class="mtx-class-macrohead" | '''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 386: Line 410:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetControlKD===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Get3PhaseMode'''
| width="90%" class="mtx-class-macrohead" | '''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
|}
 
 
{| 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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetControlKI===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFan'''
| width="90%" class="mtx-class-macrohead" | '''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 430: Line 448:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetControlKP===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMotorDirection'''
| width="90%" class="mtx-class-macrohead" | '''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 448: Line 467:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetControlMaxDrivePercentage===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetMotorDirection'''
| width="90%" class="mtx-class-macrohead" | '''SetControlMaxDrivePercentage'''
|-
|-
| colspan="2" | Reads the motor direction&nbsp;
| colspan="2" | &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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetControlSetpoint===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetThreePhaseDriveMode'''
| width="90%" class="mtx-class-macrohead" | '''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 479: Line 505:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetDriveMode===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCurrent'''
| width="90%" class="mtx-class-macrohead" | '''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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetDynoLoad===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFrequency'''
| width="90%" class="mtx-class-macrohead" | '''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 515: Line 543:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetFan===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDynoLoad'''
| width="90%" class="mtx-class-macrohead" | '''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 533: Line 562:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetFrequency===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetErrorStatus'''
| width="90%" class="mtx-class-macrohead" | '''SetFrequency'''
|-
|-
| 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;
| colspan="2" | &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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetLoadCellCalibration===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetControlOutputs'''
| width="90%" class="mtx-class-macrohead" | '''SetLoadCellCalibration'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 555: Line 591:
|-
|-
| 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 564: Line 600:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetMotorDirection===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetActive'''
| width="90%" class="mtx-class-macrohead" | '''SetMotorDirection'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 573: Line 610:
|-
|-
| 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 582: Line 619:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetMotorType===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDriveMode'''
| width="90%" class="mtx-class-macrohead" | '''SetMotorType'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 591: Line 629:
|-
|-
| 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 600: Line 638:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetTCPProps===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTCPProps'''
| width="90%" class="mtx-class-macrohead" | '''SetTCPProps'''
|-
|-
| colspan="2" | Sets the TCP IP address and Port&nbsp;
| colspan="2" | Sets the TCP IP address and Port&nbsp;
Line 638: Line 677:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetThreePhaseDriveMode===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetThreePhaseDriveMode'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAbsPosition'''
|-
|-
| 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 651: Line 696:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetVoltage===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''SetVoltage'''
|-
|-
| colspan="2" | Returns 1 if the connection is ok and communications have been established&nbsp;
| colspan="2" | Sets the DC Voltage from 0 to 24V&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" | 0=DC, 1=1Phase, 2=3Phase, 3=AngleControl&nbsp;
| colspan="2" | &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''
|}
|}




===ZeroLoadCell===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ZeroLoadCell'''
|-
| 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''
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Communications
| width="90%" class="mtx-class-propfolder" | Communications
|-
|-
|-
|-
Line 693: Line 756:
| colspan="2" | Automatically allows the runtime to stop if there is a communications error.&nbsp;
| colspan="2" | Automatically allows the runtime to stop if there is a communications error.&nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | USB Communications
| width="90%" class="mtx-class-propfolder" | USB Communications
|-
|-
|-
|-
Line 702: Line 765:
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Runtime Statistics
| width="90%" class="mtx-class-propfolder" | Runtime Statistics
|-
|-
|-
|-

Latest revision as of 14:36, 13 July 2026

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_EM_Functions.fcsx

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

Get3PhaseMode

Get3PhaseMode
Checks to see if the brushless mode is enabled 
- BOOL Return


GetAPIVersion

GetAPIVersion
Reads the API firmware version 
- BYTE Return


GetAbsPosition

GetAbsPosition
Reads the absolute position of the encoder 
- ULONG Return


GetCommsOK

GetCommsOK
Checks if comms are ok and stable 
- BOOL Return


GetControlFeedback

GetControlFeedback
 
- FLOAT Return


GetControlOutputs

GetControlOutputs
 
- FLOAT Data
 
- VOID Return


GetCurrent

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


GetDataArray

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. 
- FLOAT data
 
- BYTE Return


GetErrorStatus

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 
- BYTE Return


GetLogData

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 
- BYTE Buffer
Buffer to store the incoming log data 
- BOOL Return


GetLogDataReady

GetLogDataReady
Checks to see if the logging is complete and ready to read. 
- BOOL Return


GetLogStartAngle

GetLogStartAngle
Collects the U Phase angle at the start of logging. Used to calculate and re-create the 3Phase voltage data. 
- BYTE Return


GetMotorDirection

GetMotorDirection
Reads the motor direction 
- UINT Return


GetRPM

GetRPM
Reads the speed in RPM 
- UINT Return


GetSafetySwitch

GetSafetySwitch
Reads the safety switch 
- UINT Return


GetVoltage

GetVoltage
Reads the voltage of a single channel 
- BYTE Channel
Range: 0-5 - 0=DC1, 1=DC2, 2=U, 3=V, 4=W, 5=VEXT 
- FLOAT Return


GetWeight

GetWeight
Reads the voltage of a single channel 
- BYTE Scale
Range: 0-1 - 0=Weight, 1=Torque 
- FLOAT Return


Initialise

Initialise
Returns 1 if the connection is ok and communications have been established 
- BYTE MotorType
0=DC, 1=1Phase, 2=3Phase, 3=AngleControl 
- BOOL Return


SetAbsPosition

SetAbsPosition
Resets the absolute motor position to 0 
- VOID Return


SetActive

SetActive
 
- BOOL Active
0=Off, 1=On 
- VOID Return


SetCapacitorBank

SetCapacitorBank
 
- BYTE Cap
 
- VOID Return


SetControlKD

SetControlKD
 
- FLOAT Value
 
- VOID Return


SetControlKI

SetControlKI
 
- FLOAT Value
 
- VOID Return


SetControlKP

SetControlKP
 
- FLOAT Value
 
- VOID Return


SetControlMaxDrivePercentage

SetControlMaxDrivePercentage
 
- FLOAT Value
Range 0.0-1.0 
- VOID Return


SetControlSetpoint

SetControlSetpoint
 
- FLOAT Value
 
- VOID Return


SetDriveMode

SetDriveMode
 
- BYTE Mode
0=PWM, 1=On/Off/Float 
- VOID Return


SetDynoLoad

SetDynoLoad
 
- FLOAT Load
 
- VOID Return


SetFan

SetFan
|Sets the speed of the FAN from 0 (MIN) to 3000 (MAX) 
- UINT Speed
 
- VOID Return


SetFrequency

SetFrequency
 
- UINT Frequency
Frequency of sine wave in Hz 
- VOID Return


SetLoadCellCalibration

SetLoadCellCalibration
 
- FLOAT Value
 
- VOID Return


SetMotorDirection

SetMotorDirection
 
- BOOL MotorDirection
0=FW, 1=BW 
- VOID Return


SetMotorType

SetMotorType
 
- BYTE MotorType
0=DC, 1=1 Phase, 2=3 Phase 
- VOID Return


SetTCPProps

SetTCPProps
Sets the TCP IP address and Port 
- BYTE IP0
 
- BYTE IP1
 
- BYTE IP2
 
- BYTE IP3
 
- UINT Port
 
- VOID Return


SetThreePhaseDriveMode

SetThreePhaseDriveMode
 
- BOOL Mode
0=Simple, 1=Accurate 
- VOID Return


SetVoltage

SetVoltage
Sets the DC Voltage from 0 to 24V 
- FLOAT Voltage
 
- BYTE Index
 
- VOID Return


ZeroLoadCell

ZeroLoadCell
 
- VOID Return


Property reference

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