The sensors are intended for non-contact measuring and checking of position, displacement,
dimensions, surface profile, deformation, vibrations, sorting and sensing of technological objects as
well as for measuring levels of liquid and bulk materials.
The series includes 24 sensors with the measurement range, from 2 to 1000 mm and the base
distance from 10 to 245 mm. Custom-ordered configurations are possible with parameters different
from those shown below.
2. BASIC TECHNICAL DATA AND PERFORMANCE CHARACTERISTICS
RS232 (460,8 kbit/s max) or RS485 (921,6 kbit/s max) or RS232 and CAN V2.0B
60
65
80
0.03 of the range 0,05
2 or 5 or 8 kHz
(1 Mbit/s) or CANopen and RS232
4…20 mА (≤500 Ω load) or 0…10 V
2,4-5 V (CMOS, TTL)
5 (4,5…9) or 12 (9…18) or 24 (18…36)
NPN: 100 mA max; 40 V max
-10…+60, (-30…+60 for the sensor with built-in heater),
(-30…+120 for the sensors with cooling housing)
45, 65
95
1,5…2
IP67
100
105
60, 90
140
80 125 145 245
Note #1: RF603-R-39/4 sensor is designed to use with mirror surfaces and glass
Note #2: All specifications for the rest sensors apply for a diffusely reflecting white paper
CE compliance.
The sensors are designed for use in industry and are in compliance with the following standards:
- EN55022:2006 Information technology equipment. Radio disturbance characteristics. Limits
and methods of measurement:
- EN61000-6-2:2005 Electromagnetic compatibility (EMC). Generic standards. Immunity for in-
dustrial environments
- EN61326-1:2006 Electrical equipment for measurement, control and laboratory use. EMC re-
quirements. General requirements
The sensors fulfil the specification of the EMC requirements, if the instructions in the manual are
followed.
F maximum sampling rate , kHz (2 or 5 or 8)
X base distance (beginning of the range) in mm
L operating range in mm
SERIAL type of the serial interface (RS232 or RS485 or RS232&CAN or CANOPEN&RS232)
ANALOG attribute showing the presence of Current Loop (I) or U output
IN trigger input (input of synchronization)
AL This signal is of triple purpose. It can be used as:
1) logical output; ("0" – object is beyond the range (beyond the selected window
in the range), "1" – object is within the range (within the selected window in the
range))
2) line of mutual synchronization for two and more sensors
3) line of hardware zero setting
VV supply voltage
CC Cable gland – CG or socket + cable - CC (Binder 702, IP67, )
M Cable length in m
H Sensor with built-in heater
P Sensor with protect air cooling housing (See annex # 1)
For example: RF603.5-80/25-232-I-12-CC-3 – 5 kHz max frequency, base distance – 80 mm, range – 25 mm, serial
port - RS232, 4…20 mA output available, supply voltage 12V (9…18V), socket + cable, 3 m.
4. STRUCTURE AND OPERATING PRICIPLE
Operation of the sensors is based on the principle of optical triangulation (Figure 1.)
Radiation of a semiconductor laser 1 is focused by a lens 2 onto an object 6. Radiation reflected by
the object is collected by a lens 3 onto a linear CMOS array 4. A signal processor 5 calculates the
distance to the object from the position of the light spot on the array 4.
BASE DISTANCEWORKING RANGE
Figure 1.
5. OVERALL AND MOUNTING DIMENSIONS
5.1. Overall and mounting dimensions of the 10/2 sensor are shown in Figure 2 and the others –
in Figure 3. Sensor package is made of anodized aluminum. The front panel of the package has two
windows: one is output, the other for receiving radiation reflected from the object under control.
The package also contains mounting holes.
5.2. The sensor is positioned so that of object under control should place in this working range.
Where objects to be controlled have intricate shapes and textures, the incidence of mirror component of the reflected radiation to the receiving window should be minimized. In addition, no foreign
objects should be allowed to stay on the path of the incident and reflected laser radiation.
5.3. RF603-R-39/4 sensor is designed to use with mirror surfaces and glass. Requirements for its
mounting are shown in Figure 4a. The special mounting device is included into the shipping (Fig
4b).
8.1. Measurement data from sensors can be obtained through serial interface and/or on the ana-
log output. Through the serial interface measurement data can be obtained by both single requests
(inquiries) and by automatic data streaming (see Section 9, ‘Description of serial interface’). When
RS485 or CAN interfaces are used, several sensors can be connected to the data collection device
through ‘common bus’ circuit (network operation mode).
8.2. The nature of operation of the sensor governs its configuration parameters (operation
modes), which can be changed by transmission of commands through serial port. The basic parameters are as follows:
Sampling period — specifies the time interval (internal synchronization) or divider ratio of the
trigger synchronization input for automatically refreshment of measurement results by the sensor.
The value of the time interval is set in increments of0.01 ms. If serial interface is used to receive
the result and the time intervals set are small, the time required for data transmission at the selected
data transfer rate should be taken into account. If the transfer time exceeds the sampling period, it
wills this parameter, which will determine the data transfer rate.
Sampling mode — specifies the type of sampling
- Time Sampling or
- Trigger Sampling
With sampling by time selected, the sensor automatically transmits the measurement result via
serial interface in accordance with selected time interval (sampling period).
With sampling by external input is selected, the sensor transmits the measurement result when
external synchronization input is switched and taking the division factor set into account.
Range of the analog output (beginning and end of the range of analog output). While working
with the analog output, resolution can be increased by using the ‘Window in the operating range’
function which makes it possible to select a window of required size and position in the operating
range of the sensor within which the whole range of analog output signal will be scaled.
If the beginning of the range of the analog signal is set at a higher value than the end value of the
range, this will change the direction of rise of the analog signal.
Analog output operation mode. When using ‘window in the operating range’ function, this
mode defines the analog output operation mode.
Analog output can be
- in the window mode or
- in the full mode.
‘Window mode’. The entire range of the analog output is scaled within the selected window. Out-
side the window, the analog output is "0".
"Full mode". The entire range of the analog output is scaled within the selected window (operating
range). Outside the selected window, the whole range of the analog output is automatically scaled
onto the whole operating range of the sensor (sensitivity range).
Logical output mode and mutual synchronization mode.Logical output can be used for
- indication of run-out beyond the range ("0" – object is beyond the range (beyond the selected
window in the range), "1" – object is within the range (within the selected window in the
range)
- mutual synchronization of two or more sensors.
Selection of the mutual synchronization mode makes it possible to synchronize measurement
times of two and more sensors. This mode is convenient to use for control of one object with several sensors, for example, when thickness is to be measured. On hardware level, sensor synchronization is carried out by combining AL lines.
Time of lock of the result. If the sensor does not find out object or if the authentic result cannot
be received, zero value is transferred. The given parameter sets time during which is transferred the
last authentic result instead of zero value
Number of averaged values specifies the number of source results to be averaged for deriving
the output value. Source data are stored in a circular buffer, and new mean value is calculated each
time the new result arrives; therefore, the output may regarded as a moving average.
The refreshment of the result through the analog output is also controlled by the two parameters
described above.
Time limit for integration. Intensity of the reflected radiation depends on the surface quality of
objects under control. Therefore, the time of integration of radiation incident onto the CMOS-array
is automatically adjusted to achieve maximum measurement accuracy. This parameter specifies
maximum allowable time of integration. If the radiation intensity received by the sensor is so small
that no reasonable result is obtained within the time of integration equal to the limiting value, the
sensor transmits a zero value. Increasing of this parameter expands the possibility of control of lowreflecting (diffuse component) surfaces; at the same time this leads to reduction of data refreshment
rate and increases the effects of exterior light(background) on the measurement accuracy. Factory
setting of the limiting time of integration is 3200 us.
Level of laser output power. By changing this parameter it is possible to switch the sensor to
operation with minimum limiting time of integration (maximum operation speed) for particular surfaces.
The point of zero - sets a zero point of absolute system of coordinates in any point within the
limits of a working range. You can set this point by corresponding command and by connecting AL
input to the ground line (regime #3 of the line).
The reserved parameters are used for the sensors setting. Change of these parameters can
lead to infringement of sensor calibration. Correct change of parameters is made with the help of
the installation program supplied with the sensor.
9. DESCRIPTION OF SERIAL INTERFACE (RS232 or RS485)
9.1. The hardware port RS232 allows sensor to be connected directly to a computer.
9.2. In accordance with the protocol accepted and hardware capability, the RS485 port makes it
possible to connect up to 127 sensors to one data collection unit by a common bus circuit.
9.3. Network data communications protocol assumes the presence of ‘master’ in the net, which
can be a computer or other information-gathering device, and from 1 to 127 ‘slaves’ (RF603 Series
sensors) which support the protocol. Each ‘slave’ is assigned a unique network identification code –
a device address. The address is used to form requests or inquiries all over the net. Each slave receive inquiries containing its unique address as well as ‘0’ address which is broadcast-oriented and
can be used for formation of generic commands, for example, for simultaneous latching of values of
all sensors and for working with only one sensor (with both RS232 port and RS485 port).
9.4. Serial data transmission format:
1-start bit,8-data bits,1-odd bit,1-stop bit.
Odd bit is complementary to 8-data bits for oddness.
9.5. The communications protocol is formed by communication sessions, which are only initi-
ated by the ‘master’. There are two kinds of sessions:
1) ‘inquiry’,[‘message’] — [‘answer’], square brackets include optional elements
2) ‘inquiry’ — 'data stream’ — [‘inquiry’].
‘Inquiry’ (INC) is a two-byte message, which fully controls communication session. The ‘inquiry’
message is the only one of all messages in a session where most significant bit is set at 0; therefore,
it serves to synchronize the beginning of the session. In addition, it contains the device address
(ADR), code of inquiry (COD) and, optional, the message (MSG).
The ‘inquiry’ format: INC0(7:0),INC1(7:0) = 0,ADR(6:0),1,0,0,0,COD(3:0), [MSG].
‘Message’ and ‘answer’ are data bursts that can be transmitted by ‘master’ or by ‘slave’ in the
course of the session, respectively. ‘Data stream’ is an infinite sequence of data bursts or batches
transmitted from ‘slave’ to ‘master’, which can be interrupted by a new inquiry. In transmission of
‘data stream’ one of the ‘slaves’ fully holds data transfer channel, therefore, when ‘master’ produces any new inquiry sent to any address, data streaming process is stopped. Also, there is a special inquiry to stop data streaming.
9.6. Message transfer.
All messages with a message burst contain 1 in the most significant digit. Data in a message are
transferred in tetrads. When byte is transmitted, lower tetrad goes first, and then follows higher tetrad. When multi-byte values are transferred, the transmission begins with lower byte. The following is the format of two ‘message’ data bursts for transmission of byte DAT(7:0):
9.7. Answer transfer (for the 01h…04h enquiry codes).
All messages with a message burst contain 1 in the most significant digit. Data in a message are
transferred in tetrads. When byte is transmitted, lower tetrad goes first, and then follows higher tetrad. When multi-byte values are transferred, the transmission begins with lower byte.
When ‘answer’ is transmitted, the message contains three additional bits of cyclic binary batch
counter (CNT). Bit values in the batch counter are identical for all sendings of one batch. The value
of batch counter is incremented by the sending of each burst and is used for formation (assembly) of
batches or bursts as well as for control of batch losses in receiving data streams. The following is
the format of two ‘answer’ data bursts for transmission of byte DAT(7:0):
9.8. Result transfer. An answer is formed as in 9.7.
9.9. Types of inquiries.
Inquiry
code
01h Device identification — –device type (1)
02h Reading of parameter - code of parameter (1) - value of parameter (1)
03h Writing of parameter - code of parameter (1)
04h Storing current parameters to
FLASH-memory
04h Recovery of parameter default
values in FLASH-memory
05h Latching of current result — —
06h Inquiring of result — - result (2)
07h Inquiring of a stream of results — - stream of results (2)
08h Stop data streaming — —
Description Message
(size in bytes)
–modification (1)
–serial number (2)
–base distance (2)
–range (2)
00h Sensor ON 1 — laser is ON, measurements are taken (default state);
01h Analog output ON 1/0 — analog output is ON/OFF; if a sensor has no analog output, this bit
02h Sampling and synchronization con-
trol
03h Network address 1…127 (default — 1)
04h Rate of data transfer through serial
port
05h Laser intensity level 0…31
06h Number of averaged values 1…128, (default — 1)
07h
08h Lower byte of the sampling period
09h Higher byte of the sampling period
0Ah Lower byte of maximum integration
time
0Bh Higher byte of maximum integration
time
0Ch Lower byte for the beginning of
analog output range
0Dh Higher byte for the beginning of
analog output range
0Eh Lower byte for the end of analog
output range
0Fh Higher byte for the end of analog
output range
10h Time lock of result 0…255, specifies of time interval in increments of 5 mс
11…16h
17h Lower zero point
18h Higher byte zero point
19…1Ch
20h
22h
23h
24h
Data transfer rate via CAN interface 10…200, (by default — 200) specifies data transmission rate in incre-
Low byte of standard identifier
High byte of standard identifier
0th byte of extended identifier 0…1FFFFFFFh, (by default — 1FFFFFFFh) specifies extended CAN
Name Values
0 — laser is OFF, sensor in power save mode
will remain in 0 despite all attempts of writing 1 into it.
x,x,x,C,M1,M0,R,S – control byte which determines CAN interface re-
gime, bit C, logical output regime, bit M, analog output regime, bit R,
and sampling regime, bit S;
bites x – do not use;
bit C:
0 – request mode of CAN interface (by default);
1 – synchronization mode of CAN interface.
bit M1 and M0:
00 – out of the range indication (by default):
01 – mutual synchronization regime.
11 – hardware zero set regime
bit R:
0 – window regime (default);
1 – full range.
bit S:
0 – time sampling (default)
1 – trigger sampling
1…192, (default — 4) specifies data transfer rate in increments of 2400
baud; e.g., 4 means the rate of 4×2400=9600baud. (NOTE: max baud
rate = 460800)
Reserved
1) 10…65535, (default — 500)
the time interval in increments of 0.01 ms with which sensor auto-
matically communicates of results on streaming inquiry (priority of
sampling = 0);
2) 1…65535, (default — 500)
divider ratio of trigger input with which sensor automatically commu-
nicates of result on streaming inquiry (priority of sampling = 1)
2…65535, (default — 200) specifies the limiting time of integration by
CMOS-array in increments of 1mks
0…4000h, (default — 0) specifies a point within the absolute range of
transducer where the analog output has a minimum value
0…4000h, (default — 4000h) ) specifies a point within the absolute
range of transducer where the analog output has a maximum value
Reserved
0…4000h, (default — 0) specifies beginning of absolute coordinate sys-
tem.
Reserved
ments of 5 000 baud, for example, the value of 50 gives the rate of 50*5
000= 250 000 baud.
0…7FFh,(by default — 7FFh) specifies standard CAN identifier
1st byte of standard identifier
2nd byte of extended identifier
3rd byte of standard identifier
CAN interface identifier 1 — extended identifier;
identifier
0 — standard identifier .
CAN
NOTE:
1) All values are given in binary form.
2) Base distance and range are given in millimeters.
3) The value of the result transmitted by a sensor (D) is so normalized that 4000h (16384) corresponds to a full range of the sensor (S in mm), therefore, the result in millimeters is obtained by the
following formula:
X=D*S/4000h (mm). (1)
4) On special inquiry (05h), the current result can be latched in the output buffer where it
will be stored unchanged up to the moment of arrival of request for data transfer. This inquiry can
be sent simultaneously to all sensors in the net in the broadcast mode in order to synchronize data
pickup from all sensors.
5) When working with the parameters, it should be borne in mind that when power is OFF
the parameter values are stored in nonvolatile FLASH-memory of the sensor. When power is ON,
the parameter values are read out to RAM of the sensor. In order to retain these changes for the next
power-up state, a special command for saving current parameter values in the FLASH-memory
(04h) must be run.
6) Parameters with the size of more than one byte should be saved starting
from the high-order byte and finishing with the low-order byte
9.11. Examples of communication sessions:
1) Condition: request for device identification. Device address —1, inquiry code – 01h, device type
—61h, modification —00h, serial number —0402 (0192h), base distance —80 mm (0050h),
range —50 mm (0032h), burst number —1.
5) Condition: writing the divider ratio, for example, 12345=3039h. Device address – 1, inquiry
code – 03h, parameter code – 09h (first of all, higher byte), parameter value – 30h
Inquiry (‘master’) — 01h, 83h;
Message (‘master’) — 89h, 80h; 80h; 83h
and, for lower byte, parameter code – 08h, parameter value – 39h:
Inquiry (‘master’) — 01h, 83h;
Message (‘master’) — 88h, 80h; 89h; 83h
10. DESCRIPTION OF CAN INTERFACE
10.1. The sensor equipped with CAN 2.0B port supports data exchange using standard frames
(with 11-bit identifiers) and extended frames (with 29-bit identifiers). Each sensor is set with standard or extended identifier which is unique for a network given. The number of sensors in the network is up to 112.
The sensor can operate in two modes:
- the request mode. In this mode, each sensor receives a frame of remote data request (Remote
Frame) containing frame identifier, and responds by sending a data frame (Data Frame) with the
same identifier.
- the synchronization mode. When operating in the synchronization mode, each sensor automatically transmits a data frame (Data frame) together with its identifier in accordance with a specified time interval (sampling period) or in case of switching of the external synchronization output
and with the selected division factor taken into account.
CAN interface is used only for the reception of data. Parametrization of sensors is carried out
via RS232 interface.
10.2. The sensor transmits 8 byte long frame.
-byte 0: type of device
-byte 1: = 0 – reserved
-byte 2: low byte of serial number
-byte 3: high byte of serial number
-byte 4: low byte of operating range
-byte 5: high byte of operating range
-byte 6: low byte of the result
-byte 7: high byte of the result
The result is calculated by the formula (1), (see par.8.11).
11. SENSORS WITH CANopen INTERFACE.
11.1. The sensor with CANopen interface has two connectors, Fig. 5.
Connector Symbols D-sub 9-pin (fem) Wire color
Index Subindex Name Type* Attr** Default Comments
2000h 00h Node-ID UI8 rw 8 Node identifier (1..127)
2001h 00h CAN Baudrate UI8 rw 25
2002h 00h Serial Number UI16 ro No Serial number of the device
2003h 00h Base Distance UI16 ro No Base range, mm
2004h 00h Range UI16 ro No Measurement range, mm
2005h 00h Sensor On UI8 rw 1
2006h 00h Sampling and
Synchronization
Control
2007h 00h Laser Intensity UI8 rw No
2008h 00h Sampling period UI16 rw 500
2009h 00h Number of
Averaged Values
200Ah 00h Maximum
Integration Time
UI8 rw 0
UI8 rw 1
UI16 rw 3200
=125 000 бод - bauderate (see
20h parameter in the table)
Sensor ON, (see 00h parameter)
Control byte of synchronization
and sampling regimes ( see
02h parameter)
Laser level (05h parameter)
Sampling period (08h parame-
ter)
The number of averaged values (06h parameter)
3. The line “Net number of device” defines sensor network address (factory setting for all sensors – "1")
4. Upon clicking the “Connect” button, RF60X-SP will attempt to establish communication with
sensor with parameters selected as above. If it fails, a ‘communication error’ message is displayed.
5. If communication is successfully established the window changes its form to the following:
1) In the line "Device Type" the sensor model is displayed
2) In the line "Serial number", a serial number of the sensor is displayed
3) In the line "Base distance", base distance of the sensor is displayed
4) In the line "Measuring range", the sensor working range is displayed
12.3. After communication has been successfully established, it is possible to check sensor performance. To do so
1) Place an object within the sensor operating range.
2) Pressing "Measure" button displays the results of measurement of object position on the indication panel and "Oscilloscope" panel. The "Oscilloscope" window shows graphic representation
of the accumulated data. (X-axis – time (Time Sampling Mode) or number of the result (Trigger
Sampling Mode), Y-axis – coordinates). The 06h request type is realized in this case (see par.
8.9)
3) Pressing "Stream start" button enables measurement mode with sampling by time in accordance with the selected Sampling Period parameter. The 07h request type is realized in this case
(see par. 8.9).
4) By moving the object within the operating range, observe changes of readings on the display
and oscilloscope.
5) Clicking of the "Stop"/"Stream stop" button deactivates the data transfer.
6) Data coming from the sensor are accumulated and stored in a circular buffer with 10000
measurements storage capacity.
7) By clicking left key of the mouse scale of the graphic can be changed, the right key is used to
drag the graphic image within viewing region. By clicking the right key "Save to the file" menu
is activated.
12.4. Setting parameters of the sensor
The opening part of the "RF60X-SP" application ("Parameter – Value Table ") allows one to edit
and enter the required parameters into both RAM and FLASH memory of the sensor.
- to switch ON/OFF the sensor, click the left mouse key twice in the ‘Value’ field of the ‘Sen-
sor On/Off’ parameter;
- to enable/disable the analog output, click the left mouse key twice in the ‘Value’ field of the
‘Analog Output On/Off’ parameter;
- to set sampling mode ("UART Control of Sample"), press the key in the "Value" field and
select the mode;
- to set the exchange speed, click the left mouse key in the ‘Value” field of the ‘UART Baud
rate’ line, thus calling out the list of permissible speeds;
- in the "UART Network Address" line set the net address of the sensor;
- in the line "AL Control" set AL output regime;
- in the ‘Laser intensity level’ line, the laser output power level can be selected (mW);
- in the ‘Averaged values counter’ line, select the number of measurements to be averaged di-
rectly in the sensor. Factory setting is "0";
- in the ‘Sampling period’ line, sampling period in 0.1 ms increments is selected;
- in the ‘Max integration time’ filed, it is possible to set the limiting integration time for the
ruler (in microseconds);
- in the lines "Analog Range Begin" и "Analog Range End", it is possible to set the analog
output window boundaries in increments of 1% of the working range. Call out the control
toolbar by clicking twice in the ‘Value’ field:
Pressing the left mouse key activates red cursor which indicates the beginning of the scaling range, while pressing the right mouse key activates blue cursor indicating the end of
the scaling range. To set up working window boundaries, press the respective button and,
holding it in the pressed position, move the cursor within the sensor measurement region.
Then, boundaries of the selected window will be displayed in the lower line in % (percentage) of the range.
- in the ‘lock time of result’ line, select the time interval in increments of 5 ms after which
the sensor generates the measurement result as the object comes into the working range
and keeps the last measurement result on the display as the object goes out of the working range;
- in the ‘Zero point’ line, select the origin of coordinates in units of 0.1% of the range, or
by pressing the ‘Measure’ button place the object in the required point of the working
range and press the ‘Zero set’ key. Now, the origin of coordinates will correspond to the
point selected by you;
- to select data exchange rate via CAN interface, click left mouse key in the “Value’ field
of the "CAN Baud Rate" line and call the list of permissible rates.
When operated with CAN-interface
- select standard CAN identifier in the "CAN Standard Identifier" line;
- select extended identifier in the "CAN Extended Identifier" line;
- in the "CAN Identifier" line, the identifier type should be set (according to the frame
type) with which the sensor works;
- in the "CAN Mode” line, the CAN interface operation mode should be set.
1) By clicking the right key of the mouse on the left panel "Parameters save" menu is acti-
vated. Select ‘Load’ (to store one parameter) or ‘Load All’ (to store all parameters).
2) Perform testing of the sensor operation with new parameters.
3) To store the new parameters in the sensor memory, click the "Write to FLASH" of "Pa-
rameters save" menu. The sensor will operate with these parameter settings in subsequent
switched on.
4) To choose default sensor parameters, select "Default".
5) To save sensor parameters on the disk, select "Write to file".
6) To read sensor parameters from the disk, select "Read from file".
Laser sensor is supplied together with SDK (www.riftek.com/resource/files/rf60x-sdk_eng.zip)
consisting of:
- dynamic library RF60x.dll,
- file for static linking of DLL to project RF60x.lib,
- definition file RF60x.h.
The SDK allows user to develop his own software products without going into details of the sensor
communications protocol.
13.1. Connection to COM-port (RF60x_OpenPort)
The function RF60x_OpenPort opens COM-port with specified symbolic name, fills in the pointer
to the device descriptor and returns the operation result:
BOOL RF60x_OpenPort(
LPCSTR
DWORD
HANDLE *
);
Parameters:
port name specification see in MSDN, function CreateFile;
tical to field BaudRate in DCB structure described in MSDN;
Returned value:
If COM-port fails to be opened and adjusted, the function will return FALSE, otherwise if COMport was opened and adjusted successfully the function will return TRUE. More detailed information about returned errors can be obtained using API function GetLastError described in MSDN.
lpPort_Name –
dwSpeed lpHandle -
lpPort_Name,
dwSpeed,
lpHandle
name of COM-port (e.g., “COM1:”), full syntax for COM-
operation speed through COM-port. The parameter is iden-
pointer to the device descriptor;
13.2. Disconnection from COM-port (RF60x_ClosePort).
The function RF60x_ClosePort closes COM-port and returns the operation result:
BOOL RF60x_ClosePort(
HANDLE
);
Parameters:
RF60x_OpenPort or CreateFile;
Returned value:
If COM-port fails to be closed, the function will return FALSE, otherwise if COM-port was closed
successfully, the function will return TRUE.
13.3. Device identification (RF60x_HelloCmd).
The function RF60x_HelloCmd makes identification of RF60x according to net address and fills
Power status of sensor
Connection of analog output
Control of sampling and synchronization
Network address
Data transmission rate through serial port
Laser brightness
Number of averaged values
Sampling period
Maximum accumulation time
Beginning of analog output range
End of analog output range
Result delay time
Zero point value
Data transmission rate through CAN interface
CAN standard identifier
Specifies CAN extended identifier
CAN interface identifier
lpdwValue -
value will be saved.
Returned value:
If the device does not respond to parameter reading request, the function returns FALSE, otherwise
the function returns TRUE and fills variable
13.5. Saving current parameters in FLASH-memory (RF60x_FlushToFlash).
Function RF60x_FlushToFlash saves all parameters in the FLASH-memory of the RF603 sensor:
BOOL RF60x_FlushToFlash(
HANDLE
BYTE
);
Parameters:
RF60x_OpenPort or CreateFile;
Returned value:
If the device does not respond to request to save all parameters in the FLASH-memory, the function
returns FALSE, otherwise, if record confirm is obtained from the sensor, the function returns
TRUE.
hCOM –
bAddress -
hCOM,
bAddress
pointer to WORD-type variable where current parameter
lpdwValue
descriptor of the device obtained from function
address of the device.
.
13.6. Restoration of default parameters from FLASH-memory
(RF60x_RestoreFromFlash).
The function RF60x_RestoreFromFlash restores all parameter values in the FLASH by default:
If the device does not respond to request to restore all parameters in the FLASH-memory, the function returns FALSE, otherwise, if restore confirm is obtained from the sensor, the function returns
TRUE.
13.7. Latching of the current result (RF60x_LockResult)
The function RF60x_LockResult latches current measurement result till next calling of the function RF60x_LockResult:
Parameters:
RF60x_OpenPort or CreateFile;
Returned value:
If the device does not respond to result-latching request, the function returns FALSE, otherwise the
function returns TRUE.
hCOM –
bAddress -
BOOL RF60x_LockResult(
HANDLE
BYTE
);
hCOM,
hCOM –
bAddress -
hCOM,
bAddress
descriptor of the device obtained from function
address of the device.
bAddress
descriptor of the device obtained from function
address of the device.
13.8. Getting measurement result (RF60x_Measure)
The function RF60x_Measure reads current measurement value from the RF603 sensor. The result
value (D) transmitted by the sensor is normalized in such a way as the value of 4000h (16384) corresponds to full range of the sensor (S в мм), the result in mm is obtained by the following formula: X=D*S/4000h (mm) :
BOOL RF60x_Measure(
HANDLE
BYTE
USHORT *
);
Parameters:
RF60x_OpenPort or CreateFile;
hCOM –
bAddress -
lpusValue -
result D.
Returned value:
If the device does not respond to result request, the function returns FALSE, otherwise, if the re-
store confirm is obtained from the sensor, the function returns TRUE.
hCOM,
bAddress,
lpusValue
descriptor of the device obtained from function
address of the device.
pointer to USHORT/WORD-type variable containing the
The function RF60x_StopStream switches the sensor from continuous measurement transmission
mode to the “request-response” mode:
BOOL RF60x_StartStream(
HANDLE
BYTE
);
Parameters:
RF60x_OpenPort or CreateFile;
Returned value:
If the device fails to be stopped in the continuous data transmission mode, the function returns
FALSE, otherwise the function returns TRUE.
13.11. Getting measurement results from the stream (RF60X_GetStreamMeasure)
The function RF60x_GetStreamMeasure reads data from the COM-port input buffer which are
received from RF603 sensor after successful execution of the RF60xX_StartStream function. The
data arrive in the buffer at a rate specified in the RF603 sensor parameters. Since depth of the input
buffer is limited to 1024 bytes, it is preferable to read data with periodicity equal to that specified in
the RF603 sensor parameters. The parameter
pointer to USHORT/WORD-type variable containing the
hCOM,
pcInData,
pcOutData,
pdwOutSize
descriptor of the device obtained from function
pointer to data array which will be transmitted to RF603
pcInData
dwInSize pcOutData -
size of transmitted data. If no data need to be transmitted,
pointer to data array where data received from RF603 will
pcOutData
pdwOutSize -
pointer to the variable containing size of data to be re-
dwInSize,
must be NULL and
must be NULL.
must be NULL. After successful receipt of
dwInSize
must be 0.
13.13. Functions for operation of sensors connected to FTDI-based USB.
To work with FTDI-based USB devices, this library supports functions operating through D2XX
library of FTDI. Performance of the functions is identical to that of the functions used for operation
through serial port, the main difference being the presence of FTDI_ prefix in the function name,
for example: “getting result” function for serial port is RF60x_Measure while for FTDI USB
devices it is RF60x_FTDI_Measure.
13.14. You can find examples of programs for LabView here:
// Open COM-port
if (!RF60X_OpenPort("COM2:", CBR_9600, &hRF60X)
return (FALSE);
// Interrogate device
if (RF60X_HelloCmd( hRF60x, 1, &hlans ))
{
/////////////////////////////////////////////////
// //
// After successful execution of RF60x_HelloCmd//
// the structure hlans contains information //
// about RF603 sensor that responded to request//
// //
/////////////////////////////////////////////////
Air-cooled protective housing can be used when operating sensor under conditions of elevated
temperatures and high pollution levels. Overall and mounting dimensions of the housing are shown
in Fig. 1A. Basic requirements:
1) Temperature of pressed air at the sensor input <250C
2) Air must be clear of oil and moisture
3) Maximum allowable ambient temperature 1200C for air pressure of 6 atm.
4) The sensor is calibrated directly in the housing, therefore if the device is used without