background image

 

 

Acuity AP820 Laser Scanners 
Rev. 3.3 

39 

 

Private Function 

EthernetScanner_WriteData(

ByVal 

pScanner 

As 

IntPtr, 

ByVal 

Buffer 

As Byte

(), 

ByVal 

Buffersize 

As UInteger

As Uinteger

 

Where: 

pScanner is the pointer returned by EthernetScanner_Connect 
Buffer contains the array of bytes to be sent to the laser 

Buffersize is the number of bytes to be sent (i.e. the size of Buffer) 
This function returns the number of bytes written on success, and –1 on failure. 

The  byte  array  contains  two  types  of  bytes;  Register  Address  bytes  and  Register  Data 
Values.  The  order  of the bytes in  the array  must  be Register Address first,  followed by 
any data value bytes which may be required for the particular register. 
A byte indicating which Register Address is to be written to must have a 0 in bit 7, and 
the Register Address in bits 6 to 0. 

A byte indicating what data value to write to the specific register must have a 1 in bit 7, 
and the data value in bits 6 to 0. 

 

11.8.1

 

Examples: Laser on, Triggering

 

In the following section, we demonstrate how to execute two laser commands (turning 
the laser on, and changing the triggering method), as well as how to change a setting 
(the Z measurement range).  Once these three examples are understood, coding of 
any other register related operation should be straight forward by analogy. 

For example, let’s consider commands to turn on and to turn off the laser 
programmatically.  We see in the Register of Functions that the laser on/off function is 
at Register Address 12, and that a data value of 0 in bit 0 of the register turns the 
laser off, and a data value of 1 in bit 0 turns the laser on. 
We need a 2-byte array perform these tasks, the first byte will be the Register 
Address and the second byte will be the Data Value for the Register (i.e. 0 for off or 1 
for on).  So we might write the following code to turn the laser off: 

 
 

Private Function 

TurnOffLaser() 

As UInteger

 

Dim 

Buffer(1) 

As Byte 

'Note, VB always adds 1 to the size 

Dim 

BytesWritten 

As UInteger

 

 

‘ The first byte will set the Register Address to 12 

Buffer(0) = &H0C 

'bit 7 is 0, bits 6 to 0 will add to 12.

 

‘ The second byte will set the data value for the register to 0 

Buffer(1) = &H80 

'bit 7 is 1, bit 0 is 0

 

return 

EthernetScanner_WriteData(pScanner, Buffer, 2) 

End Function

 

 

Likewise, to turn the laser back on we would set that register to 1 by putting &H81 in 
Buffer(1). 

 

 

For another example, we will switch the AP820 from continuous sampling into trigger 
mode, in which it will require a software trigger to sample.  This feature is controlled 
by Register Address 20, bit 3, in the Register of Functions.  A “0” in bit 3 puts the 
laser in continuous mode, and a “1”  in bit 3 puts it in trigger mode: 

Summary of Contents for Acuity AccuProfile 820 Series

Page 1: ...ev 3 3 AccuProfile 820 Laser Scanners User s Manual Manual p n LLL008201 Rev 3 4 For use with Acuity products March 15 2017 Acuity A product line of Schmitt Industries Inc 2765 NW Nicolai St Portland...

Page 2: ...of this Agreement You agree upon such termination to return the hardware and software together with all copies of associated documentation In the event of termination the obligation of confidentialit...

Page 3: ...wo conditions 1 This device may not cause harmful interference and 2 this device must accept any interference received including interference that may cause undesired operation Note This equipment has...

Page 4: ...ption 8 3 1 Principles of Operation 8 3 2 Mechanical Dimensions 8 3 3 Contents 12 3 4 Laser Safety 12 3 5 Sensor Maintenance 13 3 6 Sensor Service 13 3 7 Sensor Specifications 13 4 Installation and Ch...

Page 5: ...elegram address 106 to 125 24 7 15 Sensor Data 24 7 16 Version Firmware 24 8 Scanner control 26 8 1 Data format for Register addresses and Data 26 8 2 Register of functions 26 9 Description of the con...

Page 6: ...EthernetScanner_GetScanRawData 39 12 8 Writing Commands to the AP820 39 12 8 1 Examples Laser on Triggering 40 12 8 2 Example Limiting the Range Z 41 12 9 Description of RegisterAddresses accessible...

Page 7: ...eflected light from the surface is viewed from an angle by a two dimensional CCD detector array inside the AP820 sensor The 2D contour profile is calculated by the scanner s microprocessor from the pi...

Page 8: ...le measuring device Target The object of measurement The relative distances from the scanner to the target surface is measured by the sensor Laser Laser line This light visible laser line is emitted f...

Page 9: ...Acuity AP820 Laser Scanners Rev 3 3 7 Attach the Power Data cable s M12 A coded 8 pin female plug to the male...

Page 10: ...ddress of 192 168 1 245 Port 1096 Subnet Mask is 255 255 255 0 For sensors older than 4 2014 please use the IP address of 192 168 123 222 with Port 3000 It can be programmed to use another working IP...

Page 11: ...anner is a laser based device intended for non contact dimension measuring and checking of surface object profiles shapes target positions displacement dimensions sorting and sensing By measuring dist...

Page 12: ...Acuity AP820 Laser Scanners Rev 3 3 9 Figure 1 AP820 5 mechanical dimensions Figure 2 AP820 20 mechanical dimensions Figure 3 AP820 40 mechanical dimensions...

Page 13: ...Acuity AP820 Laser Scanners Rev 3 3 10 Figure 4 AP820 60 mechanical dimensions Figure 5 AP820 80 mechanical dimensions Figure 6 AP820 120 mechanical dimensions...

Page 14: ...Acuity AP820 Laser Scanners Rev 3 3 11 Figure 7 AP820 240 mechanical dimensions...

Page 15: ...line produced by a semiconductor laser diode The laser class of the scanner depends on the model specifications but may range from a Class 2 to a Class 3B laser device in accordance with EN60825 1 200...

Page 16: ...vent such as isopropyl alcohol or water Avoid using pressurized water and do not use abrasive wipes on the optical glass For heavy dust or dirt buildup on the lenses rinse the lenses before wiping cle...

Page 17: ...perpendicular to the target surface that it will be measuring Mount the sensor at the appropriate height above the target surface Consult the product data sheet to determine the sensor s standoff dist...

Page 18: ...uitry and may cause permanent damage 4 2 1 2 Drain Wire Clear The cable may have an un insulated wire drain that connects the stainless steel harness plug of the cable It should also be connected to g...

Page 19: ...ations Check To begin communication with the scanner you may use your own application software or the free demo software described in section 2 1 3 4 3 2 Verifying Operation With the scanner mounted a...

Page 20: ...eflectivity variation surface is it useful to activate the AGC function as described in the register of functions The values in this description that are represented in hexadecimal format will be repr...

Page 21: ...18 to 21 4 Default IP address 192 168 1 245 22 to 23 2 Default TCP Port 3000 24 to 25 2 26 to 31 6 Working MAC address xx xx xx from serial number 00 08 DC xx xx xx 32 to 35 4 36 to 39 4 Working Gate...

Page 22: ...s Description Meaning Factory setting 00 to 65 66 Status information 1 See Description Scanner data 66 1 Sensor temperature 67 1 Scanner Status Register 68 1 Version evaluation Reg1 69 1 70 to 74 5 Op...

Page 23: ...om the X and Z value as follow X X value 13 0 X max X Scan Range EMB Data resolution mm X max 4096 Z Z value 13 0 Z max Z Measurement Range EMB Data resolution mm Z max 4096 The values X max Z max X S...

Page 24: ...emental Signal A B 90 Phase shifted Input level Low 0 2 V High 5 30 V Register Bit No Meaning Position generator Reg 1 Byte 1525 6 to 0 Position generator Bit 6 to 0 Position generator Reg 2 Byte 1526...

Page 25: ...1 Byte 1563 Bit 0 Byte 1563 Bit 1 Register condition After reset If changed Byte 1563 Bit 2 Byte 1563 Bit 3 Laser on off Byte 1563 Bit 4 Measurement control Continuous mode Single measurement with Tri...

Page 26: ...ontrol was on during automatic operation mode To manually adjust this value aim the scanner to the surface to be scanned Continue by reading the value of the laser output control Now switch the laser...

Page 27: ...ding of the serial number Bit 27 to 0 results in a decimal number with 7 digits For example 1009003 Starting from the left the first two digits refer to the month on which the product was manufactured...

Page 28: ...ion 0 1 mm 1 0 mm 7 16 Version Firmware This is the version of the sensor s Ethernet firmware An ASCII String will be sent For example see below Register Bit No Meaning e g Version 06 0 2 Firmware Reg...

Page 29: ...register In cases of control registers in which the column Bit No is marked with it is sufficient to write the register address to perform the function Registers that are not included in the table in...

Page 30: ...Exposure control Mode 0 Automatic 1 Manual 0 22 1 23 to 27 5 28 1 Reset FIFO Erases all data in the internal FIFO 29 1 Software Trigger Function only when measurement control 1 30 1 Reset Sensor All...

Page 31: ...exposure time 1024 1 sec To identify from which position on the exposure was carried out it is required that a position encoder is plugged to the scanner The position will be saved at the end of an i...

Page 32: ...ther This way it is possible to measure the very same spot on a target with both scanners doubling the effective measuring rate Simultaneously Alternately Set up this function by connecting the Sync O...

Page 33: ...omatically until the scanner is updated via the website Additionally the access with the web browser allows the set up directly of the working IP address the Port and the Subnet mask 10 1 Changing the...

Page 34: ...d EthernetScanner dll These functions are EthernetScanner_Connect EthernetScanner_Disconnect EthernetScanner_GetConnectStatus EthernetScanner_GetScanRawData EthernetScanner_GetInfo EthernetScanner_Wri...

Page 35: ...ersion requires a null terminated string in the buffer passed to it by a pointer To accomplish this we will use the buffer of the StringBuilder type and the MarshalAs attribute in System Runtime Inter...

Page 36: ...string containing the TCP Port default value is 3000 Timeout is an unsigned integer containing the number of milliseconds to wait for a response If successful this function returns a pointer to an ob...

Page 37: ...shalAs UnmanagedType ByValTStr sizeconst 128 Public FirmwareVersion As String Public BeginningOfMeasuringRange As UInteger Public MeasuringRange As UInteger Public ScanRangeBeginning As UInteger Publi...

Page 38: ...20 by calling EthernetScanner_GetScanRawData The function is or the following form Private Function EthernetScanner_GetScanRawData ByVal pScanner As IntPtr ByVal Buffer As Byte ByVal BufferSize As UIn...

Page 39: ...pixel scans at the rate of approximately 200 Hz On the other hand if he she wishes to resolve the horizontal field of view into 580 parts and the measured target is assumed not to change during the ti...

Page 40: ...x 62 This image counter increments by one each time a new scan is obtained and resets to zero every 254 scans This counter can be used to identify odd numbered vs even numbered scans We would use the...

Page 41: ...I 5 3 And H7F 7 Intensity IArray I 2 1 CUInt Buffer 66 I 5 4 Next Else something went wrong Return False End If Else Return False End If Return Result End Function At this point both the X and Z arra...

Page 42: ...y other register related operation should be straight forward by analogy For example let s consider commands to turn on and to turn off the laser programmatically We see in the Register of Functions t...

Page 43: ...gs demonstrates how to limit the range Z of the AP820 Limiting the range Z of the laser may be very helpful in removing foreground or background objects from the measurement process in order to only a...

Page 44: ...ing is a table of settings commands and associated Register Addresses which can be accessed via the EthernetScanner_WriteData function Refer to section 9 for descriptions of the purpose of each of the...

Reviews: