M2D-Laser-Scanner with Ethernet-Interface
Manual
HB-M2D-Ethernet-E
Page 33 of 39
www.MElsensor.com
*scanner = y |0x80 ;
Scanner_data.scan [uiBufferUARTTx] = *scanner ;
If (y==17)
ucRegister17Temp = *scanner ;
uiBuffe+ ;
}
Scanner_data.scan[uiBufferUARTTx] = 0xFF
uiBuffe+ ;
*scanner = 126 |0x80 ;
*scanner = 123 |0x80 ;
Scanner_data.scan[uiBuffer 0] = *scanner;
*scanner = 124 |0x80 ;
Scanner_data.scan[uiBuffer 1] = *scanner;
*scanner = 125 |0x80 ;
Scanner_data.scan[uiBuffer 2] = *scanner & 0x07;
uiBuffer= 3 ;
Scanner_data.scan[uiBufferUARTTx] = 0xFF;
uiBuffe+ ;
*scanner = 31 | 0x80;
*scanner = 17 ; // Temperatur abfragen
For (y = 0; y < 31 ; y++)
{
*scanner = y |0x80 ;
Scanner_data.scan[y] = *scanner ;
uiBuffe+ ;
}
scanner_data.scan[uiBufferUARTTx] = 0xFF ;
uiBuffe+ ;
For (y = 32; y < 64 ; y++)
{
*scanner = y |0x80 ;
Wait_n(10, 20) ; // the length
//CPU and system load!
Scanner_data.scan[y] = *scanner ;
uiBuffe+ ;
}
Scanner_data.scan[uiBufferUARTTx] = 0xFF ;
uiBuffe+;
*scanner = ucRegister17Temp | 0x80;
*scanner = 0x18;
*scanner = 127 | 0x80;
…
1
Approximately 15 µsec of wait are necessary to make sure, that data is valid. This timing depends on the CPU.