This will delete the page "get_read_frame"
. Please be certain.
def get_read_frame(self, object_id):
The "get_read_frame" method is used to encode a byte-frame for a 'read'-instruction. It can only be used with a known Object_ID, otherwise it will raise a Value_Error. It returns a bytearray of the frame.
The "self" argument is pointing to the object, which calls the method.
The "object_id" is an info or parameter number, which you want to read out.
Info-Object_ID:
_info_battery_voltage = 3000
_info_battery_temperature = 3001
_info_battery_charge_current = 3005
_info_battery_voltage_ripple = 3006
_info_state_of_charge = 3007
_info_number_of_battery_elements = 3050
_info_input_voltage = 3011
_info_input_current = 3012
_info_input_frequency = 3084
_info_input_power = 3138
_info_output_voltage = 3021
_info_output_current = 3022
_info_output_frequency = 3085
_info_output_power = 3139
_info_operating_state = 3028
_info_boost_active = 3019
_info_state_of_inverter = 3049
_info_state_of_transfer_relay = 3020
_info_state_of_output_relay = 3030
_info_state_of_aux_relay_1 = 3031
_info_state_of_aux_relay_2 = 3032
_info_state_of_ground_relay = 3074
_info_state_of_neutral_transfer_relay = 3075
_info_state_of_remote_entry = 3086
Parameter-Object_ID:
_para_maximum_current_of_ac_source = 1107
_para_battery_charge_current = 1138
_para_smart_boost_allowed = 1126
_para_inverter_allowed = 1124
_para_type_of_detection_of_grid_loss = 1552
_para_charger_allowed = 1125
_para_charger_uses_only_power_from_ac = 1646
_para_ac_output_voltage = 1286
_para_inverter_frequency = 1112
_para_transfer_relay_allowed = 1128
_para_limitation_of_the_power_boost = 1607
_para_remote_entry_active = 1545
Type -> bytearray
>>> # create an object of the Xcom-API-Class
>>> Object = Xcom_API()
>>>
>>> # call the Method 'get_read_frame'
>>> Byte_Frame = Object.get_read_frame(Xcom_API._info_battery_voltage)
>>>
>>> # print Byte_Frame
>>> print(Byte_Frame)
bytearray(b'\\xAA\\x00\\x01\\x00\\x00\\x00\\x65\\x00\\x00\\x00\\x0A\\x00\\x6F\\x71\\x00\\x01\\x01\\x00\\xB8\\x0B\\x00\\x00\\x01\\x00\\xC5\\x90')
Hochschule Anhalt | Anhalt University of Applied Sciences | Special Field 6 EMW
Xcom-API
Tobias Müller, M. Eng.
📧 Tobias.Mueller@HS-Anhalt.de
© es-lab.de, 31.10.2017
This will delete the page "get_read_frame"
. Please be certain.