0% found this document useful (0 votes)
28 views27 pages

Line Scan Camera Debugging Instructions

This document provides detailed instructions for setting up a line scan camera system, including a list of required demo devices and hardware configuration steps. It outlines the software configuration process, including camera settings and encoder connections, as well as troubleshooting FAQs for ensuring proper signal reception and image quality. The document emphasizes the importance of maintaining encoder signal frequency within the camera's maximum line rate to achieve accurate image acquisition.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views27 pages

Line Scan Camera Debugging Instructions

This document provides detailed instructions for setting up a line scan camera system, including a list of required demo devices and hardware configuration steps. It outlines the software configuration process, including camera settings and encoder connections, as well as troubleshooting FAQs for ensuring proper signal reception and image quality. The document emphasizes the importance of maintaining encoder signal frequency within the camera's maximum line rate to achieve accurate image acquisition.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Line Scan Camera Encoder trigger

Instructions

1. Demo Device List

MV-CL042-91GC 1

24V AC Adapter 1

5V AC Adapter (For
1
encoder)

Lens 1
Incremental
1
Encoder

MV-LELS-300-1K-
1
PY(Light controller)

24V AC Adapter
(For light controller 2
and revolving stage)

Network Cable
12-pin P10
1
connector

Revolving Stage 1

Bar Light 1

Cable for light


controller and light 1
source
Vision Controller 1

2. Hardware configuration
1) Begin with two 24V adapters, which are the power supplies for the
revolving stage and the light controller.
2) Then use the cable to connect the light source with the light controller.

3) Connect the line scan camera with the internet cable and the 12-pin P10
connector.
4) Connect the other end of the internet cable with the vision controller.

5) For the other end of the P10 connector, please check the pin definitions in
the user manual of the line scan camera.
6) Connect the power and ground to the 24V adapter according to the pin
definitions. Here, because our model is MV-CL042-91GM, we would link
cable2 (Red) and cable11 (Purple) to positive side of 24V adapter. Then,
link cable 1 (Black) and 5 (Gray) to the negative side of 24V adapter.

7) Then select 2 lines to connect with the encoder. Here, what we use is
Omron CWZ1X E6B2 5V differential encoder. It has 8 cables for this kind of
encoder.
E6B2-CWZ1X
Cable Terminal name
Brown 5V positive
Black Output A phase
White Output B phase
Orange Output Z phase
Black/Red Output A phase
White/Red Output B phase
Orange/Red Output Z phase
Blue 5V negative

Normally, we would connect A and B phase to Line trigger of camera, and


connect Z phase to frame trigger. Because Z phase would give the signal
every 1 round.
For examples, here we choose line 0 and line 3 to connect with the A and B
phase of encoder to be the line trigger. And we choose line1 to connect Z
phase of encoder. Here is the main connection way:

Connect Line0_P (White/Blue) with encoder terminal A (Black);


Line0_N (White/Blue) with encoder terminal A (Black/Red);
Connect Line3_P (White) with encoder terminal B (White);
Line3_N (Brown) with encoder terminal B (White/Red).
Connect Line1_P (Blue) with encoder terminal Z (Orange);
Line1_N (Green) with encoder terminal Z (Orange/Red);

8) As for the wiring of input, please check the user manual for more details.
Please noted that it is possible to use only one lines to connect with one
source of the encoder. And when connecting 2 phases with the camera, since
the principle of the encoder is to trigger according to the difference between
two phases, the input line rate is four times of the single-phase input
frequency.
Here is a wiring example with MV-CL042-91GM:

9)Then connect the power (Brown) and ground (Blue) of the encoder to the
5V adapter according to the pin definitions on the encoder.

10)Make sure all cables connect correctly and then, turn on the power.

 Turn on the light controller, adjust the light intensity according to the
operation environment. When you found lighting produce, it means power
OK.

 Turn on the revolving stage to test if the poster can rotate under uniform
speed, set the poster to the lowest speed. When you found it rotated, it
means power Ok
 Turn on the camera and encoder power.
3. Software Configuration
1) Make sure that your MVS version is over 4.0.0. Here we use:

2) Adjust the camera IP to let it in LAN, make sure there is no any ! sign
generated:

3) Double click camera to connect:


4) Click user set control and set to default

5) Check with the spec to know the maximum line rate of the machine. Here,
MV-CL042-91GM/GC at Mono8/Bayer8 can reach 19kHz.

6) Click run continuously and ensure the parameters looks like here. Set pixel
format to Mono8 or Bayer8. Bayer is color format. And then, test if it can
reach 19 kHz. The resulting line rate is the current line rate, which is
19047Hz. If you find image numbers increase, it means machine is running
continuously.

7) Image focus adjustment:


In continuous running, you can adjust lens focus on the camera to make
the image sharp. If you find the image is still dark. Please try to increase
gain, exposure time, enlarge the lens aperture or increase the light
intensity.
8) Frame trigger setting

 Stop running the machine.


 In Acquisition Control, we need to set as below:
 Firstly, Set Trigger Selector to Frame Burst Start,
 Set Trigger Mode to On
 Ensure when Trigger Selector to Line Start, the Trigger mode is off
 Set Trigger Source to Line 1

 Click run again and check whether image numbers increase. When, there
