Camera in station loading pre-processing
Abstract
To enable stations reading the MHU QR code from workitems (see #76), the camara installed at station's loading port has to be interated into loading pre-processing.
Specification
This requirement affects
-
runstn.py
in allapp.txt.<station>
specific packages. -
hw_<station>_cell.py
in allapp.txt.<station>.pkg
specific hardware abstraktion modules. - `resources.txt' in packaging
- configuration management
Changes in hardware abstraction
Module: hw__cell.py
- Import
QRCodeCamaraReader
fromflecsimo.plc.generic.camera
library. - Change method 'read_id' according to implementation in 'hw_identification_cell'
Moreover, add the foloowing lines to __init__()
:
self.cell_camera = QRCodeCameraReader(cam_id=0)
self.last_read_id = None
Changes in Packaging
File: resources.txt' Add or uncomment:
flecsimo/plc/generic/camera.py`
Changes in station control
Module: runstn.py
The self.plc.wait_for_component_at_inlet()
will return an empty string if a QR-Code is not readable. This is not consistent with the current bypass solution wich returns 0
if no cmara is active - this has to be analyzed
Configuration
A new mhu_reader
setting has to be added to station configration. Values: camera
or keypad