background image

High-Performance Distance Sensor

13

7.3.  Settings and Queries via the RS-232 interface

The interface utilises a software handshake procedure (see protocol specification below). All sensor settings 
can be selected digitally with a PC, and all values generated by the sensor can be read out at a PC. 
The RS-232 interface connections RxD (connection 5, grey) and TxD (connection 4, yellow) correspond to mi-
nus (connection 3, green) and can be connected to the appropriate connections of the communication partner.

Software Tools:

Software for the interface of the CP08 is available. Download address: 

www.wenglor.com 

Interface configuration:

Baud rate: 38.400 baud, 8 data bits, no parity, 1 stop bit

Plug connectors of the wenglor

®

 Plug Adapter S232W3:

• 8-pin M12 plug connector for connecting the power supply and the outputs
• 8-pin M12 socket connector for direct sensor connection
• 9-pin M12 sub-miniature socket connector for direct connection to the RS-232 interface at the PC, or the 

utilised controller

1) Connect the sensor over the wenglor

®

 Plug Adapter S232W3 with PC, controller etc. 

Installing the wenglor

®

 Plug Adapter S232W3:

• Set the rotary selector switch 

Ý

 to 

RUN

• Disconnect the 8-conductor connector cable (S80-xx) from the sensor
• Connect the S232W3 plug adapter directly to the sensor
• Connect the 8-conductor connector cable (S80-xx) to the plug adapter 
• Connect the 9-pin sub-miniature socket connector to the serial interface at the PC 
• Switch the power supply on

Sensor

Power Supply 

Outputs

S232W3

PC, Controller

RS-232

Connecting the wenglor

®

 sensor 

to a PC or a controller

2) Procedure of the interface operation:

• Set the rotary selector switch 

Ý

 to 

RUN

• To enter or query the sensor settings use the interface commands according to the protocol. Every interface 

command and every answer of the sensor starts with “/” (ASCII 47) and ends with “.”. (ASCII 46) In case of 
an incorrect communication, the sensor emits a Negative Acknowledge character (ASCII 21). If a command 
is not closed with “.”, the sensor remains in wait state and does not give an answer or error message.

• Even with continuous query it should be adhered to a pause of 10 ms between two interface commands.
• Because of the protocol a maximum of 100 measurement values per second can be emitted. In the case 

of faster applications use the analog output.

Summary of Contents for CP08MHT80

Page 1: ...162H0180 CP35MHT80 OCP352H0180 High Performance Distance Sensor Operating Instructions EN Translation of the Original Operating Instruction Subject to change without notice Available as PDF version only Status 24 03 2021 www wenglor com ...

Page 2: ...ary Products see catalog 7 3 2 Connection Diagram 7 3 3 Housing Dimensions 7 3 4 Control Panel 8 4 Installation Instructions 8 5 Initial Operation 8 6 Function 8 7 Adjustment 9 7 1 Manual Adjustments 9 7 2 Special Settings 12 7 3 Settings and Queries via the RS 232 interface 13 8 Maintenance Instructions 19 9 Proper Disposal 19 10 EU Declaration of Conformity 19 ...

Page 3: ...Precautions This operating instruction is part of the product and must be kept during its entire service life Read this operating instruction carefully before using the product Installation start up and maintenance of this product has only to be carried out by trained personnel Tampering with or modifying the product is not permissible Protect the product against contamination during start up Not ...

Page 4: ...Safety Precautions 4 2 3 Approvals and IP Protection RoHS ...

Page 5: ...asuring rate 1500 s 1500 s 800 s Response Time 660 µs 660 µs 1250 µs Response Time Resolution Mode 1660 µs 1660 µs 2500 µs Temperature Drift 5 µm C 10 µm C 25 µm C Temperature Range 25 50 C 25 50 C 25 50 C Analog Output 0 10 V 0 10 V 0 10 V Current Output Load Resistance 1 mA 1 mA 1 mA Analog Output 4 20 mA 4 20 mA 4 20 mA Current Output Load Resistance 500 Ohm 500 Ohm 500 Ohm Voltagedrop PNP Erro...

Page 6: ...00 s 1000 s 500 s Response Time 1000 µs 1000 µs 2000 µs Response Time Resolution Mode 2000 µs 2000 µs 4000 µs Temperature Drift 5 µm C 10 µm C 25 µm C Temperature Range 25 50 C 25 50 C 25 50 C Analog Output 0 10 V 0 10 V 0 10 V Current Output Load Resistance 1 mA 1 mA 1 mA Analog Output 4 20 mA 4 20 mA 4 20 mA Current Output Load Resistance 500 Ohm 500 Ohm 500 Ohm Voltagedrop PNP Error Output 2 5 ...

Page 7: ...t AW02 Feldbus Gateways ZAGxxxN01 Interface Cable S232W3 Protection Housing Set ZSP NN 02 Protection Housing ZSV 0x 01 3 2 Connection Diagram Supply Voltage V Contamination Error output NO RxD La RS 232 Receive Line Emitted light disengageable TxD RS 232 Transmit Line O Analogue output O Ground for the analogue output Supply Voltage 0 V S Shielding 3 3 Housing Dimensions Transmitter Diode Receiver...