is no trigger, the image numbers would not increase. When there is a
trigger, if it does not increase, it means camera did not receive the signal,
please check.

9) Frame trigger setting


 Stop running the machine.
 In Acquisition Control, we need to set as below:
 Set Trigger Selector to Frame Burst Start,
 Set Trigger Mode to Off
 Set Trigger Selector to Line Start
 Set Trigger Mode to On
 Set Trigger Source to Frequency Converter
 In Encoder Control, we need to set as below:
Encoder Source A choose line0 ,please choose the selections according
to the actual connection method
Encoder Source B choose line3 ,please choose the selections according
to the actual connection method

 In Frequency Converter Control, we need to set as below:


Set Input Source to Encoder Module Out

 The use of divider and multiplier is adjusted according to the stretching


and compression of the actual image. Increasing the value of divider will
make image compress, while multiplier will make image stretched.

PreDivider will divide the line rate of input source.


Multiplier will multiply line rate which output from the calculation in
PreDivider.
PostDivider will divide the line rate which output from the calculation in
Multiplier.

 Click run again and check whether image numbers increase. When the
conveyor with encoder inside is not moving, the image numbers would not
increase. When the conveyor with encoder inside is moving, it would
increase as expected.
4. Result

The camera can output correct images even when the speed of conveyor
changed overtime.
Without changing the height in Basic Features, the default screen is too
narrow that the poster image is distorted. To get the appropriate image, first
adjust the height, then adjust exposure time and gain to set the brightness
and clarity of the image. The image can be manually focused by adjusting the
lens set on the revolving stage. Finally, you can adjust the frequency
converter to generate a suitable input line rate.
After all the setup, increase the speed of the revolving stage to check if the
image acquisition is steady still.

Note: It’s important to note that the encoder signal frequency should be
always kept under the max line rate. When changing speed, this one should
be checked every time.

For image height adjustment, please check FAQ-How to obtain 1:1 ratio
images?
For max line rate, please check FAQ-Does the actual line frequency
corresponding to the current line rate exceed the limit?
For frequency converter adjustment, please check FAQ-How to ensure that
the image does not stretch or compress, or move up and down when the
speed changes?

FAQ-How to obtain 1:1 ratio images?


Physical width Resolution width
=
Physical height Resolution height

Please keep in mind that this equation:


Physical width is the FOV width, you can calculate from lens focus and
working distance or directly use ruler to measure from the actual width.
Physical height is determined by the object length. If your object is a
rotator, please measure the diameter of the object.
Resolution width is the camera property. Here, we use MV-CL042-91GC, this
one width resolution is 4096 in the spec.

For example, if your camera lens focus is 25mm, and working distance is
600mm. You can use our Lens selector on the website to figure out the target
physical width, which is 659mm.

Then, the rotator we used is 100mm, we can figure out one cycle is about
2*pi*100 = 628mm length.

We use this formula to figure out the height, which is about 4096/659*628=
3903.3 pixel.

Thus, we can set this height in camera feature tree to obtain 1:1 size image.
Because this is a rough calculation, you may need to adjust a little bit to get a
perfect image.
FAQ-How to check frame trigger normal or not?

Stop running the machine.


In Acquisition Control, we need to set as below:
Firstly, Set Trigger Selector to Frame Burst Start,
Set Trigger Mode to On
Ensure when Trigger Selector to Line Start, the Trigger mode is Off
Click run again and check whether image numbers increase. When, there is no
trigger, the image numbers would not increase. When there is a trigger, if it
does not increase, which means camera does not receive the signal, please
check the following things step by step:
 Using an oscilloscope to test whether encoder Z axis able to output the
signal. You can measure the voltage change by manually rotating the
encoder one cycle. If it can output over 3.3V when triggering and lower
than 1V when it is not triggered, it means the signal output is ok
 If it is also no problem, please check whether connection is ok or not by
the user manually. Normally it can directly use Line*+ and Line*- to obtain
the differential signal. If it doesn’t have, please try to use single end
connection way. Pin5 is signal ground.

 If it still do not trigger, please try to do cross test with 12Pin cable and
camera itself to verify whether it is the problem from hardware.

FAQ-How to check encoder signal normal or not?

Stop running the machine.


In Acquisition Control, we need to set as below:
Firstly, Set Trigger Selector to Frame Burst Start,
Set Trigger Mode to Off
Ensure when Trigger Selector to Line Start, the Trigger mode is On.
Click run again, moving the conveyor and check whether image numbers
increase. If it does not increase, please follow the next steps:
 Try to change trigger source to Line0/Line3 separately, and test again
whether Phase A/B can output the signal.
 If it still do not have the signal, please take out the encoder and use
voltmeter or oscilloscope to measure the voltage between A/B and A-/B-.
When you rotate encoder manually, you can find there is a voltage
changing.
 Then, if you find encoder do not have issue, you can check with
connection and hardware. Three parameters can be indicator to know
whether you successfully connect the encoder:

1) Trigger Line rate (not all Line scan have this parameters): It can directly
know what is the trigger Line rate currently, which is a calculated value
from the previously results. It is not the instantaneous value.

