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

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix TSL
 
| Matrix TSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 2.0 (Release)
+
| 2.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| AllCode
 
| 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.
  
==[[File:Component Icon c3e5eb13_e03d_4ca6_be4d_1c63ad107a35.png|Image]] Electrical Machines component==
+
==Component Pack==
A set of functions to communicate with the Matrix EM hardware.
 
Allows the functions to be easily standardised across all SCADA programs.
 
  
==Examples==
+
FREE
''<span style="color:red;">No additional examples</span>''
 
  
 +
==Detailed description==
  
==Downloadable macro reference==
+
''No detailed description exists yet for this component''
  
''This component does not contain any downloadable macros''
+
==Examples==
  
==Simulation macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>GetLogDataReady</tt></u></span>===
+
''<span style="color:red;">No additional examples</span>''
Checks to see if the logging is complete and ready to read.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
==Downloadable macro reference==
  
 +
{| 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;" | '''GetLogDataReady'''
 +
|-
 +
| 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-bool-icon.png]] - BOOL
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
+
{| 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;" | '''GetRPM'''
 +
|-
 +
| colspan="2" | Reads the speed in RPM&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>GetRPM</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Reads the speed in RPM
+
|-
 +
| 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" | [[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="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
{| 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;" | '''SetControlKP'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[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''
 +
|}
  
  
'''Return value'''
+
{| 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;" | '''SetControlSetpoint'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[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''
 +
|}
  
:[[Variable Types|UINT]]
 
  
 +
{| 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;" | '''GetAPIVersion'''
 +
|-
 +
| colspan="2" | Reads the API firmware version&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>GetWeight</tt></u></span>===
 
Reads the voltage of a single channel
 
  
'''Parameters'''
+
{| 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="90%" | Buffer
 +
|-
 +
| colspan="2" | Buffer to store the incoming log data&nbsp;
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|BYTE]] ''Scale''
 
::Range: 0-1 -  0=Weight, 1=Torque
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDataArray'''
 +
|-
 +
| colspan="2" | Collects a data array from the 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;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | data
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|FLOAT]]
+
{| 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;" | '''GetSafetySwitch'''
 +
|-
 +
| colspan="2" | Reads the safety switch&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>SetControlKP</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
''<span style="color:red;">No additional information</span>''
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetControlKI'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[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''
 +
|}
  
  
 +
{| 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;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|FLOAT]] ''Value''
+
{| 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;" | '''SetControlMaxDrivePercentage'''
 +
|-
 +
| 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-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Return value'''
+
{| 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;" | '''SetMotorType'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| 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''
 +
|}
  
:''This call does not return a value''
 
  
 +
{| 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;" | '''SetLoadCellCalibration'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>SetControlSetpoint</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
  
 +
{| 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;" | '''GetVoltage'''
 +
|-
 +
| colspan="2" | Reads the voltage of a single channel&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | Range: 0-5 -  0=DC1, 1=DC2, 2=U, 3=V, 4=W, 5=VEXT&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''
 +
|}
  
  
'''Parameters'''
+
{| 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;" | '''GetControlFeedback'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|FLOAT]] ''Value''
 
  
 +
{| 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;" | '''SetControlKD'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[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''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
+
{| 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;" | '''SetCapacitorBank'''
 +
|-
 +
| colspan="2" | &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="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>GetAPIVersion</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Reads the API firmware version
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCommsOK'''
 +
|-
 +
| colspan="2" | Checks if comms are ok and stable&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
{| 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;" | '''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-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Return value'''
+
{| 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;" | '''SetVoltage'''
 +
|-
 +
| 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="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''
 +
|}
  
:[[Variable Types|BYTE]]
 
  
 +
{| 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;" | '''Get3PhaseMode'''
 +
|-
 +
| colspan="2" | Checks to see if the brushless mode is enabled&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>GetLogData</tt></u></span>===
 
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
+
{| 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;" | '''GetAbsPosition'''
 +
|-
 +
| colspan="2" | Reads the absolute position of the encoder&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''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Buffer''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Buffer to store the incoming log data
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFan'''
 +
|-
 +
| colspan="2" | |Sets the speed of the FAN from 0 (MIN)  to 3000 (MAX)&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Speed
 +
|-
 +
| 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''
 +
|}
  
  
'''Return value'''
+
{| 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;" | '''SetMotorDirection'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | MotorDirection
 +
|-
 +
| colspan="2" | 0=FW, 1=BW&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
 
  
 +
{| 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'''
 +
|-
 +
| colspan="2" | Reads the motor direction&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>GetDataArray</tt></u></span>===
 
Collects a data array from the EM box full of control data.
 
  
Each set of data includes:
+
{| 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;" | '''SetThreePhaseDriveMode'''
 +
|-
 +
| colspan="2" | &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="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Setpoint, Feedback, Poutput, Ioutput, Doutput
 
  
Returns the number of complete data samples collected.
+
{| 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;" | '''GetCurrent'''
 +
|-
 +
| colspan="2" | Reads the current of a single channel&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Channel
 +
|-
 +
| 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-f32-icon.png]] - FLOAT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|FLOAT]] ''data''
+
{| 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;" | '''SetFrequency'''
 +
|-
 +
| 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-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Return value'''
+
{| 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;" | '''SetDynoLoad'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | Load
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|BYTE]]
 
  
 +
{| 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;" | '''GetErrorStatus'''
 +
|-
 +
| 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-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>GetSafetySwitch</tt></u></span>===
 
Reads the safety switch
 
  
'''Parameters'''
+
{| 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;" | '''GetControlOutputs'''
 +
|-
 +
| colspan="2" | &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-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:''This macro has no parameters''
 
  
 +
{| 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;" | '''SetActive'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | Active
 +
|-
 +
| colspan="2" | 0=Off, 1=On&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|UINT]]
+
{| 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;" | '''SetDriveMode'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Mode
 +
|-
 +
| colspan="2" | 0=PWM, 1=On/Off/Float&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>SetControlKI</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
''<span style="color:red;">No additional information</span>''
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTCPProps'''
 +
|-
 +
| colspan="2" | Sets the TCP IP address and Port&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | IP0
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | IP1
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | IP2
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | IP3
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Port
 +
|-
 +
| 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''
 +
|}
  
  
 +
{| 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;" | '''SetAbsPosition'''
 +
|-
 +
| colspan="2" | Resets the absolute motor position to 0&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|FLOAT]] ''Value''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
'''Return value'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
+
|-
:''This call does not return a value''
+
| colspan="2" | Returns 1 if the connection is ok and communications have been established&nbsp;
 
+
|-
 
+
|-
===<span style="font-weight: normal;"><u><tt>ZeroLoadCell</tt></u></span>===
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
''<span style="color:red;">No additional information</span>''
+
| width="90%" | MotorType
 
+
|-
 
+
| colspan="2" | 0=DC, 1=1Phase, 2=3Phase, 3=AngleControl&nbsp;
 
+
|-
'''Parameters'''
+
| 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''
:''This macro has no parameters''
+
|}
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetControlMaxDrivePercentage</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|FLOAT]] ''Value''
 
::Range 0.0-1.0
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetMotorType</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''MotorType''
 
::0=DC, 1=1 Phase, 2=3 Phase
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetLoadCellCalibration</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|FLOAT]] ''Value''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetVoltage</tt></u></span>===
 
Reads the voltage of a single channel
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Channel''
 
::Range: 0-5 - 0=DC1, 1=DC2, 2=U, 3=V, 4=W, 5=VEXT
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|FLOAT]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetControlFeedback</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|FLOAT]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetControlKD</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|FLOAT]] ''Value''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetCapacitorBank</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Cap''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetCommsOK</tt></u></span>===
 
