HART — The HART Testing Framework¶
The HART Testing Framework enables users to
write automatable tests for HART slaves
simulate HART devices and HART masters
add device specific commands
develop and debug a HART device interactively using the HART-Shell
monitor HART messages using the HART-Monitor
send corrupted frames and
run HART Fuzzing tests
It is based on version 7.6 of the HART specification and implements all universal and common practice commands (0..533). Extended commands up to 16-bit are supported.
You need the hart
feature in your license to unlock the HART Testing Framework.
HART Interface¶
The HartInterface
implements the data link layer and physical layer.
It enables you to write binary data that is sent to the connected
HART devices and read HART frames.
The used serial port must support the RS485 mode
that sets RTS
high
while sending. Many USB-Uarts do not support this feature and thus
cannot be used.
It is recommended to use USB-HART-Modems such as the MACTek Viator. They do support this feature and are known to work.
Real COM ports are very sparse nowadays.
-
class
htf.communication.hart.
HartInterface
(comport, timeout=0.3)¶ Data-Link-Layer and Physical-Layer for HART.
- Parameters
-
close
()¶ Close the HART interface. Is called in __del__, too.
-
get_last_preamble_count
()¶ Gets the count of preambles that was most recently received. This does NOT require a full HART frame to be read, but does require the preambles to be followed by a valid delimiter.
- Returns
the most recently received number of consecutive preambles
- Return type
-
query
(data, number_of_preambles=5, preamble=b'\xff', timeout=1.0)¶ Query a HART command.
- Parameters
- Returns
- if no frame was recieved
None
is returned else a HART frame is returned.
- if no frame was recieved
- Return type
-
read
(timeout=1.0)¶ Read a frame.
Example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartInterface
hi = HartInterface(comport="/dev/ttyUSB1")
cmd0_request = b"\x02\x80\x00\x00\x82"
response = hi.query(cmd0_request)
print(oser.to_hex(response))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18
\x06\x80\x00\x0e\x00\x00\x00\x13\x37\x00\x00\x00\x00\x00\x00\x00\x00\x23\x8f
hi.close()
HART Frame¶
The HartFrame
abstracts the HART-PDU that is
used for HART communication.
It is based on OSER and lets the user specify device specific commands.
The check byte is generated automatically when
encode
is called.
-
class
htf.communication.hart.
HartFrame
(command=None, auto_length=True, auto_checkbyte=True)¶ A HART frame abstraction.
- Parameters
-
byte_size
()¶ Return the size in bytes.
- Returns
the length of the byte type in bytes.
- Return type
-
decode
(data, full_data=b'', context_data=b'')¶ Decode a binary string and return the number of bytes that were decoded.
- Parameters
- Returns
the number of bytes that were decoded.
- Return type
-
encode
(full_data=b'', context_data=b'')¶ Return the encoded binary string.
byte_count
is set automatically ifauto_length
is supplied.
-
from_dict
(data)¶ Fill self with data.
- Parameters
data (dict) – data to be used to fill the calling instance.
-
fuzzing_iterator
(copy=False)¶ The fuzzing iterator iterates over all combinations of set fuzzing values (
oser.ByteType.set_fuzzing_values
). If no fuzzing values are set the current struct is yielded.- Parameters
copy=False (bool) – if set to
True
the generated fuzzing values are deep copies of the original. Creating these deep copies is slow. If set toFalse
the original struct is retruned and the generated value must be used immediately since the next generated overwrites the values on the same value.- Yields
the fuzzing combinations.
-
get_command_request_parser
(command)¶ Get a command request parser.
-
get_command_response_parser
(command)¶ Get a command response parser.
-
introspect
(stop_at=None)¶ Return the introspection representation of the object as a string.
- Parameters
stop_at=None (object) – stop introspection at
stop_at
.
-
requests_generator
()¶ A generator that yields command, parser tuples for requests.
This method shall be overwritten to realize device specific commands.
- Yields
tuples of command and parser
-
responses_generator
()¶ A generator that yields command, parser tuples for responses.
This method shall be overwritten to realize device specific commands.
- Yields
tuples of command and parser
-
root
()¶ return root element
-
set_auto_check_byte_enable
(enable_auto_check_byte=True)¶ Enable or disable the automatic checkbyte calculation on
encode
.- Parameters
enable_auto_check_byte=True (bool) – the new enable state.
-
set_auto_length_enable
(enable_auto_length=True)¶ Enable or disable the auto length feature.
- Parameters
enable_auto_length=True (bool) – the new enable state.
-
set_command_request_parser
(command, parser)¶ Set a command request parser. This overwrites exising command parsers.
- Parameters
command (int) – the command number to be set.
parser (ByteStruct) – the parser for the command.
-
set_command_response_parser
(command, parser)¶ Set a command response parser. This overwrites exising command parsers.
- Parameters
command (int) – the command number to be set.
parser (ByteStruct) – the parser for the command.
-
to_dict
()¶ Return self as a dict()
-
up
()¶ return parent element
Example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
hf = HartFrame(1)
hf.address.address.set(0x13370023)
encoded = hf.encode()
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: 0 (Flag)
address: 322371619 (BitField(38))
expansion_bytes: Array():
[
]
command: 1 (UBInt8)
byte_count: 0 (UBInt8)
payload: Command1_ReadPrimaryVariableRequest():
check_byte: 4 (CheckByte)
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x13\x37\x00\x23\x01\x00\x04
HART Application Layer¶
The HART Application Layer interfaces
the HartInterface
and
the abstracted protocol with HartFrame
.
It lets the user communicate with a single HART device easily.
Additionally you can search for HART devices, set the master address and the device address.
-
class
htf.communication.hart.
HartApplicationLayer
(interface, decoder_generator=None)¶ HART Application-Layer.
- Parameters
interface (HartInterface or compatible) – the HART interface to be used.
decoder_generator=None (callable or None) – a callable that returns a HartFrame instance with or without device specific commands.
-
close
()¶ Close the HART application layer and close the HART interface supplied. Is called in __del__, too.
-
find_device
(polling_addresses=None)¶ Find the first HART device by polling all addresses stated in
polling_addresses
and use the first device found.If no device is found an
AssertionError
is raised.
-
poll_devices
(polling_addresses=None)¶ Poll
polling_addresses
to find HART devices.- Parameters
polling_addresses=[0] (list of int) – list of HART polling addresses
- Yields
int – HART device addresses
-
query
(request, number_of_preambles=5, preamble=b'\xff', timeout=1.0)¶ Query a HART command. The HART frame is encoded automatically.
- Parameters
- Returns
if no frame was recieved
None
is returned.- Return type
-
read
(timeout=1.0)¶ Read a message using the interface and decode it using the decoder.
-
set_decoder_generator
(decoder_generator=None)¶ Set the frame generator.
- Parameters
decoder_generator=HartFrame (callable) – when called returns
-
set_device_address
(device_address)¶ Set the current HART device address.
- Parameters
device_address (int) – the HART device address to be used (<= 38 bits)
-
set_master_address
(master_address)¶ Set the current simulated master address.
- Parameters
master_address (str) – “primary_master” or “secondary_master”
-
write
(frame, number_of_preambles=5, preamble=b'\xff')¶ Write a HART frame. The HART frame is encoded automatically.
Except for command 0 the HART device address is set automatically before sending the frame content.
Find device at polling address 0 manually:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import \
HartInterface, HartApplicationLayer, HartFrame
hi = HartInterface(comport="/dev/ttyUSB1")
hal = HartApplicationLayer(hi)
# search for HART device at polling address 0 manually
cmd0_request = HartFrame(0)
cmd0_request.delimiter.frame_type.set("stx")
cmd0_request.delimiter.address_type.set("polling")
cmd0_request.address.address.set(0)
print(cmd0_request)
HartFrame():
delimiter: Delimiter():
address_type: 'polling' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: 0 (Flag)
address: 0 (BitField(6))
expansion_bytes: Array():
[
]
command: 0 (UBInt8)
byte_count: 0 (UBInt8)
payload: Command0_ReadUniqueIdentifierRequest():
check_byte: 0 (CheckByte)
response = hal.query(cmd0_request)
print(response)
HartFrame():
delimiter: Delimiter():
address_type: 'polling' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: 0 (Flag)
address: 0 (BitField(6))
expansion_bytes: Array():
[
]
command: 0 (UBInt8)
byte_count: 14 (UBInt8)
payload: Command0_ReadUniqueIdentifierResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
data_object_id: 0 (UBInt8)
device_type: 4919 (UBInt16)
minimum_preambles_request: 0 (UBInt8)
protocol_revision: 0 (UBInt8)
device_revision_level: 0 (UBInt8)
software_revision_level: 0 (UBInt8)
hardware_revision_level_and_physical_signaling_code: 0 (UBInt8)
flags: 0 (UBInt8)
device_id: BitStruct():
value: 35 (BitField(24))
check_byte: 143 (CheckByte)
device_address = (response.payload.device_type.get() << 24) +\
response.payload.device_id.value.get()
print("0x%x" % device_address)
0x1337000023
hal.close()
Find device at polling address 0:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import \
HartInterface, HartApplicationLayer
hi = HartInterface(comport="/dev/ttyUSB1")
hal = HartApplicationLayer(hi)
# search for HART device at polling address 0
device_address = hal.find_device()
print("0x%x" % device_address)
0x1337000023
hal.close()
Poll addresses 0 .. 9:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import \
HartInterface, HartApplicationLayer
hi = HartInterface(comport="/dev/ttyUSB1")
hal = HartApplicationLayer(hi)
# poll address 0 .. 9
device_addresses = hal.poll_devices(range(10))
for device_address in device_addresses:
print("0x%x" % device_address)
0x1337000023
hal.close()
Query Command 1 from first found HART device and print primary variable:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import \
HartInterface, HartApplicationLayer, HartFrame
hi = HartInterface(comport="/dev/ttyUSB1")
hal = HartApplicationLayer(hi)
# search for HART device at polling address 0
hal.find_device()
82527125539
# query command 1
cmd1_request = HartFrame(1)
response = hal.query(cmd1_request)
print(response)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: 0 (Flag)
address: 82527125539 (BitField(38))
expansion_bytes: Array():
[
]
command: 1 (UBInt8)
byte_count: 7 (UBInt8)
payload: Command1_ReadPrimaryVariableResponse():
response_code: 'buffer_overflow' (UBInt8)
field_device_status: non-primary_variable_out_of_limits (FieldDeviceStatus)
units: 123 (UBInt8)
primary_variable: 456.78900146484375 (BFloat)
check_byte: 193 (CheckByte)
primary_variable = response.payload.primary_variable.get()
print("PV:", primary_variable)
PV: 456.78900146484375
hal.close()
Data Types¶
The data types implement the needed components to build HART frames.
Packed ASCII¶
PackedASCII
implements the
Packed ASCII
data type for the HART protocol.
-
class
htf.communication.hart.data_types.
PackedASCII
(length=None, value=b'', padding=b'\x00')¶ The HART Packed ASCII data type
- Parameters
length=None – states the string length. Can be a callable (e.g. lambda) or a scalar. If set to an Integer the result is a fixed length string padded with
padding
. If set to acallable
(lambda or function) the result is a fixed or variable length string padded withpadding
. The length must be a multiple of three.value="" – the initial string value.
padding="" – that padding pattern used for filling the encoded data if value is shorter than length.
-
byte_size
()¶ Return the size in bytes.
-
decode
(data, full_data=b'', context_data=b'')¶ Decode a binary string and return the number of bytes that were decoded.
- Parameters
- Returns
the number of bytes that were decoded.
- Return type
-
encode
(full_data=b'', context_data=b'')¶ Return the encoded binary string.
-
get
()¶ Return the value.
-
introspect
(stop_at=None)¶ Return the introspection representation of the object as a string.
- Parameters
stop_at=None (object) – stop introspection at
stop_at
.
-
root
()¶ return root element
-
set
(value)¶ Set the value.
- Parameters
value – the new value
-
set_fuzzing_values
(values)¶ Set fuzzing values.
- Parameters
values (iterable) – the values used for fuzzing.
-
set_length
(length)¶ Set the length.
- Parameters
length=None – states the string length. Can be a callable (e.g. lambda) or a scalar. If set to
None
the result is a null-terminated string. If set to an Integer the result is a fixed length string padded withpadding
. If set to acallable
(lambda or function) the result is a fixed or variable length string padded withpadding
.
-
size
()¶ Return the size in bytes.
-
up
()¶ Return the parent element.
Example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import PackedASCII
pa = PackedASCII(length=6, value=b"ABCDEFGH")
encoded = pa.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5
\x04\x20\xc4\x14\x61\xc8
pa2 = PackedASCII(length=3, value=b"ABC")
pa2.decode(encoded)
3
print(pa2)
b'ABCD'
Date¶
Date
implements the
Date
data type for the HART protocol.
-
class
htf.communication.hart.data_types.
Date
(date)¶ The HART Date data type
- Parameters
date (datetime.date) – an instance of
datetime.date
ordatetime.datetime
between1900-01-01
and2155-12-31
.
-
byte_size
()¶ Return the size in bytes.
-
decode
(data, full_data=b'', context_data=b'')¶ Decode a binary string and return the number of bytes that were decoded.
- Parameters
- Returns
the number of bytes that were decoded.
- Return type
-
encode
(full_data=b'', context_data=b'')¶ Return the encoded binary string.
-
get
()¶ Return the value.
-
introspect
(stop_at=None)¶ Return the introspection representation of the object as a string.
- Parameters
stop_at=None (object) – stop introspection at
stop_at
.
-
root
()¶ return root element
-
set
(value)¶ Set the value.
- Parameters
value – the new value
-
set_fuzzing_values
(values)¶ Set fuzzing values.
- Parameters
values (iterable) – the values used for fuzzing.
-
set_length
(length)¶ Set the length.
- Parameters
length=None – states the string length. Can be a callable (e.g. lambda) or a scalar. If set to
None
the result is a null-terminated string. If set to an Integer the result is a fixed length string padded withpadding
. If set to acallable
(lambda or function) the result is a fixed or variable length string padded withpadding
.
-
size
()¶ Return the size in bytes.
-
up
()¶ Return the parent element.
Example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import Date
import datetime
date = Date(datetime.date(2017, 1, 11))
encoded = date.encode()
print(oser.to_hex(encoded))
0| 1| 2
\x75\x01\x0b
date2 = Date(None)
date2.decode(encoded)
3
print(date2)
datetime.date(2017, 1, 11)
Time¶
Time
implements the
Time
data type for the HART protocol.
-
class
htf.communication.hart.data_types.
Time
(time)¶ The HART Time data type.
- Parameters
time (datetime.time) – an instance of
datetime.time
ordatetime.datetime
between00:00:00
and23:59:59
.
-
byte_size
()¶ Return the length of the byte type in bytes.
- Returns
the length of the byte type in bytes.
- Return type
-
decode
(data, full_data=b'', context_data=b'')¶ Decode a binary string and return the number of bytes that were decoded.
- Parameters
- Returns
the number of bytes that were decoded.
- Return type
-
encode
(full_data=b'', context_data=b'')¶ Return the encoded binary string.
-
get
()¶ Return the value.
- Returns
the value.
-
introspect
(stop_at=None)¶ Return the introspection representation of the object as a string.
- Parameters
stop_at=None (object) – stop introspection at
stop_at
.
-
root
()¶ return root element
-
set
(value)¶ Set the value.
- Parameters
value – the new value
-
set_fuzzing_values
(values)¶ Set fuzzing values.
- Parameters
values (iterable) – the values used for fuzzing.
-
size
()¶ Return the length of the byte type in bytes.
- Returns
the length of the byte type in bytes.
- Return type
-
up
()¶ Return the parent element.
Example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import Time
import datetime
time = Time(datetime.time(23, 24, 7, 1000))
encoded = time.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3
\xa0\xb0\x3b\x20
time2 = Time(None)
time2.decode(encoded)
4
print(time2)
23:24:07.001000 (Time)
Response Code¶
ResponseCode
implements the
Response Code
data type for the HART protocol.
When printed the states are concatenated with ;
.
-
class
htf.communication.hart.data_types.
ResponseCode
(**kwargs)¶ HART device specific response code generator.
0: "success"
is added automatically.-
byte_size
()¶ Return the size in bytes.
-
decode
(data, full_data=b'', context_data=b'')¶ Decode a binary string and return the number of bytes that were decoded.
- Parameters
- Returns
the number of bytes that were decoded.
- Return type
-
encode
(full_data=b'', context_data=b'')¶ Return the encoded binary string.
-
get
()¶ Return the value.
- Returns
the value
-
introspect
(stop_at=None)¶ Return the introspection representation of the object as a string.
- Parameters
stop_at=None (object) – stop introspection at
stop_at
.
-
is_error
()¶ Checks if the response code is of class ‘error’ or not. Warning response codes must have the ‘warning_’-prefix. If there is no prefix the response is considered to be an error.
-
root
()¶ return root element
-
set
(value)¶ Set the value.
- Parameters
value – the new value
-
set_fuzzing_values
(values)¶ Set fuzzing values.
- Parameters
values (iterable) – the values used for fuzzing.
-
size
()¶ Return the size in bits or bytes, depending on the prototype.
-
up
()¶ Return the parent element.
-
If the MSB of the response code’s value is set a communication error is represented:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import ResponseCode
response_code = ResponseCode()
response_code.set(0x82)
encoded = response_code.encode()
print(oser.to_hex(encoded))
0
\x82
print(response_code)
'buffer_overflow' (UBInt8)
response_code2 = ResponseCode()
response_code2.decode(b"\xff")
1
print(response_code2)
'vertical_perity_error; overrun_error; framing_error; longitudinal_error; buffer_overflow' (UBInt8)
If the MSB is not set a command specific response code can be represented.
Command specific response codes are passed to
ResponseCode
as named parameters.
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import ResponseCode
class Command48_ReadAdditionalDeviceStatusResponse(oser.ByteStruct):
"""
HART command 48 response abstraction.
"""
def __init__(self):
super(Command48_ReadAdditionalDeviceStatusResponse, self).__init__()
self.response_code = ResponseCode(
error_device_specific_command_error=6,
warning_update_in_progress=8,
error_access_restricted=16,
error_busy=32)
self.data = oser.String(length=3)
# ...
c48 = Command48_ReadAdditionalDeviceStatusResponse()
c48.response_code.set(32)
print(c48)
Command48_ReadAdditionalDeviceStatusResponse():
response_code: 'error_busy' (UBInt8)
data: b''
encoded = c48.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3
\x20\x00\x00\x00
c48_2 = Command48_ReadAdditionalDeviceStatusResponse()
c48_2.decode(b"\x08\x00\x00\x00")
4
print(c48_2)
Command48_ReadAdditionalDeviceStatusResponse():
response_code: 'warning_update_in_progress' (UBInt8)
data: b'\x00\x00\x00'
Field Device Status¶
FieldDeviceStatus
implements the
Field Device Status
data type for the HART protocol.
When printed the states are concatenated with ;
.
-
class
htf.communication.hart.data_types.
FieldDeviceStatus
(value=0, format=None)¶ HART Field Device Status data type.
- Parameters
value – the initial value.
format=None (string) – Use “hex” to format values to hexadecimal. Use “bin” to format values to binary.
-
byte_size
()¶ Return the length of the byte type in bytes.
- Returns
the length of the byte type in bytes.
- Return type
-
decode
(data, full_data=b'', context_data=b'')¶ Decode a binary string and return the number of bytes that were decoded.
- Parameters
- Returns
the number of bytes that were decoded.
- Return type
-
encode
(full_data=b'', context_data=b'')¶ Return the encoded binary string.
-
get
()¶ Return the value.
- Returns
the value.
-
introspect
(stop_at=None)¶ Return the introspection representation of the object as a string.
- Parameters
stop_at=None (object) – stop introspection at
stop_at
.
-
root
()¶ return root element
-
set
(value)¶ Set the value.
- Parameters
value – the new value
-
set_fuzzing_values
(values)¶ Set fuzzing values.
- Parameters
values (iterable) – the values used for fuzzing.
-
size
()¶ Return the length of the byte type in bytes.
- Returns
the length of the byte type in bytes.
- Return type
-
up
()¶ Return the parent element.
The FieldDeviceStatus
is a bit field for predefined values:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import FieldDeviceStatus
fds = FieldDeviceStatus(0x42)
print(fds)
configuration_changed; non-primary_variable_out_of_limits (FieldDeviceStatus)
fds2 = FieldDeviceStatus(0x02)
print(fds2)
non-primary_variable_out_of_limits (FieldDeviceStatus)
encoded = fds2.encode()
print(oser.to_hex(encoded))
0
\x02
fds3 = FieldDeviceStatus(0x00)
fds3.decode(encoded)
1
print(fds3)
non-primary_variable_out_of_limits (FieldDeviceStatus)
HART Responses¶
HartResponse
implements a
HART response
data type to automatically handle error responses.
All HART responses should be derived from this class.
-
class
htf.communication.hart.data_types.
HartResponse
(*args, **kwargs)¶ A ByteStruct for HART responses which checks for error response codes in _items() and stops iteration after field_device_status. All HART responses should be derived from this class.
-
byte_size
()¶ Return the size in bytes.
- Returns
the length of the byte type in bytes.
- Return type
-
decode
(data, full_data=b'', context_data=b'')¶ Decode a binary string and return the number of bytes that were decoded.
- Parameters
- Returns
the number of bytes that were decoded.
- Return type
-
encode
(full_data=b'', context_data=b'')¶ Return the encoded binary string.
-
from_dict
(data)¶ Fill self with data.
- Parameters
data (dict) – data to be used to fill the calling instance.
-
fuzzing_iterator
(copy=False)¶ The fuzzing iterator iterates over all combinations of set fuzzing values (
oser.ByteType.set_fuzzing_values
). If no fuzzing values are set the current struct is yielded.- Parameters
copy=False (bool) – if set to
True
the generated fuzzing values are deep copies of the original. Creating these deep copies is slow. If set toFalse
the original struct is retruned and the generated value must be used immediately since the next generated overwrites the values on the same value.- Yields
the fuzzing combinations.
-
introspect
(stop_at=None)¶ Return the introspection representation of the object as a string.
- Parameters
stop_at=None (object) – stop introspection at
stop_at
.
-
root
()¶ return root element
-
to_dict
()¶ Return self as a dict()
-
up
()¶ return parent element
-
Universal Commands¶
Command 0¶
Command 0 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(0)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'polling' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (PollingAddress(6))
expansion_bytes: Array():
[
]
command: 0 (Command)
byte_count: 0 (UBInt8)
payload: Command0_ReadUniqueIdentifierRequest():
check_byte: 130 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4
\x02\x80\x00\x00\x82
# response
hf = HartFrame(0)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'polling' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (PollingAddress(6))
expansion_bytes: Array():
[
]
command: 0 (Command)
byte_count: 14 (UBInt8)
payload: Command0_ReadUniqueIdentifierResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
data_object_id: 0 (UBInt8)
device_type: 0 (UBInt16)
minimum_preambles_request: 0 (UBInt8)
protocol_revision: 0 (UBInt8)
device_revision_level: 0 (UBInt8)
software_revision_level: 0 (UBInt8)
hardware_revision_level_and_physical_signaling_code: 0 (UBInt8)
flags: 0 (UBInt8)
device_id: BitStruct():
value: 0 (BitField(24))
check_byte: 136 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18
\x06\x80\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88
Command 1¶
Command 1 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(1)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 1 (Command)
byte_count: 0 (UBInt8)
payload: Command1_ReadPrimaryVariableRequest():
check_byte: 3 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x01\x00\x03
# response
hf = HartFrame(1)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 1 (Command)
byte_count: 7 (UBInt8)
payload: Command1_ReadPrimaryVariableResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
units: 0 (UBInt8)
primary_variable: 0.0 (BFloat)
check_byte: 0 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15
\x86\x80\x00\x00\x00\x00\x01\x07\x00\x00\x00\x00\x00\x00\x00\x00
Command 2¶
Command 2 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(2)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 2 (Command)
byte_count: 0 (UBInt8)
payload: Command2_ReadLoopCurrentAndPercentageOfRangeRequest():
check_byte: 0 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x02\x00\x00
# response
hf = HartFrame(2)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 2 (Command)
byte_count: 10 (UBInt8)
payload: Command2_ReadLoopCurrentAndPercentageOfRangeResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
primary_variable_loop_current: 0.0 (BFloat)
primary_variable_percentage_of_range: 0.0 (BFloat)
check_byte: 14 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18
\x86\x80\x00\x00\x00\x00\x02\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e
Command 3¶
Command 3 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(3)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 3 (Command)
byte_count: 0 (UBInt8)
payload: Command3_ReadDynamicVariablesAndLoopCurrentRequest():
check_byte: 1 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x03\x00\x01
# response
hf = HartFrame(3)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 3 (Command)
byte_count: 6 (UBInt8)
payload: Command3_ReadDynamicVariablesAndLoopCurrentResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
primary_variable_loop_current: 0.0 (BFloat)
units_and_variables: Array():
[
]
check_byte: 3 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x86\x80\x00\x00\x00\x00\x03\x06\x00\x00\x00\x00\x00\x00\x03
Command 6¶
Command 6 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(6)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 6 (Command)
byte_count: 1 (UBInt8)
payload: Command6_WritePollingAddressRequest():
polling_address: 0 (UBInt8)
check_byte: 5 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x06\x01\x00\x05
# response
hf = HartFrame(6)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 6 (Command)
byte_count: 4 (UBInt8)
payload: Command6_WritePollingAddressResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
polling_address: 0 (UBInt8)
loop_current_mode: 0 (UBInt8)
check_byte: 4 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x86\x80\x00\x00\x00\x00\x06\x04\x00\x00\x00\x00\x04
Command 7¶
Command 7 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(7)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 7 (Command)
byte_count: 0 (UBInt8)
payload: Command7_ReadLoopConfigurationRequest():
check_byte: 5 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x07\x00\x05
# response
hf = HartFrame(7)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 7 (Command)
byte_count: 4 (UBInt8)
payload: Command7_ReadLoopConfigurationResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
polling_address: 0 (UBInt8)
loop_current_mode: 0 (UBInt8)
check_byte: 5 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x86\x80\x00\x00\x00\x00\x07\x04\x00\x00\x00\x00\x05
Command 8¶
Command 8 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(8)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 8 (Command)
byte_count: 0 (UBInt8)
payload: Command8_ReadDynamicVariableClassificationsRequest():
check_byte: 10 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x08\x00\x0a
# response
hf = HartFrame(8)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 8 (Command)
byte_count: 6 (UBInt8)
payload: Command8_ReadDynamicVariableClassificationsResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
primary_variable_classification: 0 (UBInt8)
secondary_variable_classification: 0 (UBInt8)
tertiary_variable_classification: 0 (UBInt8)
quaternary_variable_classification: 0 (UBInt8)
check_byte: 8 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x86\x80\x00\x00\x00\x00\x08\x06\x00\x00\x00\x00\x00\x00\x08
Command 9¶
Command 9 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(9)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 9 (Command)
byte_count: 0 (UBInt8)
payload: Command9_ReadDeviceVariablesWithStatusRequest():
device_variable_codes: Array():
[
]
check_byte: 11 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x09\x00\x0b
# response
hf = HartFrame(9)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 9 (Command)
byte_count: 7 (UBInt8)
payload: Command9_ReadDeviceVariablesWithStatusResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
extended_field_device_status: 0 (UBInt8)
variables_and_statuses: Array():
[
]
slot0_data_time_stamp: 00:00:00 (Time)
check_byte: 8 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15
\x86\x80\x00\x00\x00\x00\x09\x07\x00\x00\x00\x00\x00\x00\x00\x08
Command 11¶
Command 11 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(11)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 11 (Command)
byte_count: 6 (UBInt8)
payload: Command11_ReadUniqueIdentifierAssociatedWithTagRequest():
tag: b'????????'
check_byte: 15 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x82\x80\x00\x00\x00\x00\x0b\x06\xff\xff\xff\xff\xff\xff\x0f
# response
hf = HartFrame(11)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 11 (Command)
byte_count: 14 (UBInt8)
payload: Command11_ReadUniqueIdentifierAssociatedWithTagResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
data_object_id: 0 (UBInt8)
device_type: 0 (UBInt16)
minimum_preambles_request: 0 (UBInt8)
protocol_revision: 0 (UBInt8)
device_revision_level: 0 (UBInt8)
software_revision_level: 0 (UBInt8)
hardware_revision_level_and_physical_signaling_code: 0 (UBInt8)
flags: 0 (UBInt8)
device_id: BitStruct():
value: 0 (BitField(24))
check_byte: 3 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22
\x86\x80\x00\x00\x00\x00\x0b\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03
Command 12¶
Command 12 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(12)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 12 (Command)
byte_count: 0 (UBInt8)
payload: Command12_ReadMessageRequest():
check_byte: 14 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x0c\x00\x0e
# response
hf = HartFrame(12)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 12 (Command)
byte_count: 26 (UBInt8)
payload: Command12_ReadMessageResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
message: b'????????????????????????????????'
check_byte: 16 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33| 34
\x86\x80\x00\x00\x00\x00\x0c\x1a\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10
Command 13¶
Command 13 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(13)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 13 (Command)
byte_count: 0 (UBInt8)
payload: Command13_ReadTagDescriptorDateRequest():
check_byte: 15 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x0d\x00\x0f
# response
hf = HartFrame(13)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 13 (Command)
byte_count: 23 (UBInt8)
payload: Command13_ReadTagDescriptorDateResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
tag: b'????????'
descriptor: b'????????????????'
date: datetime.date(1900, 1, 1)
check_byte: 28 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31
\x86\x80\x00\x00\x00\x00\x0d\x17\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x01\x00\x1c
Command 14¶
Command 14 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(14)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 14 (Command)
byte_count: 0 (UBInt8)
payload: Command14_ReadPrimaryVariableTransducerInformationRequest():
check_byte: 12 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x0e\x00\x0c
# response
hf = HartFrame(14)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 14 (Command)
byte_count: 18 (UBInt8)
payload: Command14_ReadPrimaryVariableTransducerInformationResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
serial_number: BitStruct():
value: 0 (BitField(24))
units_code: 0 (UBInt8)
upper_limit: 0.0 (BFloat)
lower_limit: 0.0 (BFloat)
minimum_span: 0.0 (BFloat)
check_byte: 26 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26
\x86\x80\x00\x00\x00\x00\x0e\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a
Command 15¶
Command 15 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(15)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 15 (Command)
byte_count: 0 (UBInt8)
payload: Command15_ReadDeviceInformationRequest():
check_byte: 13 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x0f\x00\x0d
# response
hf = HartFrame(15)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 15 (Command)
byte_count: 20 (UBInt8)
payload: Command15_ReadDeviceInformationResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
alarm_selection_code: 0 (UBInt8)
transfer_function_code: 0 (UBInt8)
units_code: 0 (UBInt8)
upper_range_value: 0.0 (BFloat)
lower_range_value: 0.0 (BFloat)
daming_value: 0.0 (BFloat)
write_protect_code: 0 (UBInt8)
reserved: 250 (UBInt8)
analog_channel_flags: 0 (UBInt8)
check_byte: 231 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28
\x86\x80\x00\x00\x00\x00\x0f\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfa\x00\xe7
Command 16¶
Command 16 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(16)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 16 (Command)
byte_count: 0 (UBInt8)
payload: Command16_ReadFinalAssemblyNumberRequest():
check_byte: 18 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x10\x00\x12
# response
hf = HartFrame(16)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 16 (Command)
byte_count: 5 (UBInt8)
payload: Command16_ReadFinalAssemblyNumberResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
final_assembly_number: BitStruct():
value: 0 (BitField(24))
check_byte: 19 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13
\x86\x80\x00\x00\x00\x00\x10\x05\x00\x00\x00\x00\x00\x13
Command 17¶
Command 17 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(17)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 17 (Command)
byte_count: 24 (UBInt8)
payload: Command17_WriteMessageRequest():
message: b'????????????????????????????????'
check_byte: 11 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32
\x82\x80\x00\x00\x00\x00\x11\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b
# response
hf = HartFrame(17)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 17 (Command)
byte_count: 26 (UBInt8)
payload: Command17_WriteMessageResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
message: b'????????????????????????????????'
check_byte: 13 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33| 34
\x86\x80\x00\x00\x00\x00\x11\x1a\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d
Command 18¶
Command 18 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(18)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 18 (Command)
byte_count: 21 (UBInt8)
payload: Command18_WriteTageDescriptorDateRequest():
tag: b'????????'
descriptor: b'????????????????'
date: datetime.date(1900, 1, 1)
check_byte: 5 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29
\x82\x80\x00\x00\x00\x00\x12\x15\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x01\x00\x05
# response
hf = HartFrame(18)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 18 (Command)
byte_count: 23 (UBInt8)
payload: Command18_WriteTageDescriptorDateResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
tag: b'????????'
descriptor: b'????????????????'
date: datetime.date(1900, 1, 1)
check_byte: 3 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31
\x86\x80\x00\x00\x00\x00\x12\x17\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x01\x00\x03
Command 19¶
Command 19 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(19)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 19 (Command)
byte_count: 3 (UBInt8)
payload: Command19_WriteFinalAssemblyNumberRequest():
final_assembly_number: BitStruct():
value: 0 (BitField(24))
check_byte: 18 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x82\x80\x00\x00\x00\x00\x13\x03\x00\x00\x00\x12
# response
hf = HartFrame(19)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 19 (Command)
byte_count: 5 (UBInt8)
payload: Command19_WriteFinalAssemblyNumberResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
final_assembly_number: BitStruct():
value: 0 (BitField(24))
check_byte: 16 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13
\x86\x80\x00\x00\x00\x00\x13\x05\x00\x00\x00\x00\x00\x10
Command 20¶
Command 20 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(20)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 20 (Command)
byte_count: 0 (UBInt8)
payload: Command20_ReadLongTagRequest():
check_byte: 22 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x14\x00\x16
# response
hf = HartFrame(20)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 20 (Command)
byte_count: 34 (UBInt8)
payload: Command20_ReadLongTagResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
long_tag: b''
check_byte: 48 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42
\x86\x80\x00\x00\x00\x00\x14\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30
Command 21¶
Command 21 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(21)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 21 (Command)
byte_count: 32 (UBInt8)
payload: Command21_ReadUniqueIdentifierAssociatedWithLongTagRequest():
long_tag: b''
check_byte: 55 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40
\x82\x80\x00\x00\x00\x00\x15\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37
# response
hf = HartFrame(21)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 21 (Command)
byte_count: 14 (UBInt8)
payload: Command21_ReadUniqueIdentifierAssociatedWithLongTagResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
data_object_id: 0 (UBInt8)
device_type: 0 (UBInt16)
minimum_preambles_request: 0 (UBInt8)
protocol_revision: 0 (UBInt8)
device_revision_level: 0 (UBInt8)
software_revision_level: 0 (UBInt8)
hardware_revision_level_and_physical_signaling_code: 0 (UBInt8)
flags: 0 (UBInt8)
device_id: BitStruct():
value: 0 (BitField(24))
check_byte: 29 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22
\x86\x80\x00\x00\x00\x00\x15\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d
Command 22¶
Command 22 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(22)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 22 (Command)
byte_count: 32 (UBInt8)
payload: Command22_WriteLongTagRequest():
long_tag: b''
check_byte: 52 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40
\x82\x80\x00\x00\x00\x00\x16\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34
# response
hf = HartFrame(22)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 22 (Command)
byte_count: 34 (UBInt8)
payload: Command22_WriteLongTagResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
long_tag: b''
check_byte: 50 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42
\x86\x80\x00\x00\x00\x00\x16\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32
Command 38¶
Command 38 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(38)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 38 (Command)
byte_count: 0 (UBInt8)
payload: Command38_ResetConfigurationChangedFlagRequest():
check_byte: 36 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x26\x00\x24
# response
hf = HartFrame(38)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 38 (Command)
byte_count: 4 (UBInt8)
payload: Command38_ResetConfigurationChangedFlagResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
configuration_change_counter: 0 (UBInt16)
check_byte: 36 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x86\x80\x00\x00\x00\x00\x26\x04\x00\x00\x00\x00\x24
Common Practice Commands¶
Common Practice Commands¶
Command 33¶
Command 33 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(33)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 33 (Command)
byte_count: 0 (UBInt8)
payload: Command33_ReadDeviceVariablesRequest():
device_variable_codes: Array():
[
]
check_byte: 35 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x21\x00\x23
# response
hf = HartFrame(33)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 33 (Command)
byte_count: 2 (UBInt8)
payload: Command33_ReadDeviceVariablesResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_codes_units_and_values: Array():
[
]
check_byte: 37 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x86\x80\x00\x00\x00\x00\x21\x02\x00\x00\x25
Command 34¶
Command 34 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(34)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 34 (Command)
byte_count: 4 (UBInt8)
payload: Command34_WritePrimaryVariableDampingValueRequest():
primary_variable_damping_value: 0.0 (BFloat)
check_byte: 36 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x82\x80\x00\x00\x00\x00\x22\x04\x00\x00\x00\x00\x24
# response
hf = HartFrame(34)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 34 (Command)
byte_count: 6 (UBInt8)
payload: Command34_WritePrimaryVariableDampingValueResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
actual_primary_variable_damping_value: 0.0 (BFloat)
check_byte: 34 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x86\x80\x00\x00\x00\x00\x22\x06\x00\x00\x00\x00\x00\x00\x22
Command 35¶
Command 35 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(35)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 35 (Command)
byte_count: 9 (UBInt8)
payload: Command35_WritePrimaryVariableRangeValuesRequest():
primary_variable_upper_and_lower_range_value_units_code: 0 (UBInt8)
primary_variable_upper_range_value: 0.0 (BFloat)
primary_variable_lower_range_value: 0.0 (BFloat)
check_byte: 40 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17
\x82\x80\x00\x00\x00\x00\x23\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28
# response
hf = HartFrame(35)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 35 (Command)
byte_count: 11 (UBInt8)
payload: Command35_WritePrimaryVariableRangeValuesResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
primary_variable_upper_and_lower_range_value_units_code: 0 (UBInt8)
primary_variable_upper_range_value: 0.0 (BFloat)
primary_variable_lower_range_value: 0.0 (BFloat)
check_byte: 46 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19
\x86\x80\x00\x00\x00\x00\x23\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2e
Command 36¶
Command 36 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(36)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 36 (Command)
byte_count: 0 (UBInt8)
payload: Command36_SetPrimaryVariableUpperRangeValueRequest():
check_byte: 38 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x24\x00\x26
# response
hf = HartFrame(36)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 36 (Command)
byte_count: 2 (UBInt8)
payload: Command36_SetPrimaryVariableUpperRangeValueResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
check_byte: 32 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x86\x80\x00\x00\x00\x00\x24\x02\x00\x00\x20
Command 37¶
Command 37 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(37)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 37 (Command)
byte_count: 0 (UBInt8)
payload: Command37_SetPrimaryVariableLowerRangeValueRequest():
check_byte: 39 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x25\x00\x27
# response
hf = HartFrame(37)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 37 (Command)
byte_count: 2 (UBInt8)
payload: Command37_SetPrimaryVariableLowerRangeValueResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
check_byte: 33 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x86\x80\x00\x00\x00\x00\x25\x02\x00\x00\x21
Command 39¶
Command 39 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(39)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 39 (Command)
byte_count: 1 (UBInt8)
payload: Command39_EEPROMControlRequest():
eeprom_control_code: 0 (UBInt8)
check_byte: 36 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x27\x01\x00\x24
# response
hf = HartFrame(39)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 39 (Command)
byte_count: 3 (UBInt8)
payload: Command39_EEPROMControlResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
eeprom_control_code: 0 (UBInt8)
check_byte: 34 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x27\x03\x00\x00\x00\x22
Command 40¶
Command 40 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(40)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 40 (Command)
byte_count: 4 (UBInt8)
payload: Command40_EnterExitFixedCurrentModeRequest():
primary_variable_fixed_current_level: 0.0 (BFloat)
check_byte: 46 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x82\x80\x00\x00\x00\x00\x28\x04\x00\x00\x00\x00\x2e
# response
hf = HartFrame(40)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 40 (Command)
byte_count: 6 (UBInt8)
payload: Command40_EnterExitFixedCurrentModeResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
actual_primary_variable_current_level: 0.0 (BFloat)
check_byte: 40 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x86\x80\x00\x00\x00\x00\x28\x06\x00\x00\x00\x00\x00\x00\x28
Command 41¶
Command 41 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(41)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 41 (Command)
byte_count: 0 (UBInt8)
payload: Command41_PerformSelfTestRequest():
check_byte: 43 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x29\x00\x2b
# response
hf = HartFrame(41)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 41 (Command)
byte_count: 2 (UBInt8)
payload: Command41_PerformSelfTestResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
check_byte: 45 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x86\x80\x00\x00\x00\x00\x29\x02\x00\x00\x2d
Command 42¶
Command 42 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(42)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 42 (Command)
byte_count: 0 (UBInt8)
payload: Command42_PerformDeviceResetRequest():
check_byte: 40 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x2a\x00\x28
# response
hf = HartFrame(42)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 42 (Command)
byte_count: 2 (UBInt8)
payload: Command42_PerformDeviceResetResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
check_byte: 46 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x86\x80\x00\x00\x00\x00\x2a\x02\x00\x00\x2e
Command 43¶
Command 43 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(43)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 43 (Command)
byte_count: 0 (UBInt8)
payload: Command43_SetPrimaryVariableZeroRequest():
check_byte: 41 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x2b\x00\x29
# response
hf = HartFrame(43)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 43 (Command)
byte_count: 2 (UBInt8)
payload: Command43_SetPrimaryVariableZeroResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
check_byte: 47 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x86\x80\x00\x00\x00\x00\x2b\x02\x00\x00\x2f
Command 44¶
Command 44 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(44)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 44 (Command)
byte_count: 1 (UBInt8)
payload: Command44_WritePrimaryVariableUnitsRequest():
primary_variable_units_code: 0 (UBInt8)
check_byte: 47 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x2c\x01\x00\x2f
# response
hf = HartFrame(44)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 44 (Command)
byte_count: 3 (UBInt8)
payload: Command44_WritePrimaryVariableUnitsResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
primary_variable_units_code: 0 (UBInt8)
check_byte: 41 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x2c\x03\x00\x00\x00\x29
Command 45¶
Command 45 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(45)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 45 (Command)
byte_count: 4 (UBInt8)
payload: Command45_TrimLoopCurrentZeroRequest():
externally_measured_primary_variable_loop_current_level: 0.0 (BFloat)
check_byte: 43 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x82\x80\x00\x00\x00\x00\x2d\x04\x00\x00\x00\x00\x2b
# response
hf = HartFrame(45)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 45 (Command)
byte_count: 6 (UBInt8)
payload: Command45_TrimLoopCurrentZeroResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
actual_measured_primary_variable_loop_current_level: 0.0 (BFloat)
check_byte: 45 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x86\x80\x00\x00\x00\x00\x2d\x06\x00\x00\x00\x00\x00\x00\x2d
Command 46¶
Command 46 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(46)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 46 (Command)
byte_count: 4 (UBInt8)
payload: Command46_TrimLoopCurrentGainRequest():
externally_measured_primary_variable_loop_current_level: 0.0 (BFloat)
check_byte: 40 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x82\x80\x00\x00\x00\x00\x2e\x04\x00\x00\x00\x00\x28
# response
hf = HartFrame(46)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 46 (Command)
byte_count: 6 (UBInt8)
payload: Command46_TrimLoopCurrentGainResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
actual_measured_primary_variable_loop_current_level: 0.0 (BFloat)
check_byte: 46 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x86\x80\x00\x00\x00\x00\x2e\x06\x00\x00\x00\x00\x00\x00\x2e
Command 47¶
Command 47 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(47)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 47 (Command)
byte_count: 1 (UBInt8)
payload: Command47_WritePrimaryVariableTransferFunctionRequest():
primary_variable_transfer_function_code: 0 (UBInt8)
check_byte: 44 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x2f\x01\x00\x2c
# response
hf = HartFrame(47)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 47 (Command)
byte_count: 3 (UBInt8)
payload: Command47_WritePrimaryVariableTransferFunctionResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
primary_variable_transfer_function_code: 0 (UBInt8)
check_byte: 42 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x2f\x03\x00\x00\x00\x2a
Command 48¶
Command 48 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(48)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 48 (Command)
byte_count: 0 (UBInt8)
payload: Command48_ReadAdditionalDeviceStatusRequest():
check_byte: 50 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x30\x00\x32
# response
hf = HartFrame(48)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 48 (Command)
byte_count: 11 (UBInt8)
payload: Command48_ReadAdditionalDeviceStatusResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_specific_status: BitStruct():
value: 0 (BitField(48))
extended_device_status: 0 (UBInt8)
device_operating_mode: 0 (UBInt8)
status0: 0 (UBInt8)
check_byte: 61 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19
\x86\x80\x00\x00\x00\x00\x30\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d
Command 49¶
Command 49 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(49)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 49 (Command)
byte_count: 3 (UBInt8)
payload: Command49_WritePrimaryVariableTransducerSerialNumberRequest():
primary_variable_transducer_serial_number: BitStruct():
value: 0 (BitField(24))
check_byte: 48 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x82\x80\x00\x00\x00\x00\x31\x03\x00\x00\x00\x30
# response
hf = HartFrame(49)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 49 (Command)
byte_count: 5 (UBInt8)
payload: Command49_WritePrimaryVariableTransducerSerialNumberResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
primary_variable_transducer_serial_number: BitStruct():
value: 0 (BitField(24))
check_byte: 50 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13
\x86\x80\x00\x00\x00\x00\x31\x05\x00\x00\x00\x00\x00\x32
Command 50¶
Command 50 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(50)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 50 (Command)
byte_count: 0 (UBInt8)
payload: Command50_ReadDynamicVariableAssignmentsRequest():
check_byte: 48 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x32\x00\x30
# response
hf = HartFrame(50)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 50 (Command)
byte_count: 6 (UBInt8)
payload: Command50_ReadDynamicVariableAssignmentsResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
primary_variable_device_variable: 0 (UBInt8)
secondary_variable_device_variable: 0 (UBInt8)
tertiary_variable_device_variable: 0 (UBInt8)
quaternary_variable_device_variable: 0 (UBInt8)
check_byte: 50 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x86\x80\x00\x00\x00\x00\x32\x06\x00\x00\x00\x00\x00\x00\x32
Command 51¶
Command 51 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(51)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 51 (Command)
byte_count: 0 (UBInt8)
payload: Command51_WriteDynamicVariableAssignmentsRequest():
device_variables: Array():
[
]
check_byte: 49 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x33\x00\x31
# response
hf = HartFrame(51)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 51 (Command)
byte_count: 2 (UBInt8)
payload: Command51_WriteDynamicVariableAssignmentsResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variables: Array():
[
]
check_byte: 55 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x86\x80\x00\x00\x00\x00\x33\x02\x00\x00\x37
Command 52¶
Command 52 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(52)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 52 (Command)
byte_count: 1 (UBInt8)
payload: Command52_SetDeviceVariableZeroRequest():
device_variable_to_zero: 0 (UBInt8)
check_byte: 55 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x34\x01\x00\x37
# response
hf = HartFrame(52)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 52 (Command)
byte_count: 3 (UBInt8)
payload: Command52_SetDeviceVariableZeroResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_to_zero: 0 (UBInt8)
check_byte: 49 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x34\x03\x00\x00\x00\x31
Command 53¶
Command 53 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(53)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 53 (Command)
byte_count: 2 (UBInt8)
payload: Command53_WriteDeviceVariableUnitsRequest():
device_variable_code: 0 (UBInt8)
device_variable_units_code: 0 (UBInt8)
check_byte: 53 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x82\x80\x00\x00\x00\x00\x35\x02\x00\x00\x35
# response
hf = HartFrame(53)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 53 (Command)
byte_count: 4 (UBInt8)
payload: Command53_WriteDeviceVariableUnitsResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_code: 0 (UBInt8)
device_variable_units_code: 0 (UBInt8)
check_byte: 55 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x86\x80\x00\x00\x00\x00\x35\x04\x00\x00\x00\x00\x37
Command 54¶
Command 54 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(54)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 54 (Command)
byte_count: 1 (UBInt8)
payload: Command54_ReadDeviceVariableInformationRequest():
device_variable_code: 0 (UBInt8)
check_byte: 53 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x36\x01\x00\x35
# response
hf = HartFrame(54)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 54 (Command)
byte_count: 30 (UBInt8)
payload: Command54_ReadDeviceVariableInformationResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_code: 0 (UBInt8)
device_variable_transducer_serial_number: BitStruct():
value: 0 (BitField(24))
device_variable_limits: 0 (UBInt8)
device_variable_upper_transducer_limit: 0.0 (BFloat)
device_variable_lower_transducer_limit: 0.0 (BFloat)
device_variable_damping_value: 0.0 (BFloat)
device_variable_minimum_span: 0.0 (BFloat)
device_variable_classification: 0 (UBInt8)
device_variable_family: 0 (UBInt8)
acquisition_period: 00:00:00 (Time)
device_variable_properties: 0 (UBInt8)
check_byte: 46 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38
\x86\x80\x00\x00\x00\x00\x36\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2e
Command 55¶
Command 55 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(55)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 55 (Command)
byte_count: 5 (UBInt8)
payload: Command55_WriteDeviceVariableDampingValueRequest():
device_variable_code: 0 (UBInt8)
device_variable_damping_value: 0.0 (BFloat)
check_byte: 48 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13
\x82\x80\x00\x00\x00\x00\x37\x05\x00\x00\x00\x00\x00\x30
# response
hf = HartFrame(55)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 55 (Command)
byte_count: 7 (UBInt8)
payload: Command55_WriteDeviceVariableDampingValueResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_code: 0 (UBInt8)
device_variable_damping_value: 0.0 (BFloat)
check_byte: 54 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15
\x86\x80\x00\x00\x00\x00\x37\x07\x00\x00\x00\x00\x00\x00\x00\x36
Command 56¶
Command 56 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(56)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 56 (Command)
byte_count: 4 (UBInt8)
payload: Command56_WriteDeviceVariableTransducerSerialNumberRequest():
device_variable_code: 0 (UBInt8)
device_variable_transducer_serial_number: BitStruct():
value: 0 (BitField(24))
check_byte: 62 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x82\x80\x00\x00\x00\x00\x38\x04\x00\x00\x00\x00\x3e
# response
hf = HartFrame(56)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 56 (Command)
byte_count: 6 (UBInt8)
payload: Command56_WriteDeviceVariableTransducerSerialNumberResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_code: 0 (UBInt8)
device_variable_transducer_serial_number: BitStruct():
value: 0 (BitField(24))
check_byte: 56 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x86\x80\x00\x00\x00\x00\x38\x06\x00\x00\x00\x00\x00\x00\x38
Command 57¶
Command 57 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(57)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 57 (Command)
byte_count: 0 (UBInt8)
payload: Command57_ReadUnitTagDescriptorDateRequest():
check_byte: 59 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x39\x00\x3b
# response
hf = HartFrame(57)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 57 (Command)
byte_count: 23 (UBInt8)
payload: Command57_ReadUnitTagDescriptorDateResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
unit_tag: b'????????'
unit_descriptor: b'????????????????'
unit_date: BitStruct():
value: 0 (BitField(24))
check_byte: 40 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31
\x86\x80\x00\x00\x00\x00\x39\x17\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x28
Command 58¶
Command 58 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(58)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 58 (Command)
byte_count: 21 (UBInt8)
payload: Command58_WriteUnitTagDescriptorDateRequest():
unit_tag: b'????????'
unit_descriptor: b'????????????????'
unit_date: BitStruct():
value: 0 (BitField(24))
check_byte: 45 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29
\x82\x80\x00\x00\x00\x00\x3a\x15\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x2d
# response
hf = HartFrame(58)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 58 (Command)
byte_count: 23 (UBInt8)
payload: Command58_WriteUnitTagDescriptorDateResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
unit_tag: b'????????'
unit_descriptor: b'????????????????'
unit_date: BitStruct():
value: 0 (BitField(24))
check_byte: 43 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31
\x86\x80\x00\x00\x00\x00\x3a\x17\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x2b
Command 59¶
Command 59 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(59)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 59 (Command)
byte_count: 1 (UBInt8)
payload: Command59_WriteNumberOfResponsePreamblesRequest():
number_of_preambles: 0 (UBInt8)
check_byte: 56 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x3b\x01\x00\x38
# response
hf = HartFrame(59)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 59 (Command)
byte_count: 3 (UBInt8)
payload: Command59_WriteNumberOfResponsePreamblesResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
number_of_preambles: 0 (UBInt8)
check_byte: 62 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x3b\x03\x00\x00\x00\x3e
Command 60¶
Command 60 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(60)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 60 (Command)
byte_count: 1 (UBInt8)
payload: Command60_ReadAnalogChannelAndPercentOfRangeRequest():
analog_channel_number_code: 0 (UBInt8)
check_byte: 63 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x3c\x01\x00\x3f
# response
hf = HartFrame(60)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 60 (Command)
byte_count: 12 (UBInt8)
payload: Command60_ReadAnalogChannelAndPercentOfRangeResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
analog_channel_number_code: 0 (UBInt8)
analog_channel_units_code: 0 (UBInt8)
analog_channel_level: 0.0 (BFloat)
analog_channel_percent_of_range: 0.0 (BFloat)
check_byte: 54 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20
\x86\x80\x00\x00\x00\x00\x3c\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36
Command 61¶
Command 61 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(61)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 61 (Command)
byte_count: 0 (UBInt8)
payload: Command61_ReadDynamicVariablesAndPrimaryVariableAnalogChannelRequest():
check_byte: 63 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x3d\x00\x3f
# response
hf = HartFrame(61)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 61 (Command)
byte_count: 7 (UBInt8)
payload: Command61_ReadDynamicVariablesAndPrimaryVariableAnalogChannelResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
primary_variable_analog_channel_units_code: 0 (UBInt8)
primary_variable_analog_level: 0.0 (BFloat)
dynamic_variables: Array():
[
]
check_byte: 60 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15
\x86\x80\x00\x00\x00\x00\x3d\x07\x00\x00\x00\x00\x00\x00\x00\x3c
Command 62¶
Command 62 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(62)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 62 (Command)
byte_count: 0 (UBInt8)
payload: Command62_ReadAnalogChannelsRequest():
analog_channel_number_codes: Array():
[
]
check_byte: 60 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x3e\x00\x3c
# response
hf = HartFrame(62)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 62 (Command)
byte_count: 2 (UBInt8)
payload: Command62_ReadAnalogChannelsResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
analog_channel_levels: Array():
[
]
check_byte: 58 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x86\x80\x00\x00\x00\x00\x3e\x02\x00\x00\x3a
Command 63¶
Command 63 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(63)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 63 (Command)
byte_count: 1 (UBInt8)
payload: Command63_ReadAnalogChannelInformationRequest():
analog_channel_number_code: 0 (UBInt8)
check_byte: 60 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x3f\x01\x00\x3c
# response
hf = HartFrame(63)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 63 (Command)
byte_count: 19 (UBInt8)
payload: Command63_ReadAnalogChannelInformationResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
analog_channel_number_code: 0 (UBInt8)
analog_channel_alarm_selection_code: 0 (UBInt8)
analog_channel_transfer_function_code: 0 (UBInt8)
analog_channel_upper_and_lower_range_value_units_code: 0 (UBInt8)
analog_channel_upper_range_value: 0.0 (BFloat)
analog_channel_lower_range_value: 0.0 (BFloat)
analog_channel_damping_value: 0.0 (BFloat)
analog_channel_flags: 0 (UBInt8)
check_byte: 42 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27
\x86\x80\x00\x00\x00\x00\x3f\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a
Command 64¶
Command 64 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(64)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 64 (Command)
byte_count: 5 (UBInt8)
payload: Command64_WriteAnalogChannelAdditionalDampingValueRequest():
analog_channel_number_code: 0 (UBInt8)
analog_channel_additional_damping_value: 0.0 (BFloat)
check_byte: 71 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13
\x82\x80\x00\x00\x00\x00\x40\x05\x00\x00\x00\x00\x00\x47
# response
hf = HartFrame(64)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 64 (Command)
byte_count: 7 (UBInt8)
payload: Command64_WriteAnalogChannelAdditionalDampingValueResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
analog_channel_number_code: 0 (UBInt8)
analog_channel_additional_damping_value: 0.0 (BFloat)
check_byte: 65 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15
\x86\x80\x00\x00\x00\x00\x40\x07\x00\x00\x00\x00\x00\x00\x00\x41
Command 65¶
Command 65 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(65)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 65 (Command)
byte_count: 10 (UBInt8)
payload: Command65_WriteAnalogChannelRangeValuesRequest():
analog_channel_number_code: 0 (UBInt8)
analog_channel_upper_and_lower_range_value_units_code: 0 (UBInt8)
analog_channel_upper_range_value: 0.0 (BFloat)
analog_channel_lower_range_value: 0.0 (BFloat)
check_byte: 73 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18
\x82\x80\x00\x00\x00\x00\x41\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49
# response
hf = HartFrame(65)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 65 (Command)
byte_count: 12 (UBInt8)
payload: Command65_WriteAnalogChannelRangeValuesResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
analog_channel_number_code: 0 (UBInt8)
analog_channel_upper_and_lower_range_value_units_code: 0 (UBInt8)
analog_channel_upper_range_value: 0.0 (BFloat)
analog_channel_lower_range_value: 0.0 (BFloat)
check_byte: 75 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20
\x86\x80\x00\x00\x00\x00\x41\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b
Command 66¶
Command 66 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(66)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 66 (Command)
byte_count: 6 (UBInt8)
payload: Command66_EnterExitFixedAnalogChannelModeRequest():
analog_channel_number_code: 0 (UBInt8)
analog_channel_units_code: 0 (UBInt8)
fixed_analog_channel_level: 0.0 (BFloat)
check_byte: 70 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x82\x80\x00\x00\x00\x00\x42\x06\x00\x00\x00\x00\x00\x00\x46
# response
hf = HartFrame(66)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 66 (Command)
byte_count: 8 (UBInt8)
payload: Command66_EnterExitFixedAnalogChannelModeResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
analog_channel_number_code: 0 (UBInt8)
analog_channel_units_code: 0 (UBInt8)
fixed_analog_channel_level: 0.0 (BFloat)
check_byte: 76 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16
\x86\x80\x00\x00\x00\x00\x42\x08\x00\x00\x00\x00\x00\x00\x00\x00\x4c
Command 67¶
Command 67 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(67)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 67 (Command)
byte_count: 6 (UBInt8)
payload: Command67_TrimAnalogChannelZeroRequest():
analog_channel_number_code: 0 (UBInt8)
analog_channel_units_code: 0 (UBInt8)
externally_measured_analog_channel_level: 0.0 (BFloat)
check_byte: 71 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x82\x80\x00\x00\x00\x00\x43\x06\x00\x00\x00\x00\x00\x00\x47
# response
hf = HartFrame(67)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 67 (Command)
byte_count: 8 (UBInt8)
payload: Command67_TrimAnalogChannelZeroResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
analog_channel_number_code: 0 (UBInt8)
analog_channel_units_code: 0 (UBInt8)
actual_channel_level: 0.0 (BFloat)
check_byte: 77 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16
\x86\x80\x00\x00\x00\x00\x43\x08\x00\x00\x00\x00\x00\x00\x00\x00\x4d
Command 68¶
Command 68 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(68)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 68 (Command)
byte_count: 6 (UBInt8)
payload: Command68_TrimAnalogChannelGainRequest():
analog_channel_number_code: 0 (UBInt8)
analog_channel_units_code: 0 (UBInt8)
externally_measured_analog_channel_level: 0.0 (BFloat)
check_byte: 64 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14
\x82\x80\x00\x00\x00\x00\x44\x06\x00\x00\x00\x00\x00\x00\x40
# response
hf = HartFrame(68)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 68 (Command)
byte_count: 8 (UBInt8)
payload: Command68_TrimAnalogChannelGainResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
analog_channel_number_code: 0 (UBInt8)
analog_channel_units_code: 0 (UBInt8)
externally_measured_analog_channel_level: 0.0 (BFloat)
check_byte: 74 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16
\x86\x80\x00\x00\x00\x00\x44\x08\x00\x00\x00\x00\x00\x00\x00\x00\x4a
Command 69¶
Command 69 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(69)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 69 (Command)
byte_count: 2 (UBInt8)
payload: Command69_WriteAnalogChannelTransferFunctionRequest():
analog_channel_number_code: 0 (UBInt8)
analog_channel_transfer_function_code: 0 (UBInt8)
check_byte: 69 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x82\x80\x00\x00\x00\x00\x45\x02\x00\x00\x45
# response
hf = HartFrame(69)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 69 (Command)
byte_count: 4 (UBInt8)
payload: Command69_WriteAnalogChannelTransferFunctionResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
analog_channel_number_code: 0 (UBInt8)
analog_channel_transfer_function_code: 0 (UBInt8)
check_byte: 71 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x86\x80\x00\x00\x00\x00\x45\x04\x00\x00\x00\x00\x47
Command 70¶
Command 70 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(70)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 70 (Command)
byte_count: 1 (UBInt8)
payload: Command70_ReadAnalogChannelEndpointValuesRequest():
analog_channel_number_code: 0 (UBInt8)
check_byte: 69 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x46\x01\x00\x45
# response
hf = HartFrame(70)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 70 (Command)
byte_count: 20 (UBInt8)
payload: Command70_ReadAnalogChannelEndpointValuesResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
analog_channel_number_code: 0 (UBInt8)
analog_channel_upper_and_lower_range_value_units_code: 0 (UBInt8)
analog_channel_upper_endpoint_value: 0.0 (BFloat)
analog_channel_lower_endpoint_value: 0.0 (BFloat)
analog_channel_upper_limit_value: 0.0 (BFloat)
analog_channel_lower_limit_value: 0.0 (BFloat)
check_byte: 84 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28
\x86\x80\x00\x00\x00\x00\x46\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54
Command 71¶
Command 71 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(71)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 71 (Command)
byte_count: 1 (UBInt8)
payload: Command71_LockDeviceRequest():
lock_code: 0 (UBInt8)
check_byte: 68 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x47\x01\x00\x44
# response
hf = HartFrame(71)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 71 (Command)
byte_count: 3 (UBInt8)
payload: Command71_LockDeviceResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
lock_code: 0 (UBInt8)
check_byte: 66 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x47\x03\x00\x00\x00\x42
Command 72¶
Command 72 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(72)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 72 (Command)
byte_count: 1 (UBInt8)
payload: Command72_SquawkRequest():
squawk_control: 0 (UBInt8)
check_byte: 75 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x48\x01\x00\x4b
# response
hf = HartFrame(72)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 72 (Command)
byte_count: 3 (UBInt8)
payload: Command72_SquawkResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
squawk_control: 0 (UBInt8)
check_byte: 77 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x48\x03\x00\x00\x00\x4d
Command 73¶
Command 73 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(73)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 73 (Command)
byte_count: 0 (UBInt8)
payload: Command73_FindDeviceRequest():
check_byte: 75 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x49\x00\x4b
# response
hf = HartFrame(73)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 73 (Command)
byte_count: 14 (UBInt8)
payload: Command73_FindDeviceResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
data_object_id: 0 (UBInt8)
device_type: 0 (UBInt16)
minimum_preambles_request: 0 (UBInt8)
protocol_revision: 0 (UBInt8)
device_revision_level: 0 (UBInt8)
software_revision_level: 0 (UBInt8)
hardware_revision_level_and_physical_signaling_code: 0 (UBInt8)
flags: 0 (UBInt8)
device_id: BitStruct():
value: 0 (BitField(24))
check_byte: 65 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22
\x86\x80\x00\x00\x00\x00\x49\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41
Command 74¶
Command 74 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(74)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 74 (Command)
byte_count: 0 (UBInt8)
payload: Command74_ReadIOSystemCapabilitiesRequest():
check_byte: 72 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x4a\x00\x48
# response
hf = HartFrame(74)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 74 (Command)
byte_count: 10 (UBInt8)
payload: Command74_ReadIOSystemCapabilitiesResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
maximum_number_of_io_cards: 0 (UBInt8)
maximum_number_of_channels_per_card: 0 (UBInt8)
maximum_number_of_subdevices_per_channel: 0 (UBInt8)
number_of_devices: 0 (UBInt16)
maximum_number_of_delayed_responses: 0 (UBInt8)
master_mode: 0 (UBInt8)
retry_count: 0 (UBInt8)
check_byte: 70 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18
\x86\x80\x00\x00\x00\x00\x4a\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46
Command 75¶
Command 75 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(75)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 75 (Command)
byte_count: 3 (UBInt8)
payload: Command75_PollSubDeviceRequest():
io_card: 0 (UBInt8)
channel: 0 (UBInt8)
subdevice_polling_address: 0 (UBInt8)
check_byte: 74 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x82\x80\x00\x00\x00\x00\x4b\x03\x00\x00\x00\x4a
# response
hf = HartFrame(75)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 75 (Command)
byte_count: 14 (UBInt8)
payload: Command75_PollSubDeviceResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
data_object_id: 0 (UBInt8)
device_type: 0 (UBInt16)
minimum_preambles_request: 0 (UBInt8)
protocol_revision: 0 (UBInt8)
device_revision_level: 0 (UBInt8)
software_revision_level: 0 (UBInt8)
hardware_revision_level_and_physical_signaling_code: 0 (UBInt8)
flags: 0 (UBInt8)
device_id: BitStruct():
value: 0 (BitField(24))
check_byte: 67 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22
\x86\x80\x00\x00\x00\x00\x4b\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43
Command 76¶
Command 76 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(76)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 76 (Command)
byte_count: 0 (UBInt8)
payload: Command76_ReadLockDeviceStateRequest():
check_byte: 78 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8
\x82\x80\x00\x00\x00\x00\x4c\x00\x4e
# response
hf = HartFrame(76)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 76 (Command)
byte_count: 3 (UBInt8)
payload: Command76_ReadLockDeviceStateResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
lock_status: 0 (UBInt8)
check_byte: 73 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x4c\x03\x00\x00\x00\x49
Command 77¶
Command 77 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(77)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 77 (Command)
byte_count: 11 (UBInt8)
payload: Command77_SendCommandToSubDeviceRequest():
io_card: 0 (UBInt8)
channel: 0 (UBInt8)
transmit_preamble_count: 0 (UBInt8)
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Array():
[
@0: 0 (UBInt8)
@1: 0 (UBInt8)
@2: 0 (UBInt8)
@3: 0 (UBInt8)
@4: 0 (UBInt8)
]
command: 0 (UBInt8)
byte_count: 0 (UBInt8)
data: Array():
[
]
check_byte: 198 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19
\x82\x80\x00\x00\x00\x00\x4d\x0b\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\xc6
# response
hf = HartFrame(77)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 77 (Command)
byte_count: 12 (UBInt8)
payload: Command77_SendCommandToSubDeviceResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
io_card: 0 (UBInt8)
channel: 0 (UBInt8)
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Array():
[
@0: 0 (UBInt8)
@1: 0 (UBInt8)
@2: 0 (UBInt8)
@3: 0 (UBInt8)
@4: 0 (UBInt8)
]
command: 0 (UBInt8)
byte_count: 0 (UBInt8)
data: Array():
[
]
check_byte: 197 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20
\x86\x80\x00\x00\x00\x00\x4d\x0c\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\xc5
Command 78¶
Command 78 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(78)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 78 (Command)
byte_count: 1 (UBInt8)
payload: Command78_ReadAggregatedCommandsRequest():
requested_commands: 0 (UBInt8)
commands: Array():
[
]
check_byte: 77 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x4e\x01\x00\x4d
# response
hf = HartFrame(78)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 78 (Command)
byte_count: 4 (UBInt8)
payload: Command78_ReadAggregatedCommandsResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
extended_field_device_status: 0 (UBInt8)
requested_commands: 0 (UBInt8)
commands: Array():
[
]
check_byte: 76 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12
\x86\x80\x00\x00\x00\x00\x4e\x04\x00\x00\x00\x00\x4c
Command 79¶
Command 79 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(79)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 79 (Command)
byte_count: 8 (UBInt8)
payload: Command79_WriteDeviceVariableRequest():
device_variable_code: 0 (UBInt8)
write_device_variable_command_code: 0 (UBInt8)
units_code: 0 (UBInt8)
device_variable_value: 0.0 (BFloat)
device_variable_status: 0 (UBInt8)
check_byte: 69 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16
\x82\x80\x00\x00\x00\x00\x4f\x08\x00\x00\x00\x00\x00\x00\x00\x00\x45
# response
hf = HartFrame(79)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 79 (Command)
byte_count: 10 (UBInt8)
payload: Command79_WriteDeviceVariableResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_code: 0 (UBInt8)
write_device_variable_command_code: 0 (UBInt8)
units_code: 0 (UBInt8)
device_variable_value: 0.0 (BFloat)
device_variable_status: 0 (UBInt8)
check_byte: 67 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18
\x86\x80\x00\x00\x00\x00\x4f\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43
Command 80¶
Command 80 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(80)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 80 (Command)
byte_count: 1 (UBInt8)
payload: Command80_ReadDeviceVariableTrimPointsRequest():
device_variable_code: 0 (UBInt8)
check_byte: 83 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x50\x01\x00\x53
# response
hf = HartFrame(80)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 80 (Command)
byte_count: 12 (UBInt8)
payload: Command80_ReadDeviceVariableTrimPointsResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_code: 0 (UBInt8)
trim_points_units_code: 0 (UBInt8)
lower_trim_point: 0.0 (BFloat)
upper_trim_point: 0.0 (BFloat)
check_byte: 90 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20
\x86\x80\x00\x00\x00\x00\x50\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a
Command 81¶
Command 81 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(81)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 81 (Command)
byte_count: 1 (UBInt8)
payload: Command81_ReadDeviceVariableTrimGuidelinesRequest():
device_variable_guidelines: 0 (UBInt8)
check_byte: 82 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x51\x01\x00\x52
# response
hf = HartFrame(81)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 81 (Command)
byte_count: 25 (UBInt8)
payload: Command81_ReadDeviceVariableTrimGuidelinesResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_guidelines: 0 (UBInt8)
trim_points_supported: 0 (UBInt8)
trim_points_units_code: 0 (UBInt8)
minimum_lower_trim_point_value: 0.0 (BFloat)
maximum_lower_trim_point_value: 0.0 (BFloat)
minimum_upper_trim_point_value: 0.0 (BFloat)
maximum_upper_trim_point_value: 0.0 (BFloat)
minimum_differential: 0.0 (BFloat)
check_byte: 78 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33
\x86\x80\x00\x00\x00\x00\x51\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e
Command 82¶
Command 82 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(82)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 82 (Command)
byte_count: 7 (UBInt8)
payload: Command82_WriteDeviceVariableTrimPointRequest():
device_variable_code: 0 (UBInt8)
trim_point: 0 (UBInt8)
trim_point_units_code: 0 (UBInt8)
trim_point_value: 0.0 (BFloat)
check_byte: 87 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15
\x82\x80\x00\x00\x00\x00\x52\x07\x00\x00\x00\x00\x00\x00\x00\x57
# response
hf = HartFrame(82)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 82 (Command)
byte_count: 9 (UBInt8)
payload: Command82_WriteDeviceVariableTrimPointResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_code: 0 (UBInt8)
trim_point: 0 (UBInt8)
trim_point_units_code: 0 (UBInt8)
trim_point_value: 0.0 (BFloat)
check_byte: 93 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17
\x86\x80\x00\x00\x00\x00\x52\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d
Command 83¶
Command 83 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(83)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 83 (Command)
byte_count: 1 (UBInt8)
payload: Command83_ResetDeviceVariableTrimRequest():
device_variable_code: 0 (UBInt8)
check_byte: 80 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x53\x01\x00\x50
# response
hf = HartFrame(83)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 83 (Command)
byte_count: 3 (UBInt8)
payload: Command83_ResetDeviceVariableTrimResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
device_variable_code: 0 (UBInt8)
check_byte: 86 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x53\x03\x00\x00\x00\x56
Command 84¶
Command 84 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(84)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 84 (Command)
byte_count: 2 (UBInt8)
payload: Command84_ReadSubDeviceIdentitySummaryRequest():
subdevice_index: 0 (UBInt16)
check_byte: 84 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x82\x80\x00\x00\x00\x00\x54\x02\x00\x00\x54
# response
hf = HartFrame(84)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 84 (Command)
byte_count: 50 (UBInt8)
payload: Command84_ReadSubDeviceIdentitySummaryResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
subdevice_index: 0 (UBInt16)
io_card: 0 (UBInt8)
channel: 0 (UBInt8)
manufacturer_id: 0 (UBInt16)
expanded_device_type_code: 0 (UBInt16)
device_id: BitStruct():
value: 0 (BitField(24))
universal_command_revision_level: 0 (UBInt8)
long_tag: b''
device_revision: 0 (UBInt8)
device_profile: 0 (UBInt8)
private_label_distributor_code: 0 (UBInt16)
check_byte: 96 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48| 49| 50| 51| 52| 53| 54| 55| 56| 57| 58
\x86\x80\x00\x00\x00\x00\x54\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60
Command 85¶
Command 85 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(85)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 85 (Command)
byte_count: 2 (UBInt8)
payload: Command85_ReadIOChannelStatisticsRequest():
io_card: 0 (UBInt8)
channel: 0 (UBInt8)
check_byte: 85 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x82\x80\x00\x00\x00\x00\x55\x02\x00\x00\x55
# response
hf = HartFrame(85)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 85 (Command)
byte_count: 14 (UBInt8)
payload: Command85_ReadIOChannelStatisticsResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
io_card: 0 (UBInt8)
channel: 0 (UBInt8)
stx_count: 0 (UBInt16)
ack_count: 0 (UBInt16)
ostx_count: 0 (UBInt16)
oack_count: 0 (UBInt16)
back_count: 0 (UBInt16)
check_byte: 93 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22
\x86\x80\x00\x00\x00\x00\x55\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d
Command 86¶
Command 86 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(86)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 86 (Command)
byte_count: 2 (UBInt8)
payload: Command86_ReadSubDeviceStatisticsRequest():
subdevice_index: 0 (UBInt16)
check_byte: 86 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10
\x82\x80\x00\x00\x00\x00\x56\x02\x00\x00\x56
# response
hf = HartFrame(86)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 86 (Command)
byte_count: 10 (UBInt8)
payload: Command86_ReadSubDeviceStatisticsResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
subdevice_index: 0 (UBInt16)
stx_count: 0 (UBInt16)
ack_count: 0 (UBInt16)
back_count: 0 (UBInt16)
check_byte: 90 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18
\x86\x80\x00\x00\x00\x00\x56\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a
Command 87¶
Command 87 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(87)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 87 (Command)
byte_count: 1 (UBInt8)
payload: Command87_WriteIOSystemMasterModeRequest():
master_mode: 0 (UBInt8)
check_byte: 84 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x57\x01\x00\x54
# response
hf = HartFrame(87)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 87 (Command)
byte_count: 3 (UBInt8)
payload: Command87_WriteIOSystemMasterModeResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
master_mode: 0 (UBInt8)
check_byte: 82 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x57\x03\x00\x00\x00\x52
Command 88¶
Command 88 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(88)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 88 (Command)
byte_count: 1 (UBInt8)
payload: Command88_WriteIOSystemRetryCountRequest():
retry_count: 0 (UBInt8)
check_byte: 91 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
\x82\x80\x00\x00\x00\x00\x58\x01\x00\x5b
# response
hf = HartFrame(88)
hf.delimiter.frame_type.set("ack")
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'ack' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 88 (Command)
byte_count: 3 (UBInt8)
payload: Command88_WriteIOSystemRetryCountResponse():
response_code: 'success' (UBInt8)
field_device_status: (FieldDeviceStatus)
retry_count: 0 (UBInt8)
check_byte: 93 (CheckByte)
encoded = hf.encode()
print(oser.to_hex(encoded))
0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11
\x86\x80\x00\x00\x00\x00\x58\x03\x00\x00\x00\x5d
Command 89¶
Command 89 example:
from __future__ import \
absolute_import, division, print_function, unicode_literals
import oser
from htf.communication.hart import HartFrame
# request
hf = HartFrame(89)
print(hf)
HartFrame():
delimiter: Delimiter():
address_type: 'unique' (Flag)
number_of_expansion_bytes: 0 (BitField(2))
physical_layer_type: 'asynchronous' (BitField(2))
frame_type: 'stx' (BitField(3))
address: Address():
master_address: 'primary_master' (Flag)
burst_mode: False (Flag)
address: 0x0 (SlaveAddress(38))
expansion_bytes: Array():
[
]
command: 89 (Command)
byte_count: 10 (UBInt8)
payload: Command89_SetRealTimeClockRequest():
time_set_code: 0 (UBInt8)
date: datetime.date(1900, 1, 1)