15
OPERATION MANUAL
The first argument is the value of the command to check, the second the minimum and
the third the maximum value.
Return value True if check is o.k.
pb.check_range(30, 0, 32767)
send:
sends a pb command with a certain value
The first argument is the PB command to send, the second one the value.
pb.send(30, 5)
request:
Requests the value of a command. The function only sends a request to the remote.
As argument the command number must be given.
pb.request(30)
request_echo:
sends a request command and waits for the answer from the remote.
As argument the command number must be given.
pb.request_echo(30)
get_bit:
gets the value of a given bit position in a command value (sends request command and
extracts information).
The first argument is the command number, the second the bit position.
Return value is the value of the bit position
get_bit(10, 12)
set_bit:
sets a bit to 1 on a given bit position (and sends the command)
First argument is the command number, the second one is the bit position
Return value is the value of the bit position that has been set
set_bit(10, 12)
clear_bit:
clears a bit to 0 on a given bit position (and sends the command)
First argument is the command number, the second one is the bit position
Return value is the value of the bit position
clear_bit(10, 12)
more complete Example:
----------------------
from softcheck.logic import Com
from softcheck.logic import CommunicationTimeout
from softcheck.pb_commands import PbCom
com = Com("serial", 2.1, 3)
com.open(0, 9600) #open COM1 with 9600 (address not defined)
pb = PbCom(com)
print("check status bits ...")
status_tempering = pb.get_bit(10, 0)
status_circulation = pb.get_bit(10, 1)
print("check setpoint …")
min_setpoint = pb.request_echo(48)
setpoint = pb.request_echo(0)
pb.send(0, min_setpoint)
pb.check(0, min_setpoint)
print("check internal temp. ...")
pb.request(1)
pb.check_range(1, -27400, 32700)
com.close()
5.3 PpCom Object (PP Commands)
Namespace: from softcheck.pp_commands import PpCom
To construct a new PpCom class - which is used for communication with PP commands
with the device - the following arguments are needed:
Example: pp = PpCom(com)
Example2: pp = PpCom(com, 1)
The 1st parameter must be a configured Com object.
pySoftcheck.01.20171002.2
Liability for errors and misprints excluded.
pySoftcheck
Summary of Contents for Pilot ONE
Page 1: ...Operation Manual ...
Page 2: ......