2) Encoder counter (only count the trigger signal from encoder)

3) Line status (It can reflect whether this Line is at high or low level.
However, this value has delay, cannot indicator the instantaneous value )

FAQ-How to know whether camera receive the correct


numbers of encoder signal or not?

Stop running the machine.


In Acquisition Control, we need to set as below:
 Set Trigger Selector to Frame Burst Start,
 Set Trigger Mode to Off
 Ensure when Trigger Selector to Line Start, the Trigger mode is
On. Frequency converter is set to 1, 1, 1

Then, checking the encoder PPR value by its spec. We can try filling in
multiples of this value. Our encoder is 1024 resolution, thus we enter 1024
here. Make sure at this time, resulting trigger line rate is not over the
maximum frequency of camera.

At this point, when the conveyor belt is working, the camera image should be
in a stationary state and there should be no upward or downward movement if
encoder output the correct number of signal.
If you find the image go upward, it means you obtain more signal from
encoder. If you find the image goes downward, it means you obtain less
signal. When you find this phenomenon, the reason may be uneven operating
speed of the mechanism, hardware issues with the encoder, or unstable
triggering.
FAQ-Does the actual line frequency corresponding to the
current line rate exceed the limit?

Resulting line rate is the theoretical maximum line rate of this camera, which
is 7609Hz. Please make sure you are not enable the line rate control.

For some types of Hikrobot Line scan camera, it can directly see the resulting
trigger Line under frequency converter control. Make sure this value is smaller
than the resulting Line rate.
After you change the speed, or the frequency converter, this value would be
frequently changed.
FAQ-How to ensure that the image does not stretch or
compress, or move up and down when the speed changes?

After ensuring the correct wiring, normal line and frame signals, and normal
encoder signal reception without exceeding the maximum line frequency,
then, you can try this operation-adjusting frequency converter.

Frequency converter is mainly used to calculate and process the line


frequency of the encoder signal to match the object speed. The parameters
are described as follows:
No. Parameters Info
Trigger Line External encoder signal input line
A Rate frequency
Predivider to divide the line
B PreDivider frequency of external signals
Multiplier to multiplex the line
C Multiplier frequency of external signals
Postdivider to divide the line
frequency of external signals.
(This would lead to unstability,
D PostDivider please carefully set)
E Resulting Trigger line frequency actually
Trigger Line given to sensor after frequency
Rate converter
(Some camera types do not have A and E parameters)

Method 1:
If you do not know every parameters. Like FOV, Lens focus, speed, encoder
info. You can try this method.

 Take a circular pattern and adjust the image roughly to a circular shape by
stretching and increasing the predivider and compressing and increasing
the multiplier. If the requirement for line frequency accuracy is not high,
this step can be repeated until the pattern is rounded without subsequent
calculation.
 If accuracy is considered not enough, Save the picture and open it by
drawing. After the picture is enlarged, make a lion line through the center
of the circle. Take the cross line to the four vertices of the outer circle of
the pattern, and record the horizontal and vertical coordinates of the four
vertices respectively.

 Calculate the frequency division and multiplication parameters, and the


calculation process is as follows:
1) Compression ratio=(abscissa of c - abscissa of a)/(ordinate of d - ordinate of
b)=(4886-3907)/(3124-1754)=0.72
2) Multiplication coefficient=current multiplication coefficient * compression
ratio=(1/10) * 0.72=0.072
3) Since the frequency division coefficient is 0.072, 0.07 is taken as 0.07,
0.07=7/100, so the multiplier is taken as 7, and the divider is taken as 100.

 Fill the calculated multiplier value into the camera parameters, take the
picture as a circle, and complete the multiplier setting. Predivder function
is nearly the same as Postdivider, it is also OK if you set as 1, 7, 100

Method 2:
If you know every parameters. Like FOV, Lens focus, speed, encoder info. You
can try this method.

Width of FOV S peed of conveyor


=
Width of Resolution Target line rate

If you want to obtain the target line rate, you can use this formula.

For example:
If you know the following parameters:
Width of FOV =12 mm
Conveyor Speed =60 mm/ s
Width of Resolution=8192 pixels
Encoder resolution=1024 PPR
Encoder speed =1000 RP M

The target line rate can be calculated:


Resolution=12 mm/8,192 pixels
¿ 0.00146 mm / pixels

Target Line rate=Speed / R esolution


¿ 60/0. 00146
¿ 41,095 lines /sec
¿ 41 KHz

We combine with encoder info and the rotation speed to figure out current
Line rate:

Encoder Trigger Line rate=1000∗1024 /60=17067 Hz=17 kH z

In order to obtain target Line rate by current encoder trigger Line rate:

41 kHz /17 kHz=2.4 1

We cannot directly adjust to this data. We need to obtain the closest data
through frequency converter multiplication and division.
Currently, when the Predivider is adjusted to 5, Multiplier is adjusted to 12 and
PostDivider to 1, it can achieve 2.4 times of the original signal.

Therefore, if you want to further improve accuracy, we suggest adjusting the


appropriate field of view or replacing the frequency converter.

You might also like