The LMS1xx protocol handler allows the communication to the SICK laserscanner LMS1xx to receiver the status and the distance measurements of these sensors.

Options

Schema

The output of the protocol handler provides the following attributes as a key-value object:

NameTypeDescription
TIMESTAMPLongThe time of measurement in UTC (Time provided by scanner unless "ignoretimestamp" is set
VERSIONStringThe version of the laser scanner
DEVICEStringThe device ID
SERIALStringThe factory serial number
STATUSIntegerThe status of the scanner
MESSAGECOUNTIntegerThe message counter starting at the first measured value message. When the upper limit is reached, the counter starts again at 0.
SCANCOUNTIntegerThe scan counter starting with the first scan after confirmation of the measured value message. When the upper limit is reached, the counter starts again at 0.
POWERUPDURATIONLongThe time since the scanner was switched on.
TRANSMISSIONDURATIONLongThe time since the transfer of the measured values
INPUTSTATUSBooleanThe state of the digital inputs
OUTPUTSTATUSBooleanThe state of the digital outputs
SCANNINGFREQUENCYLongThe scanning frequency
MEASUREMENTFREQUENCYLongThe frequency between two separate measurements
POSITIONMatrixThe position
POSITIONROTATIONTYPEIntegerThe position rotation type
DISTANCE8BIT

Matrix

The measured distance values (8bit)
REMISSION8BITVectorThe measured remission (8bit)
DISTANCE8BIT2

Matrix

The measured distance values (8bit)
REMISSION8BIT2VectorThe measured remission (8bit)
DISTANCE16BITMatrixThe measured distance values (16bit)
REMISSION16BITVectorThe measured remission (16bit)
DISTANCE16BIT2MatrixThe measured distance values (16bit)
REMISSION16BIT2VectorThe measured remission (16bit)
RAWDATAStringThe original raw data sent by the scanner (enabled by the "rawdata" option)

Example

To access the different attribute values the KeyValueToTuple operator can be used to transform the required attributes into a relational tuple.

PQL

input = ACCESS({source='lms1', 
                wrapper='GenericPush',
                transport='TCPClient',
                protocol='LMS1xx',
                dataHandler='KeyValueObject',
                options=[['host','192.168.1.20'],['port','2111']],
})

out = KEYVALUETOTUPLE({
          schema=[['DISTANCE16BIT', 'Matrix']],
          type='Scan',
          keepinput='false' 
        },
        input
      )