logo资料库

LMS511 输出数据解析.pdf

第1页 / 共78页
第2页 / 共78页
第3页 / 共78页
第4页 / 共78页
第5页 / 共78页
第6页 / 共78页
第7页 / 共78页
第8页 / 共78页
资料共78页,剩余部分请下载后查看
1 Description
2 Communication format
2.1 Binary Telegram (only LMS1xx)
2.2 ASCII Telegram
2.3 Variable Types
2.4 Command Basics
2.5 Blanks
2.6 Login
3 Workflows
3.1 Parameterize the scan
3.2 Set Timestamp/Data Angle
4 Log in to device
5 Basic settings
5.1 Set frequency and angular resolution
5.2 Get frequency and angular resolution
5.3 Get the status of the LMS
6 Measurement output telegram
6.1 Configure the data content for the scan
6.2 Configure measurement angle of the scan data for output
6.2.1 Ask for actual output range
6.3 Polling one Telegram
6.4 Send data permanent
6.4.1 Example and Interpretation of one Telegram
7 Timestamp
7.1 Set timestamp
7.2 Ask timestamp and device status
8 Save parameters permanent
9 Set to run
10 Filter
10.1 Particle Filter
10.2 Mean Filter
10.3 Set n-Pulse to 1-Pulse Filter
10.4 Echo Filter
10.5 Fog Filter
11 Encoder
11.1 Increment source
11.2 Encoder Settings
11.3 Encoder resolution
11.4 Fixed speed
11.5 Ask speed threshold
11.6 Encoder speed
12 Outputs
12.1 Ask state of the outputs
12.2 Set output state
12.3 Change output 6/3 function
12.4 Change Input 4 function
12.5 Reset output counter
13 Other Commands
13.1 Device Ident
13.2 Device State
13.3 Device Name
13.3.1 Set Device Name
13.3.2 Ask Device Name
13.4 Operating hours
13.5 Power On Counter
13.6 IP-Address
13.7 Set factory defaults
13.8 Reboot Device
13.9 Contamination Measurement
13.9.1 Set Contamination values
13.9.2 Ask for contamination settings
13.10 Synchronization Phase
13.11 Function Front Panel
14 Standby Mode
15 Start Measurement
16 Stop Measurement
17 Sopas Error Codes
18 Problems
T E L E G R A M L I S T I N G Telegrams for Configuring and Operating the LMS1xx, LMS5xx, TiM3xx, JEF300, JEF500
Contents Description Telegram listing 1 DESCRIPTION ....................................................................................................... 4 2 COMMUNICATION FORMAT ................................................................................ 4 Binary Telegram (only LMS1xx) ................................................................................................. 4 ASCII Telegram .......................................................................................................................... 5 Variable Types ............................................................................................................................ 6 Command Basics ....................................................................................................................... 6 Blanks ......................................................................................................................................... 7 Login ........................................................................................................................................... 7 2.1 2.2 2.3 2.4 2.5 2.6 3 WORKFLOWS ........................................................................................................ 7 Parameterize the scan ................................................................................................................ 7 Set Timestamp/Data Angle ......................................................................................................... 7 3.1 3.2 4 LOG IN TO DEVICE ............................................................................................... 8 5 BASIC SETTINGS ................................................................................................ 10 Set frequency and angular resolution ....................................................................................... 10 Get frequency and angular resolution ...................................................................................... 13 Get the status of the LMS ......................................................................................................... 14 5.1 5.2 5.3 6.1 6.2 6 MEASUREMENT OUTPUT TELEGRAM ............................................................. 16 Configure the data content for the scan ................................................................................... 16 Configure measurement angle of the scan data for output ...................................................... 19 Ask for actual output range ............................................................................................... 20 Polling one Telegram ................................................................................................................ 22 Send data permanent ............................................................................................................... 23 Example and Interpretation of one Telegram ................................................................... 30 6.3 6.4 6.2.1 6.4.1 7 TIMESTAMP ......................................................................................................... 34 Set timestamp ........................................................................................................................... 34 Ask timestamp and device status ............................................................................................. 36 7.1 7.2 8 SAVE PARAMETERS PERMANENT ................................................................... 38 9 SET TO RUN ........................................................................................................ 39 10 FILTER ................................................................................................................. 40 10.1 Particle Filter ............................................................................................................................. 40 10.2 Mean Filter ................................................................................................................................ 41 10.3 Set n-Pulse to 1-Pulse Filter ..................................................................................................... 42 10.4 Echo Filter ................................................................................................................................. 43 10.5 Fog Filter ................................................................................................................................... 44 8014631/2012-05-08 © SICK AG · Germany · All rights reserved · Subject to change without notice 2 of 76
Description Telegram listing 11 ENCODER ............................................................................................................ 45 11.1 Increment source ...................................................................................................................... 45 11.2 Encoder Settings ...................................................................................................................... 46 11.3 Encoder resolution .................................................................................................................... 47 11.4 Fixed speed .............................................................................................................................. 48 11.5 Ask speed threshold ................................................................................................................. 49 11.6 Encoder speed ......................................................................................................................... 50 12 OUTPUTS ............................................................................................................. 51 12.1 Ask state of the outputs ............................................................................................................ 51 12.2 Set output state ........................................................................................................................ 53 12.3 Change output 6/3 function ...................................................................................................... 54 12.4 Change Input 4 function ........................................................................................................... 55 12.5 Reset output counter ................................................................................................................ 56 13.3.1 13.3.2 13 OTHER COMMANDS ........................................................................................... 57 13.1 Device Ident .............................................................................................................................. 57 13.2 Device State ............................................................................................................................. 58 13.3 Device Name ............................................................................................................................ 59 Set Device Name .............................................................................................................. 59 Ask Device Name ............................................................................................................. 61 13.4 Operating hours ........................................................................................................................ 62 13.5 Power On Counter .................................................................................................................... 63 13.6 IP-Address ................................................................................................................................ 64 13.7 Set factory defaults ................................................................................................................... 65 13.8 Reboot Device .......................................................................................................................... 66 13.9 Contamination Measurement ................................................................................................... 67 Set Contamination values ................................................................................................. 67 Ask for contamination settings .......................................................................................... 68 13.10 Synchronization Phase ............................................................................................................. 69 13.11 Function Front Panel ................................................................................................................ 70 13.9.1 13.9.2 14 STANDBY MODE ................................................................................................. 72 15 START MEASUREMENT ..................................................................................... 73 16 STOP MEASUREMENT ....................................................................................... 74 17 SOPAS ERROR CODES ...................................................................................... 75 18 PROBLEMS .......................................................................................................... 76 8014631/2012-05-08 © SICK AG · Germany · All rights reserved · Subject to change without notice 3 of 76
1 Description Description Telegram listing That document shows how to send telegrams via terminal program in ASCII (also in Hex) or Binary to the LMS1xx. It includes the descriptions for the commands how they work and some examples commands in ASCII, HEX and Binary for sending a telegram. Also the answers to expect from the LMS after sending a command are shown. The sensor always answers in the language he was talked to. Two workflows for getting a data scan out of the device and setting the timestamp can be found here. This document is for LMS1xx as well as for LMS5xx and all parameters of the commands are listed but it is not a description of the differences of a LMS5xx LITE or PRO. Also it is valid for the TiM and the JEF, please find the information which telegram is valid for which device directly in the header of each telegram. That Guide doesn’t show the differences of all the parameters and options between the devices completely. ATTENTION: Some commands may change during SICK development process. Please use always the least version of the developer´s guide. 2 Communication format 2.1 Binary Telegram (only LMS1xx) The binary protocol is the basic protocol of the scanner. It has always a fix length and the content and byte length of the string fit to that document. The binary protocol has a special framing so that the scanner is able to recognize it as the start of a binary telegram. The string has to start with 4 STX symbols (for example: 02 02 02 02), that is followed by the length of the telegram in HEX (for example: 00 00 00 17). Example: Binary 02 02 02 02 00 00 00 17 73 4D 4E 20 53 65 74 41 63 63 65 73 73 4D 6F 64 65 20 03 F4 72 47 44 B3 Header: 02 02 02 02; Length: 00 00 00 17; Checksum: B3 The length could be created by counting every single letter (Hex value) of the command (without checksum and framing but with blanks) and convert the value into HEX. 8014631/2012-05-08 © SICK AG · Germany · All rights reserved · Subject to change without notice 4 of 76
Communication format Telegram listing After the length the command itself starts. All letters of the command converted to HEX and that the parameters (mostly numbers) written directly behind the command in pairs of two. All parameters of the command have to be in hex (for example: scan frequency 25Hz is 00009C4h (It is a 4 byte value). Checksum is calculated with XOR. Between the command and the parameters, there has to be a blank, but not between the parameters itself. Example string: sMN SetAccessMode 04 81BE23AA Binary string: 02 02 02 02 00 00 00 17 73 4D 4E 20 53 65 74 41 63 63 65 73 73 4D 6F 64 65 20 04 81 BE 23 AA 87 In the scan data telegram from the scanner, the range values could be used as they are, they don’t have to be converted. Every value is 2 byte long. The binary protocol could only be used at the host port of the scanner, and at the moment only with the LMS1xx. 2.2 ASCII Telegram The ASCII telegram is an additional format and because of the ASCII signs it´s a little better to understand. The framing of the telegram is a STX at the start and an ETX at the end of each telegram. The command is written in ASCII letters, followed by the parameters like defined in that document. Parameters could be transferred in hex or decimal format, but in decimal format they need a sign (for example: scan frequency 25Hz: 09C4h/+2500d) Attention: leading zeros of each parameter and value were deleted, so the byte length of a parameter may not fit to what is standing in that document. That also causes different string length in the scan data telegram. For using with PLC’s the binary protocol is recommended. 8014631/2012-05-08 © SICK AG · Germany · All rights reserved · Subject to change without notice 5 of 76
Communication format Telegram listing 2.3 Variable Types Variable type Bool_1 Length (byte) 1 Uint_8 Int_8 Uint_16 Int_16 Uint_32 Int_32 Enum_8 Enum_16 Float_32 String 1 1 2 2 4 4 1 2 4 Context-dependent Data length is given always in Bytes! 2.4 Command Basics Value range 0 or 1 0...255 -128...+127 0...65.535 -32.768...+32.767 0...4.294.967.295 2.147.483.648...+2.147. 483.647 -10-44.85...+1038.53 Strings are not terminated in zeroes Sign No No Yes No Yes No Yes No No Yes Description Start of text Value ASCII Value Hex 02 Value Binary 02 02 02 02 + given length Calculated checksum sRN sWN sMN sEN {SPC} End of text Read by name Write by name Method Event Space If there are values coming in two parts (for example the outputs in the measurement telegram documented as: 00 07, output will be 07 00; LSB first, than MSB) 73 52 4E 73 57 4E 73 4D 4E 73 45 4E 20 03 20 8014631/2012-05-08 © SICK AG · Germany · All rights reserved · Subject to change without notice 6 of 76
2.5 Blanks The position of the blanks in a string is different in ASCII and Binary format, so they are not listed in the tables, but they can be found in the example strings. Workflows Telegram listing 2.6 Login You must be logged in before you are allowed to send any parameterization commands. Request for a data telegram can be done without login. 3 Workflows Parameterize the scan 3.1 1. Log in: 2. Set Frequency and Resolution: 3. Configure scan data content: 4. Configure scan data output: 5. Store Parameters: 6. Log out: 7. Request Scan: sMN SetAccessMode sMN mLMPsetscancfg sWN LMDscandatacfg sWN LMPoutputRange sMN mEEwriteall sMN Run sRN LMDscandata / sEN LMDscandata Get the exact description of that commands down in that document. 3.2 Set Timestamp/Data Angle 1. Log in: 2. Sopas command 3. Log out: sMN SetAccessMode sMN LSPsetdatetime sMN Run 8014631/2012-05-08 © SICK AG · Germany · All rights reserved · Subject to change without notice 7 of 76
4 Log in to device Log in to device Telegram listing PC LMS 1xx/5xx Telegram structure: sMN SetAccessMode Description Telegram Command Type Sopas by name Command User level Variable String String Length 3 13 Values ASCII sMN SetAccessMode Values Binary 73 4D 4E 53 65 74 41 63 63 65 73 73 4D 6F 64 65 User level select user level Int_8 Password: main Password: client Password: service level “Hash” - value for the User level “Maintenance” “Hash” - value for the User level “Authorized Client” “Hash” - value for the User level “Service” Uint_32 Uint_32 Uint_32 1 4 4 4 02 maintenance 03 authorized client 04 Service 02 maintenance 03 authorized client 04 Service B21ACE26 B2 1A CE 26 F4724744 F4 72 47 44 81BE23AA 81 BE 23 AA Example: sMN SetAccessMode 03 F4724744 ASCII sMN{SPC}SetAccessMode{SPC}03{SPC}F4724744 HEX 02 73 4D 4E 20 53 65 74 41 63 63 65 73 73 4D 6F 64 65 20 30 33 20 46 34 37 32 34 37 34 34 03 Binary 02 02 02 02 00 00 00 17 73 4D 4E 20 53 65 74 41 63 63 65 73 73 4D 6F 64 65 20 03 F4 72 47 44 B3 LMS 1xx/5xx PC Description Telegram Command Type Sopas by name Command User level Telegram structure: sAN SetAccessMode Variable String String Length 3 13 Values ASCII sAN SetAccessMode Change user level changed level Bool_1 1 0 Error 1 Success Values Binary 73 41 4E 53 65 74 41 63 63 65 73 73 4D 6F 64 65 00 Error 01 Success 8014631/2012-05-08 © SICK AG · Germany · All rights reserved · Subject to change without notice 8 of 76
分享到:
收藏