e2v相机的连接

e2v相机的连接

请注意,本文编写于  979  天前,最后编辑于  979  天前,内容可能已经不具有时效性,请谨慎参考。

e2v相机的连接

这次项目用到e2v相机,以及NI PCIe-1433的采集卡,在连接过程中出现了许多问题,这里记录下出现的问题以及解决过程

一、安装NI的驱动

在买相机时附带的光盘里面带有NI的安装文件,也可以直接到官网下载相应的安装程序

二、连接相机

NI PCIe-1433连接电脑,然后相机接在1433采集卡上,再给相机接上电源,相机亮绿灯说明相机正常
image.png
此时可以打开刚才安装的NI软件包,里面有个软件名称为NI MAX,点开可以查看采集卡和相机是否安装正确,或者可以利用NI自带的demo程序,编译后运行,看能否正常工作

三、问题汇总

1. 连接错误

错误代码:

  1. 0xBFF6902C Unable to Connect to Camera
  2. 0xBFF6001F Cannot Detect Recognizable Video Source

这个也是耗费时间最多的一个错误

尝试一

检查相机电源,第一次出现该错误时,当时相机未插电,猜测是相机未插电导致无法连接,然后将相机接电,亮绿灯,继续测试,仍然出现此错误

尝试二

在NI官网查找文档时,对该错误有如下描述(文档连接在章末参考文档)

If MAX returns error 0xBFF6902C with IMAQdx or 0xBFF6001F with IMAQ, this means that the frame grabber was not able to detect a valid pixel clock coming from the camera. Check for the possible causes:

Case 1: Inadequate power is being provided to the camera
Camera Link cameras can either be powered with Power over Camera Link (PoCL) coming from the Frame Grabber or they can be externally powered. In order to know if your camera supports PoCL, verify the datasheet or manual of your camera model. If it does not support PoCL, you will need to power your camera with an external power supply. If your camera does support PoCL, make sure of the following things:

  • PoCL is enabled on the frame grabber. Refer to How do I Enable Power over Camera Link (PoCL) on My Frame Grabber? for more information.
  • Cables are PoCL compliant
  • If your camera requires power over both connectors, consult the frame grabber's specifications to make sure it supports dual PoCL.

Case 2: Base and Medium/Full Connectors are not connected to their respective connectors on the camera and Frame Grabber
Make sure that the Base Connector (Connector 0) of the Frame Grabber is connected to the Base Connector of your camera and that the Medium/Full Connector (Connector 1) is connected to the respective connector on the camera. Our Frame Grabber is expecting a valid pixel clock signal from the camera on the Base connector, therefore if the Base and Medium/Full connections are swapped, the camera will not be detected correctly.

case1是电源问题,但是已经成功接电,于是猜测是否接口有问题,尝试更换插口,首先更换了相机的接口,发现不行,重新插拔,不行,重启电脑,不行,最后是更换了在采集卡上的另一个接口,发现能够连接到相机
image.png

2. 超时错误

错误代码:

  1. 0xBFF6901B Timeout
  2. 0xBFF60022
  3. corrupted image

image.png
image.png

尝试一

根据之前查找文档,有可能是数据过大传输超时,尝试更改超时时间和照片大小
image.png
然而修改之后仍然无用,仍然报错timeout

尝试二

注意到相机文件似乎与相机并不匹配
image.png
我们的相机应该是OCTOPLUS相机,PN为EV71YO1CCL2x10-B,所以与该相机文件不匹配,因此需要用到NI Camera File Generator来创建一个新的相机文件,该软件下载地址与使用说明在章末参考文档,安装完相机文件生成器后,根据相机文档中的参数,创建一个新的相机文件
image.png
然后设置好相应参数,如相机的Scan Type,Bit per Pixel,以及照片的长宽等等,调整为合适大小,将新的相机icd文件放入到C:\Users\Public\Documents\National Instruments\NI-IMAQ\Data中,然后在NI MAX软件中选择对应的相机文件
最后demo测试如下
image.png
由于相机镜头未开封,所以为黑色,此时已经有帧率显示,当用手电筒照射镜头时,有白色光亮,因此到此,连接成功。

参考文档