Checks if comms are ok and stable
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetLogStartAngle</tt></u></span>===
 
Collects the U Phase angle at the start of logging.
 
 
 
Used to calculate and re-create the 3Phase voltage data.
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BYTE]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetVoltage</tt></u></span>===
 
Sets the DC Voltage from 0 to 24V
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|FLOAT]] ''Voltage''
 
 
 
:[[Variable Types|BYTE]] ''Index''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>Get3PhaseMode</tt></u></span>===
 
Checks to see if the brushless mode is enabled
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetAbsPosition</tt></u></span>===
 
Reads the absolute position of the encoder
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|ULONG]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetFan</tt></u></span>===
 
|Sets the speed of the FAN from 0 (MIN)  to 3000 (MAX)
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|UINT]] ''Speed''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetMotorDirection</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BOOL]] ''MotorDirection''
 
::0=FW, 1=BW
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetMotorDirection</tt></u></span>===
 
Reads the motor direction
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|UINT]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetThreePhaseDriveMode</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BOOL]] ''Mode''
 
::0=Simple, 1=Accurate
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetCurrent</tt></u></span>===
 
Reads the current of a single channel
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Channel''
 
::Range: 0-6 - 0=DC1, 1=DC2, 2=U, 3=V, 4=W, 5=Dyno, 6=I, 7=TotalDriver
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|FLOAT]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetFrequency</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|UINT]] ''Frequency''
 
