Difference between revisions of "Component: Energy Monitor (PZEM-004T) (Electrical)"
From Flowcode Help
Jump to navigationJump to search (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix Ltd. |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gra...") |
|||
| Line 28: | Line 28: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
| + | |||
| + | |||
==Macro reference== | ==Macro reference== | ||
| Line 55: | Line 57: | ||
|- | |- | ||
| 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-u16-icon.png]] - UINT | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Revision as of 13:00, 18 July 2023
| Author | Matrix Ltd. |
| Version | 1.0 |
| Category | Electrical |
Contents
Energy Monitor (PZEM-004T) component
The PZEM-004T module is used for measuring AC voltage, current, active power, frequency, power factor & overcurrent. Resetable active energ and the overpower level can be set and monitored.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Energy_Monitor_PZEM-004T.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Energy_Monitor_PZEM-004T.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
Initialise
| Initialise | |
| Starts up the UART to allow communications. Also, checks if PZEM-004T is detected. Returns 0 if detected or 255 if not detected. | |
| Return | |
ReadAlarmStatus
| ReadAlarmStatus | |
| 65535 = Overpower alarm triggered. 0 = Overpower alarm not triggered. | |
| Return | |
ReadCurrent
| ReadCurrent | |
| Read what the current draw is. Resolution: 0.001A Measurement accuracy: 0.5% | |
| Return | |
ReadEnergy
| ReadEnergy | |
| Read active energy value. Resolution: 1Wh Measurement accuracy: 0.5% | |
| Return | |
ReadFrequency
| ReadFrequency | |
| Reads the frequency of the mains | |
| Return | |
ReadPower
| ReadPower | |
| Read active power. Starting measure power: 0.4W Resolution: 0.1W | |
| Return | |
ReadPowerAlarmThreshold
| ReadPowerAlarmThreshold | |
| Reads the power alarm threshold in watts | |
| Return | |
ReadPowerFactor
| ReadPowerFactor | |
| Read power factor Resolution: 0.01 Measurement accuracy: 1% | |
| Return | |
ReadVoltage
| ReadVoltage | |
| Read voltage. Measuring range:80~260V Resolution: 0.1V Measurement accuracy: 0.5% | |
| Return | |
ResetEnergy
| ResetEnergy | |
| Reset the energy value | |
| Return | |
SetPowerThresholdLevel
| SetPowerThresholdLevel | |
| Sets the power alarm threshold in watts | |
| PowerThresholdValue | |
| Reg addreess high of alarm threshold | |
| Return | |