Page 8: ...s standards and safety precautions must be adhered to The sensor has to be protected against mechanical influences In case of very glossy surfaces the sensor has to be mounted slightly inclined and has to be mounted on a plane surface approx 5 to inhibit a direct reflection of the laser beam into the optics 5 Initial Operation Please control the proper connection of all conductors Impress a supply...

Page 9: ... working range or if an error has occurred e g an interrupted conductor at the current output The red F LED lights up to indicate that the error output has been activated RS 232 interface This sensor is equipped with an RS 232 interface for communication with a device such as PC or a controller Sensor functions can be activated and scanning results can be acquired via the RS 232 interface 7 Adjust...

Page 10: ...tly set to 0 10 V è If the yellow I LED lights up Analogue output presently set to 4 20 mA Briefly press the plus key è The Yellow U LED lights up Analogue output reconfigured to 0 10 V voltage output Set the rotary selector switch Ý to RUN Configuring the analogue output as a current output Set the rotary selector switch Ý to U I MODE è The red F LED lights up è If the yellow U LED lights up Anal...

Page 11: ...the rotary selector switch Ý to RUN B Setting the measuring range for a rising characteristic function Zoom function Set the rotary selector switch Ý to TEACH è red F LED lights up Place the object at the most distant point of the desired working range Briefly press the plus key è yellow I LED lights up Place the object at the nearest point of the desired working range Briefly press the minus key ...

Page 12: ...er filter levels are adjustable Optimize the exposure time The exposure time is adapted automatically by the sensor In the presetted DCM Default Capture Mode the Sensor has a fixed maximal possible Exposure Time It can be adjusted manually in addition in case of difficult applications By means of the LCM Long Capture Mode the Exposure Time of the sensor can be elongated for dark or highly glossy o...

Page 13: ...2W3 with PC controller etc Installing the wenglor Plug Adapter S232W3 Set the rotary selector switch Ý to RUN Disconnect the 8 conductor connector cable S80 xx from the sensor Connect the S232W3 plug adapter directly to the sensor Connect the 8 conductor connector cable S80 xx to the plug adapter Connect the 9 pin sub miniature socket connector to the serial interface at the PC Switch the power su...

Page 14: ...ame end Calculating the Checksum BCC Block Check Character The Checksum is generated from an EXOR frame operation Start Character Length Command Data Checksum Stop character 02 0D 00 59 2FH 30H 32H 30H 44H 30H 30H 35H 39H 2EH Data used to calculate the checksum Calculating Example Program Example 2FH 0010 1111 0 30H 0011 0000 XOR 0001 1111 2 32H 0011 0010 XOR 0010 1101 0 30H 0011 0000 XOR 0001 110...

Page 15: ...ent output 4 mA 20 mA 020Q014D 030MQ0101 Choose Resolution Speed Mode Function Send Frame to the Sensor Response Frame from the Sensor Operate sensor with high speed Speed Mode 020er13B 030Mer177 Operate sensor with high resolution Resolution Mode 020er238 030Mer274 Adjustment Measuring range Function Send Frame to the Sensor Response Frame from the Sensor Teach In zero point 0 V 4 mA 020T0049 030...

Page 16: ...pbxxxxxqq xxxxx initial point 1 100 mm Function Send Frame to the Sensor Response Frame from the Sensor Set measuring range end point 10 V 20 mA 060pexxxxxqq 070Mpexxxxxqq xxxxx end point 1 100 mm Special Settings Set filter function Function Send Frame to the Sensor Response Frame from the Sensor Set filter 030FSxxqq 030MFxxqq xx Number of measurement values for average calculation xx 00 no filte...

Page 17: ...ate enter the following commands corresponding your desired baud rate Function Send Frame to the Sensor Response Frame from the Sensor Baud rate to 9600 baud 030 BR201 030Ade2qq Baud rate to 19200 baud 030 BR300 030Ade3qq Baud rate to 38400 baud 030 BR407 030Ade4qq Baud rate to 57600 baud 030 BR506 030Ade5qq Baud rate to 115200 baud 030 BR605 030Ade6qq The new baud rate is activated after the supp...

Page 18: ...Saved position for 0 V resp 4 mA in µm Function Send Frame to the Sensor Response Frame from the Sensor Query taught in values for end point if Teach Mode measuring range 020We31C 090Wexxxxxxumqq xxxxxx Saved position for 10 V resp 20 mA in µm Function Send Frame to the Sensor Response Frame from the Sensor Query taught in values for zero point if Teach Mode zero point 020Wn317 090Wnxxxxxxumqq xxx...

Page 19: ...tion Send Frame to the Sensor Response Frame from the Sensor Emit object distance in binary form Output value in 1 100 mm 16 bit binary value e g J means 7 69 mm object distance 8 Maintenance Instructions This wenglor sensor is maintenance free It is advisable to clean the lens and the display and to check the plug connections at regular intervals Do not clean with solvents or cleansers which coul...

Reviews: