Component: Electrical Machines (AllCode)
From Flowcode Help
(Redirected from Component: ID c3e5eb13 e03d 4ca6 be4d 1c63ad107a35)
Jump to navigationJump to searchAuthor | Matrix TSL |
Version | 2.0 |
Category | AllCode |
Contents
- 1 Electrical Machines component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 Get3PhaseMode
- 5.2 GetAPIVersion
- 5.3 GetAbsPosition
- 5.4 GetCommsOK
- 5.5 GetControlFeedback
- 5.6 GetControlOutputs
- 5.7 GetCurrent
- 5.8 GetDataArray
- 5.9 GetErrorStatus
- 5.10 GetLogData
- 5.11 GetLogDataReady
- 5.12 GetLogStartAngle
- 5.13 GetMotorDirection
- 5.14 GetRPM
- 5.15 GetSafetySwitch
- 5.16 GetVoltage
- 5.17 GetWeight
- 5.18 Initialise
- 5.19 SetAbsPosition
- 5.20 SetActive
- 5.21 SetCapacitorBank
- 5.22 SetControlKD
- 5.23 SetControlKI
- 5.24 SetControlKP
- 5.25 SetControlMaxDrivePercentage
- 5.26 SetControlSetpoint
- 5.27 SetDriveMode
- 5.28 SetDynoLoad
- 5.29 SetFan
- 5.30 SetFrequency
- 5.31 SetLoadCellCalibration
- 5.32 SetMotorDirection
- 5.33 SetMotorType
- 5.34 SetTCPProps
- 5.35 SetThreePhaseDriveMode
- 5.36 SetVoltage
- 5.37 ZeroLoadCell
- 6 Property reference
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
GetErrorStatus
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 |