::Frequency of sine wave in Hz
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetDynoLoad</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|FLOAT]] ''Load''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetErrorStatus</tt></u></span>===
 
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
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BYTE]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetControlOutputs</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|FLOAT]] ''Data''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetActive</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BOOL]] ''Active''
 
::0=Off, 1=On
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetDriveMode</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''Mode''
 
::0=PWM, 1=On/Off/Float
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetTCPProps</tt></u></span>===
 
Sets the TCP IP address and Port
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''IP0''
 
 
 
:[[Variable Types|BYTE]] ''IP1''
 
 
 
:[[Variable Types|BYTE]] ''IP2''
 
 
 
:[[Variable Types|BYTE]] ''IP3''
 
 
 
:[[Variable Types|UINT]] ''Port''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetAbsPosition</tt></u></span>===
 
Resets the absolute motor position to 0
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
 
Returns 1 if the connection is ok and communications have been established
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''MotorType''
 
::0=DC, 1=1Phase, 2=3Phase, 3=AngleControl
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
 
  
  
Line 585: Line 660:
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Comms Mode</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''CommsMode''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Stop On Error</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Comms Mode
This property is of type ''True or false'' and can be referenced with the variable name ''StopOnError''.
+
|-
 
+
| colspan="2" | &nbsp;
Automatically allows the runtime to stop if there is a communications error.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
<span style="font-weight: normal;"><u>Autodetect Port</u></span>
+
| width="90%" | Stop On Error
 
+
|-
This property is of type ''True or false'' and can be referenced with the variable name ''AutoDetect''.
+
| colspan="2" | Automatically allows the runtime to stop if there is a communications error.&nbsp;
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
+
| width="90%" | Autodetect Port
 
+
|-
 
+
| colspan="2" | &nbsp;
<span style="font-weight: normal;"><u>Network Interface</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''NetworkComms1::NetworkInterface''.
+
| width="90%" | Network Interface
 
+
|-
Some computers may have several network interfaces such as ethernet ports and wifi access.
+
| colspan="2" | Some computers may have several network interfaces such as ethernet ports and wifi access. Select the correct network interface for the network you wish to connect to. Use the IP address to confirm you are connected to the right network.&nbsp;
 
+
|-
Select the correct network interface for the network you wish to connect to.
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
+
| width="90%" | IP Address
Use the IP address to confirm you are connected to the right network.
+
|-
 
+
| colspan="2" | IP Address of the selected network interface.&nbsp;
<span style="font-weight: normal;"><u>IP Address</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
This property is of type ''Line of text'' and can be referenced with the variable name ''NetworkComms1::IPAddress''.
+
| width="90%" | EM Box IP Address
 
+
|-
IP Address of the selected network interface.
+
| colspan="2" | &nbsp;
 
+
|-
<span style="font-weight: normal;"><u>EM Box IP Address</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | EM Box Port
This property is of type ''Line of text'' and can be referenced with the variable name ''BoxIP''.
+
|-
 
+
| colspan="2" | &nbsp;
''<span style="color:red;">No additional information</span>''
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
+
| width="90%" | Console Data
 
+
|-
<span style="font-weight: normal;"><u>EM Box Port</u></span>
+
| colspan="2" | Allow console data to be generated showing the high level EM communications and returns&nbsp;
 
+
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''BoxPort''.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''  
''<span style="color:red;">No additional information</span>''
+
|-
 
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''  
<span style="font-weight: normal;"><u>Console Data</u></span>
+
|-
 
+
|}
This property is of type ''True or false'' and can be referenced with the variable name ''ConsoleData''.
 
 
 
Allow console data to be generated showing the high level EM communications and returns
 

Revision as of 14:52, 7 January 2022

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 Pack

FREE

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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



Property reference

Fc9-prop-icon.png Properties
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-type-7-icon.png Autodetect Port
 
Fc9-type-16-icon.png Network Interface
Some computers may have several network interfaces such as ethernet ports and wifi access. Select the correct network interface for the network you wish to connect to. Use the IP address to confirm you are connected to the right network. 
Fc9-type-10-icon.png IP Address
IP Address of the selected network interface. 
Fc9-type-10-icon.png EM Box IP Address
 
Fc9-type-21-icon.png EM Box Port
 
Fc9-type-7-icon.png Console Data
Allow console data to be generated showing the high level EM communications and returns 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations