Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sample_changer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bliss
Tango Servers
sample_changer
Commits
0d2617e5
Commit
0d2617e5
authored
2 months ago
by
Generic Bliss account for Control Software
Browse files
Options
Downloads
Patches
Plain Diff
add qr code functionality
parent
4bbf58bf
Branches
add_qr_code
No related tags found
No related merge requests found
Pipeline
#216759
passed
2 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/samplechanger/sample_changer_ds/TomoSampleChanger.py
+42
-1
42 additions, 1 deletion
src/samplechanger/sample_changer_ds/TomoSampleChanger.py
with
42 additions
and
1 deletion
src/samplechanger/sample_changer_ds/TomoSampleChanger.py
+
42
−
1
View file @
0d2617e5
...
...
@@ -413,6 +413,8 @@ class TomoSampleChanger(Device):
self
.
attr_ParkingPosition_read
=
False
self
.
attr_SafetyChainOK_read
=
False
self
.
attr_RobotSpeed_read
=
"
None
"
self
.
attr_QRCode_read
=
False
self
.
attr_QRCodeValue_read
=
"
None
"
# init flags for state and status
self
.
init_done
=
False
self
.
init_error
=
None
...
...
@@ -475,7 +477,8 @@ class TomoSampleChanger(Device):
robot
.
cs8LibraryName
=
'
id19tomo
'
elif
self
.
robot_controller
==
"
bm05
"
:
from
StaubPy.bm05Controller2
import
BM05Controller2
robot
=
BM05Controller2
(
controllerAssociated
=
self
.
robot_host
,
logOnController
=
False
)
#robot = BM05Controller2(controllerAssociated=self.robot_host, logOnController=False)
robot
=
BM05Controller2
(
controllerAssociated
=
self
.
robot_host
,
logOnController
=
False
,
qrcodeReaderIP
=
"
172.29.132.125
"
,
qrcodeScanEachLoading
=
True
)
robot
.
cs8LibraryName
=
'
bm05tomo
'
elif
self
.
robot_controller
==
"
sim
"
:
import
mock
...
...
@@ -602,6 +605,44 @@ class TomoSampleChanger(Device):
# PROTECTED REGION ID(TomoSampleChanger.set_speed) ENABLED START #
self
.
robot
.
accelForLargeMovesMultiplicator
=
speed
# PROTECTED REGION END # // TomoSampleChanger.set_speed
scan_qr_code
=
attribute
(
label
=
"
Scan QR Code
"
,
dtype
=
bool
,
fget
=
"
get_scan_qr_code
"
,
fset
=
"
set_scan_qr_code
"
,
doc
=
"
sample changer qr code reader
"
)
def
get_scan_qr_code
(
self
):
# PROTECTED REGION ID(TomoSampleChanger.get_scan_qr_code) ENABLED START #
if
self
.
is_moving
==
False
:
self
.
attr_QRCode_read
=
self
.
robot
.
qrcodeScanEachLoading
return
self
.
attr_QRCode_read
# PROTECTED REGION END # // TomoSampleChanger.get_scan_qr_code
def
set_scan_qr_code
(
self
,
scan_qr_code
):
# PROTECTED REGION ID(TomoSampleChanger.set_scan_qr_code) ENABLED START #
self
.
robot
.
qrcodeScanEachLoading
=
scan_qr_code
# PROTECTED REGION END # // TomoSampleChanger.set_scan_qr_code
qr_code
=
attribute
(
label
=
"
QR Code
"
,
dtype
=
bool
,
fget
=
"
get_qr_code
"
,
doc
=
"
sample changer qr code value
"
)
def
get_qr_code
(
self
):
# PROTECTED REGION ID(TomoSampleChanger.get_scan_qr_code) ENABLED START #
if
self
.
robot
.
qrcodeScanEachLoading
:
if
self
.
is_moving
==
False
:
if
self
.
robot
.
lastqrCodeReaded
!=
"
QRCODE_NOT_READABLE
"
:
self
.
attr_QRCodeValue_read
=
self
.
robot
.
lastqrCodeReaded
elif
self
.
robot
.
lastqrCodeReaded2
!=
"
QRCODE_NOT_READABLE
"
:
self
.
attr_QRCodeValue_read
=
self
.
robot
.
lastqrCodeReaded2
elif
self
.
robot
.
lastqrCodeReaded3
!=
"
QRCODE_NOT_READABLE
"
:
self
.
attr_QRCodeValue_read
=
self
.
robot
.
lastqrCodeReaded3
return
self
.
attr_QRCodeValue_read
# PROTECTED REGION END # // TomoSampleChanger.get_scan_qr_code
# --------
# Commands
# --------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment