Camera link protocol implementa​tion on FPGA

Hi,
I want to configure the Basler camera parameters like exposure time, frame rate, Gain value etc. through 7966R FlexRIO & 1483 Camlink adapter module. But on FPGA there is no option to configure these parameters through .icd file or MAX. So I have to implement the Camera Link protocol in FPGA to configure these parameters of camera.
I found that camera link has 4 controls lines (CC1 to CC4) but I am not able to find how these lines works to control the parameters of camera. If anyone knows how these control lines work then please tell me or share any document to describe their operation. Or any other information through which I can implement the algorithm on FPGA to control the parameters of camera.
Any help will be appreciate
Regards

I ran into multiple issues with the Serial Server running through the 1483/7966.  I was never able to reliably get the serial server to operate through the MAX NI Vision CLSerNat function.  It seems the 1483 is just not well supported in Max in any way.  This prevents the use of Pylon as your serial command/status tool.  Those work great with other frame grabbers like the 1433, but the 1483 leaves you having to implement the entire capability yourself.
So, I wound up having to write my own serial driver for the BBPI protocol and message processors for the various standard message types the Basler ACE cameras respond to.
Though I can't provide code, if you need to write your own protocol stack and have questions on the Basler interface, I'm worked through many of the issues.
One issue you may encounter is with the serial server itself.  It operates in byte mode.  I was never able to understand the reasons, but between a VI running on a host PC interacting through the stock serial server running on an FPGA (7966) through a RT target (PXI-1082) byte mode inserted very large inter-character delays.  Often so large as to cause the Basler camera to claim a timeout and terminate the command.  I had to modify the serial server to operate in a one-shot FIFO mode for transmit data as follows:
In the FPGA serial_interface.vi (For non byte-mode)
Increase the FIFO to 64 bytes to accomodate the largest Basler message
Add a "Transmit now" control to trigger a full FIFO output
Add a "Transmit length" control to control the number of bytes transmitted
In the upper level serial_server.vi
Modify the transmit loops to better detect bytes to transmit from the Ethernet interface and to direct the transmit data to the new WriteBytes vi
In the FPGA_UART.llb library
Add an FPGA_UART_WriteBytes.vi to handle the non byte-mode modification and to 'chunk' up transmit data into 64 byte (max) pieces.  In the BBPI and Basler protocols, this has not been seen since all the messages are small.
With these modifications, I could then write a state machine to handle the basler BBPI protocol.  States I chose for this were:
Idle
When a command is queued, it is fed to the serial server in its entirety.  The serial interface sends it to the camera as a complete message with no inter-character gaps)
Wait for ACK
Every command must have an ACK/NACK
Go back to idle if sending a write or command message
Wait for BFS (Only if sending a read request)
Wait for FTF
Wait for the data lengthbyte
Wait for BFE (Goes back to idle once all bytes received)
It's up to you if you want to handle the checksum capability of the BBPI protocol.  It's surprisingly tricky.  I hsould have saved myself the headache and just worked entirely in non-checksumming mode.
Once I got that all working, I could then write message handlers for each of the basic Basler message types:
Enum
String
Bitfield
Scalar
etc..
followed by specific message handlers for each of the messages I wanted to deal with.  My usual technique is to perform a mass serial configuration as soon as I fire up the FPGA.  I haven't tried to use the trigger port signals (CC1 etc) but those can all be configured and controlled through the serial port once you get a message passing capability in place.

