Sidan "get_read_frame_ext"
kommer tas bort. Se till att du är säker.
def get_read_frame_ext(self, object_type, object_id, property_id):
The "get_read_frame_ext" method is used to encode a byte-frame for a 'read'-instruction with other Object_IDs listed in the technical documentation of the Xcom-232i. It returns a bytearray of the frame.
Note: The link to the documentation of the Xcom-232i can you find under the section: Hardware Information.
The "self" argument is pointing to the object, which calls the method.
The "object_type" indicates the type of the "object_id", whether it is for example an info or a parameter number.
Object_Type:
_object_type_info = 1
_object_type_parameter = 2
_object_type_message = 3
_object_type_datalog_field = 5
_object_type_datalog_transfer = 257
The "object_id" is an info or parameter number, which you want to read out.
The "property_id" identifies the property of the data, which should be read out.
Property_ID:
_property_id_value = 1
_property_id_string = 1
_property_id_value_qsp = 5
_property_id_min_qsp = 6
_property_id_max_qsp = 7
_property_id_level_qsp = 8
_property_id_unsaved_value_qsp = 13
_property_id_invalid_Action = 0
_property_id_sd_start = 21
_property_id_sd_datablock = 22
_property_id_sd_ack_continue = 23
_property_id_sd_nack_retry = 24
_property_id_sd_abort = 25
_property_id_sd_finish = 26
Type -> bytearray
>>> # create an object of the Xcom-API-Class
>>> Object = Xcom_API()
>>>
>>> # set an Object_ID, which should be read out
>>> input_current = 3116
>>>
>>> # call the Method 'get_read_frame_ext'
>>> Byte_Frame = Object.get_read_frame_ext(Xcom_API._object_type_info, input_current, Xcom_API._property_id_value)
>>>
>>> # 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\\x2C\\x0C\\x00\\x00\\x01\\x00\\x3A\\x4D')
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
Sidan "get_read_frame_ext"
kommer tas bort. Se till att du är säker.