Difference between revisions of "Component: Electrical Machines (AllCode)"
From Flowcode Help
Jump to navigationJump to searchLine 15: | Line 15: | ||
A set of functions to communicate with the Matrix EM hardware. Allows the functions to be easily standardised across all SCADA programs. | A set of functions to communicate with the Matrix EM hardware. Allows the functions to be easily standardised across all SCADA programs. | ||
− | ==Component | + | ==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] | |
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
''No detailed description exists yet for this component'' | ''No detailed description exists yet for this component'' | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 665: | Line 669: | ||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Communications | ||
|- | |- | ||
|- | |- | ||
Line 676: | Line 684: | ||
|- | |- | ||
| colspan="2" | Automatically allows the runtime to stop if there is a communications error. | | colspan="2" | Automatically allows the runtime to stop if there is a communications error. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | USB Communications | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
Line 682: | Line 694: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
− | | width="90%" | | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Runtime Statistics |
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
Line 706: | Line 702: | ||
|- | |- | ||
| colspan="2" | Allow console data to be generated showing the high level EM communications and returns | | colspan="2" | Allow console data to be generated showing the high level EM communications and returns | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Revision as of 17:46, 9 November 2022
Author | Matrix TSL |
Version | 2.0 |
Category | AllCode |
Contents
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 for the component source code: FC_Comp_Source_EM_Functions.fcsx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
![]() |
GetLogDataReady |
Checks to see if the logging is complete and ready to read. | |
![]() |
Return |
![]() |
GetRPM |
Reads the speed in RPM | |
![]() |
Return |
![]() |
GetWeight |
Reads the voltage of a single channel | |
![]() |
Scale |
Range: 0-1 - 0=Weight, 1=Torque | |
![]() |
Return |
![]() |
SetControlKP |
![]() |
Value |
![]() |
Return |
![]() |
SetControlSetpoint |
![]() |
Value |
![]() |
Return |
![]() |
GetAPIVersion |
Reads the API firmware version | |
![]() |
Return |
![]() |
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 | |
![]() |
Buffer |
Buffer to store the incoming log data | |
![]() |
Return |
![]() |
GetSafetySwitch |
Reads the safety switch | |
![]() |
Return |
![]() |
SetControlKI |
![]() |
Value |
![]() |
Return |
![]() |
ZeroLoadCell |
![]() |
Return |
![]() |
SetControlMaxDrivePercentage |
![]() |
Value |
Range 0.0-1.0 | |
![]() |
Return |
![]() |
SetMotorType |
![]() |
MotorType |
0=DC, 1=1 Phase, 2=3 Phase | |
![]() |
Return |
![]() |
SetLoadCellCalibration |
![]() |
Value |
![]() |
Return |
![]() |
GetVoltage |
Reads the voltage of a single channel | |
![]() |
Channel |
Range: 0-5 - 0=DC1, 1=DC2, 2=U, 3=V, 4=W, 5=VEXT | |
![]() |
Return |
![]() |
GetControlFeedback |
![]() |
Return |
![]() |
SetControlKD |
![]() |
Value |
![]() |
Return |
![]() |
SetCapacitorBank |
![]() |
Cap |
![]() |
Return |
![]() |
GetCommsOK |
Checks if comms are ok and stable | |
![]() |
Return |
![]() |
GetLogStartAngle |
Collects the U Phase angle at the start of logging. Used to calculate and re-create the 3Phase voltage data. | |
![]() |
Return |
![]() |
SetVoltage |
Sets the DC Voltage from 0 to 24V | |
![]() |
Voltage |
![]() |
Index |
![]() |
Return |
![]() |
Get3PhaseMode |
Checks to see if the brushless mode is enabled | |
![]() |
Return |
![]() |
GetAbsPosition |
Reads the absolute position of the encoder | |
![]() |
Return |
![]() |
SetFan |
|Sets the speed of the FAN from 0 (MIN) to 3000 (MAX) | |
![]() |
Speed |
![]() |
Return |
![]() |
SetMotorDirection |
![]() |
MotorDirection |
0=FW, 1=BW | |
![]() |
Return |
![]() |
GetMotorDirection |
Reads the motor direction | |
![]() |
Return |
![]() |
SetThreePhaseDriveMode |
![]() |
Mode |
0=Simple, 1=Accurate | |
![]() |
Return |
![]() |
GetCurrent |
Reads the current of a single channel | |
![]() |
Channel |
Range: 0-6 - 0=DC1, 1=DC2, 2=U, 3=V, 4=W, 5=Dyno, 6=I, 7=TotalDriver | |
![]() |
Return |
![]() |
SetFrequency |
![]() |
Frequency |
Frequency of sine wave in Hz | |
![]() |
Return |
![]() |
SetDynoLoad |
![]() |
Load |
![]() |
Return |
![]() |
GetControlOutputs |
![]() |
Data |
![]() |
Return |
![]() |
SetActive |
![]() |
Active |
0=Off, 1=On | |
![]() |
Return |
![]() |
SetDriveMode |
![]() |
Mode |
0=PWM, 1=On/Off/Float | |
![]() |
Return |
![]() |
SetTCPProps |
Sets the TCP IP address and Port | |
![]() |
IP0 |
![]() |
IP1 |
![]() |
IP2 |
![]() |
IP3 |
![]() |
Port |
![]() |
Return |
![]() |
SetAbsPosition |
Resets the absolute motor position to 0 | |
![]() |
Return |
![]() |
Initialise |
Returns 1 if the connection is ok and communications have been established | |
![]() |
MotorType |
0=DC, 1=1Phase, 2=3Phase, 3=AngleControl | |
![]() |
Return |