Similar Messages

  • Modbus protocol implementa​tion

    Hello colleagues,
    I need to use a PC with a LabVIEW application to serve as modbus master to talk to a single modbus slave that concentrates data from another modbus, where it is the master talking to around 30 instruments (slaves). I have no experience with implementing modbus protocol, and have downloaded the NI Modbus Toolkit. Does someone have experience with using this toolkit - there is no help/manual, and I'd appreciate an example diagram(s) showing me the typical implementation of the protocol (initiating modbus session, sending commands, reading data, ...).
    Thanks in advance,

    See this thread for the protocol manual.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=197677&query.id=96682#M197677
    Attached is a serial query.
    Attachments:
    my modbus serial query.llb ‏518 KB

  • Camera Link using FPGA

    hi...
    i have problem to program the camera link using FPGA... im using pco.edge sCMOS camera with NI 1483 camera link adapter module for FlexRIO.
    i try to run example from "find example" - 1 tap 10bit camera with frame trigger.
    already compile the FPGA program...
    when i try to request 'get camera type' but no response
    attached are the file that i refer...
    thanks...
    Attachments:
    375502a.pdf ‏1320 KB
    MA_pco.edge_LowLevelDescription_101.pdf ‏1242 KB

    Hi,
    Did you load the right camera config file under MAX (icd file)?
    Because all the serial protocol is defined here.
    If you have an icd file for your camer, just load it and see in MAX that the serial command is enabled.
    If not, have a look here ftp://ftp.ni.com/support/imaq/pc/ni-imaq/cfgenerator/ to build your own icd file that fits your need.
    If you use your own FPGA code, check that you have enabled the serial port.
    Hope this helps.
    Regards

  • Multi-Camera-Link Vision Acquisition using .avi

    So I'm trying to use two Camera-Link Cameras (JAI CM-200-MCL) with the NI PCIe 1430 frame grabber in order to obtain video of a y-axis tensile testing project, and I'm relatively new to the whole LabVIEW experience. Essentially, I want to be able to capture every image of the testing process, so I can correlate the tensile testing results with specific images using the same sample clock, (e.g. data taken at 30 seconds match the image taken at 30 seconds). I'm trying to put everything together in piece and I already have a fairly stable, working tensile testing program written for LabVIEW 2009. I'm now in the process of using IMAQ (4.4) to track these images and save them as a .avi file. I've provided some sample code -- although it currently isn't working -- that's very simplistic.
    Questions:
    1. Is there an even simpler way?
    2. Can I sync the tensile testing VI and the Vision VI by placing the Vision VI in the Tensile Testing VI inside an event structure that's triggered by the "start" button. (Boolean)
    Thanks 
    Attachments:
    Vision Acquisition.vi ‏199 KB

    lyncheb,
    How accurately do you want your test and images to by synchronized (second, millisecond...)?  If you only need to be accurate to around 1 second then software timing would work.  However if you need sub milisecond accuracy you will want to use hardware triggering.  The 1430 is capable of hardware triggering over a RTSI line.  See page 16 (2-4) of the user manual here: http://www.ni.com/pdf/manuals/372016a.pdf
    What kind of data are you logging?  What hardware / software are you using to log this data?
    Regards,
    Sam K
    Applications Engineer
    National Instruments

  • Firewire (1394) vs camera-link digital video camera?

    Hello:
    I would like to purchase a video imaging acquisition system. I need at
    least 1k by 1k resolution, colors, 8 bits and i am working in a
    Labview IMAQ environment in which I already have a huge bunch of image
    analysis routines developed. Now the question is: what kind of camera
    + board should I choose? Some vendors recommend me firewire camera
    (Sony DFW-SX900 for instance) and a very cheap firewire board (for
    instance Matrox Meteor-2, 1394) others say the camera-link is The new
    standard in the digital camera world and that I will get higher
    throughput (25f/s compared to 5-10 with firewire). In my application,
    I will not need more than 5f/s. Camera-link boards are more expensive
    (example, Matrox or National Instruments).
    The
    question is then which alternative to choose? Please mention your
    experience and HW/SW which you are happy with,
    Thanx a lot for your precious help,
    Christophe

    Christophe,
    I would not worry so much about the interface as much as the functionality. It sounds like you know the specs you need in a camera (resolution, bit depth, frame rate). Find out what camera/interface combinations are out there that meet all your requirements, and purchase the one that is most cost effective. Don't pay extra for features that you won't use, such as the 25 f/s on the camera link board.
    I would talk to Robert Eastlund at Graftek Imaging (800) 441-2118 about selecting a camera. He distributes a large variety of the cameras that work with IMAQ, and will be able to advise you on the best camera for your application.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Where is the hardware connection for TTL 0 on the NI Camera Link Extension board?

    In the example project for the PCIe-1473, there is a TTL 0 I/O :
    Yet, the user manual only shows TTL 1-8 :
    Does this I/O pin exist?
    Solved!
    Go to Solution.

    I believe TTL 0 is the small SMB connector at the bottom of the card, below the two Camera Link connectors.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Issue setting baud rate for IMAQ using Camera Link

    I have a PCIe-1433 camera link board, with a Basler camera. I found that I can set the gain and exposure times directly in the camera using the serial link and serial commands. This works very well. I'm doing this programmatically using the CLAllSerial.DLL.
    The serial commands take too long to send in my application due to the default baud rate of 9600, so I was able to send a command to the Basler camera to up its baud rate, then change the baud rate of the camera link serial com port to match it. The result is that I can talk very quickly to the camera. Sweet so far.
    However, with both the Basler camera and the camera link com port set to the higher baud rate, I can no longer acquire images using the IMAQ imgXXX commands. I get a timeout from the serial commands that IMAQ must be using to control the camera for image acquisition. Essentially the IMAQ driver doesn't know about the baud rate change. I cannot see how I can tell the IMAQ driver what baud rate to use either. NI MAX also becomes unusable in this situation.
    How can I, through the IMAQ driver, increase the baud rate of the serial commands to the camera over the camera link?
    Cheers,
    Wayne
    Solved!
    Go to Solution.

    David,
    I'll try to help if I can. Keep in mind that I'm using a stub into the DLL using Delphi as my development platform. That should not matter.
    The DLL I'm tapped into is the IMAQ.DLL for the camera calls to get/set exposure time, gain, etc. The best reference I found for this is the NI-IMAQ help files that get installed with the normal NI install. There are important string constants that you need, to talk to the interface. I can't recall how I found these, but below are mine, in Delphi:
    { These are Basler camera attribute names we care about. }
    BaslerCameraGainControlAttributeString = 'Gain'; { string result }
    BaslerCameraGainValueAttributeString = 'Gain Value'; { numeric result }
    BaslerCameraBitDepthAttributeString = 'Bit Depth'; { string result }
    BaslerCameraExposureControlAttributeString = 'Exposure Control'; { string result }
    BaslerCameraExposureModeAttributeString = 'Exposure Mode'; { string result }
    BaslerCameraExposureTimeAttributeString = 'Exposure Time'; { numeric result }
    BaslerCameraMaximumHeightAttributeString = 'Maximum Height'; { numeric result }
    BaslerCameraPowerOverCameraLinkAttributeString = 'Power Over CameraLink'; { string result }
    { These are Basler camera attribute values we care about. }
    BaslerCameraManualGainAttributeValue = 'Manual';
    BaslerCamera12BitDepthAttributeValue = '12-bits';
    BaslerCameraMaximumHeightAttributeValue = 2048;
    BaslerCameraExposureControlFreeRunAttributeValue = 'Free Run';
    BaslerCameraExposureControlTriggeredAttributeValue = 'Triggered';
    BaslerCameraExposureModeAttributeValue = 'Manual';
    BaslerCameraExposureTimeAttributeValue = 5;
    BaslerCameraPowerOverCameraLinkAttributeValue = 'On';
    BaslerCameraGainValueAttributeValueMinimum = 33;
    BaslerCameraGainValueAttributeValueMaximum = 512;
    MaxAttributeStringLength = 100;
    The following code snippets, get and set gain and exposure times (I called it shutter speed), in Delphi:
    function TNiVision.GetGain : double;
    var
      TheGain : double;
    begin
      if GetCameraAttributeNumeric( BaslerCameraGainValueAttributeString, TheGain ) then
        Result := TheGain
      else
        Result := BaslerCameraGainValueAttributeValueMinimum;
    end;
    procedure TNiVision.SetGain( TheGain : double );
    begin
      SetCameraAttributeNumeric( BaslerCameraGainValueAttributeString, TheGain );
    end;
    function TNiVision.GetShutterSpeed : double;
    var
      TheSpeed : double;
    begin
      if GetCameraAttributeNumeric( BaslerCameraExposureTimeAttributeString, TheSpeed ) then
        Result := TheSpeed
      else
        Result := 1;
    end;
    procedure TNiVision.SetShutterSpeed( TheSpeed : double );
    begin
      SetCameraAttributeNumeric( BaslerCameraExposureTimeAttributeString, TheSpeed );
    end;
    These then call into the DLL functions imgGetCameraAttributeNumeric and imgSetCameraAttributeNumeric. There is a formatting interface between the above and the actual DLL functions I didn't show that just reforms the Delphi strings attribute names into C null terminated char arrays.
    I hope this helps. I've now moved on to using Pylon with GigE cameras, which is a much cleaner interface, but very different code.
    Cheers,
    Wayne

  • Camera link on locked home screen

    Camera link on locked home screen - when clicked, doesn't direct me to camera, Button just 'bounces' and stays on locked screen

    Tap on the camera icon and then drag it from the bottom to the top of the screen.

  • NI PCIe-1433 Camera Link frame grabber programming using VC++

    Hello, I have a Basler Camera Link-compatible camera and they use the NI PCIe-1433 Camera Link frame grabber as the image acquisition device.
    Right now, I want to develop some applications on that camera and need to do programming on the NI PCIe-1433 by VC++.
    So I want to know where I can find the software development kit for the NI PCIe-1433. For example, I can control the camera to grab the image by using the different functions(such as imgGrab(), or somthing like that ) from that software development kit.If there are some sample code that would be better.  

    Hi Wrsbj,
    The IMAQ functions that you mentioned are contained in the IMAQ driver, which is used to acquire from Camera Link frame grabbers. I would also check the compatibility chart, to make sure that you get the version you need. As for example programs, you can take a look at this KnowledgeBase article concerning building and running the IMAQ examples in VC++.
    David S.

  • Step-By-Step guides/links to implement SCVMM 2012 R2?

    Are there any Step-By-Step guides/links to implement SCVMM 2012 R2?

    That is pretty broad - not sure what you are looking for.  Begin here:
    http://technet.microsoft.com/en-us/library/gg610610.aspx
    Applies To: System Center 2012 - Virtual Machine Manager, System Center 2012 R2 Virtual Machine Manager, System Center 2012 SP1 - Virtual Machine Manager
    http://technet.microsoft.com/en-us/library/gg671824.aspx
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.
    Disclaimer: Attempting change is of your own free will.

  • Step-By-Step guides/links to implement Orchestrator

    Any Step-By-Step guides/links to implement Orchestrator

    Kevin Holman's 'Getting Started' guide is easy to follow and understand.  It will help you stand up a lab or POC quickly: 
    http://blogs.technet.com/b/kevinholman/archive/2013/10/18/orchestrator-2012-r2-quickstart-deployment-guide.aspx

  • Step-By-Step guides/links to implement Service Manager

    Step-By-Step guides/links to implement Service Manager

    Can you provide step by step instructions to build a model of my house?
    i'm not being flippant or joking, the problem is really down to building a model of your IT Department in Service Manager. There is no step by step guide to model your businesses unique processes and procedures. 
    If you want to stand up an environment, so you can get familiar with the product and start modeling your environment, then you might want to start with some of the
    Test Lab Guides, or contact a consulting company who can help you plan and architect your service book, delivery model and finally your SCSM environment. FULL DISCLOSURE: I am
    such a consultant, so I might just be advising you to go buy my services. 

  • Belkin 'Digital Camera link for iPod'

    I got a Belkin 'Digital Camera link for iPod' for $20. looked like a good bargain but dosen't work on my iPod.
    Any idea if this belkin device supports 5G iPods. It was actually designed for the 3G iPods with photo.
    I have a Sony DSC-S80 with PTP so dosen't look like the problem is with my camera.
      Windows XP Pro  

    I don’t see why it wouldn’t but it says it is for 3G iPod and you said it doesn’t work.
    Any idea if this belkin device supports 5G iPods
    No, it does not support the 5G, based upon it does not work and it is not designed for the 5G.

  • LabVIEW Implementa​tion of VXI-11 Discovery Protocol

    Has anyone implemented the VXI-11 discovery protocol using LabVIEW? I know I can use MAX to detect LXI instruments, but I like my code to be able to perform inventory functions independent of MAX. Is there a way to call the discovery routine within MAX from LabVIEW?
    Chris
    Practical Physics, LLC
    www.practicalphysicsllc.com
    National Instruments Alliance Partner
    Certified LabVIEW Developer

    Hello Chris,
    If the device is not registered in MAX, then it will not show up using this method. However, if you know the IP address of the instrument, then you can add it manually. There is no way to have MAX scan for instruments programmatically. Here is a tutorial on LXI.
    Thank you,
    Ryan
    National Instruments
    Applications Engineer

  • LabVIEW toolkit for digital still camera - PTP protocol based

    Dear List,
    Just to let you know that a LabVIeW toolkit for PTP
    (picture transfer protocol)camera is available. PTP is
    the new standard for still imaging devices such as
    still camera and scanner, it does not require camera
    vendor extra special drivers (unlike Twain)and it's OS
    independant, thus being supported widely in modern
    high resolution digital still cameras. Interested
    people can check out this link:
    http://www.hytekautomation.com/Products/PTPCam.html
    Irene
    =====
    Irene He
    [email protected]
    www.hytekautomation.com
    www.geocities.com/irene_he

    Hello rbergs, 
    I apologize for just now responding to your post below but I would like to redirect you to a different resource that will be able to provide the necessary support for using the LabVIEW Interface for Arduino toolkit. Currently, this toolkit is only supported by posts on ni.com/arduino forum. If you have any additional questions regarding the LabVIEW environment specifically, please feel free to post any additional questions in this discussion forum. 
    Wes W
    Application Engineering
    National Instruments
    www.ni.com/support

Maybe you are looking for

  • Rendered images are not appearing on the webpage. works fine on IE. All plugins appear to be present includeing Adobe Flash

    rendered images are not appearing on the webpage. works fine on IE. All plugins appear to be present including Adobe Flash

  • Vk31 and vk32

    Hi All How does this linked with  VK31, VK32 in FI tax codes. Regards Prasad

  • Data CD's won't Mount

    I recently upgraded the RAM and operating system. Prior to upgrading, I had already noticed that CD's sometimes did not mount on the first try. After upgrading, it seems that data CD's mostly won't mount, audio CD's mostly mount, and DVD's mount. Now

  • Bootcamp partition won't load on startup after Yosemite upgrade

    Hi! I have a similar problem like others before, but I tried to fix it like described but it didn't work. Here's my output: diskutil list /dev/disk0    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partit

  • Object format with %

    Hello, I've a numeric dimension object with a default format object = 0,00 %. (The format is set in the designer) But when i use this object in a webi report, I get 0.06% in place of 6.3% ! The original value is 0.063 Few months ago, the report displ