-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grabber returns only 0 counts from ROIs #1369
Comments
|
Sorry, that I took a while to answer. I wanted to wait on the answer from Andor about the newest camera firmware before replying. Here are the answers to your questions:
It also does not contain any messages from the grabber, AFAICS.
The first input message for channel 25 is the maximum of a signed 32 bit integer, while the second input contains the 0 counts returned at the end. The actual image, as readout via USB, only shows around 125,000,000 counts over the whole image. Does anyone know how to check, what the camera sends over the link output? Besides using a different frame grabber, e.g. from Bitflow? |
With Migen microscope. This is how it was initially developed: |
Or just a scope on the clock and one of data lanes. Either on grabber or directly on the cable. There are LVAL/FVAL/DVAL which will toggle on RX2. But if you look on any of the other three data pairs you should see bits. Your observation would mean flat zeros. The signal standard is LVDS. https://en.wikipedia.org/wiki/File:Camera_link_serialization.jpg |
Also there should be grabber messages about the recovered pixel clock frequency during boot (of Kasli or the camera). Check whether those make sense. You may need to look at the actual serial console (the third USB interface on the Kasli USB connection is the serial port, 115200-8n1). |
ping @JKiethe |
Sorry for not answering for such a long time. It is not yet resolved, as I did not have time to investigate further. I will work on it this week and get back to you in a few days. |
I've had a look at the LVDS signals on an analog scope. The camera was running in video mode, ca 120ms exposure, with only a sub-image read out. The shutter is closed, i.e. the pixel data are just noise. There are three consecutive bits on I see three different kinds of data, some with just There are no clock cycles at all in which On the serial console, I see
when the cameralink is activated. *They appear a bit early with respect to the clock, but it's hard to be sure with the limited timing resolution. I'm waiting to borrow an analog scope with 4x the sampling rate, as I don't have a quick way to convert LVDS to single-ended right now. If there is an easy way to check for such a misalignment on the FPGA, that would also help. |
There isn't really an automatic way to fix clock-data-skew by entire bits. The data lanes are supposed to be aligned to the clock.
|
The camera link clock rate is independent of any CCD readout settings. The signal on
I don't ever see that message. The only ones from the grabber are the two quoted above when the camera link is activated, and "lock lost" when it's turned off.
This sounds like the kind of test I had in mind - using the already available data on the FPGA rather than setting up new hardware to analyze the LVDS signals. We currently have no environment set up for compiling things ourselves though, but I'll look into it in the next couple of days. |
Stretching the definition of "couple of days" a bit, but I have some good news: Changing the expected clock pattern to I will get in touch with Andor about this and keep you posted here. |
I'm afraid the success was rather short-lived. Today we discovered that it only works intermittently. I'll keep looking into it and share more details once I have a clearer description. |
Ok, this is awkward: The problem was solved by ordering a new MDR cable (and using the unmodified firmware, i.e. the originally expected clock pattern For completeness: The new cable is 3m long (vs. 5m for the one we had the issues with), but my guess would be that there was an issue with that specific cable / connectors rather than one with cable length. I think this issue can be closed now. |
Thanks for hunting this down! |
Cable quality doesn't seem to be the issue, it was a professionally made cable (no heat shrink etc) While looking into this, I realized that the working cable has a (differently) wrong wiring as well. I wish I had looked into this a bit earlier; seems like we got lucky. Since I would get a different one next time, I don't think stating the part number here makes sense. For reference, the correct wiring can be found at http://www.volkerschatz.com/hardware/clink.html: |
Good grief! Wow, a frustrating situation but glad that the solution in the end turns out to be relatively simple. It is definitely terrifying to see the variety of "creative" cable manufacture that exists... |
I think I told rj; in our initial tests, we used this one
https://www.stemmer-imaging.com/de-de/produkte/cable-cl-c-10m-pocl/
and have not seen any issues yet... Cheers,
Christian
Am 08/08/2020 um 06:33 schrieb Daniel Slichter:
…
XClk+ is on an individual wire, for example.
Good grief! Wow, a frustrating situation but glad that the solution in
the end turns out to be relatively simple. It is definitely terrifying
to see the variety of "creative" cable manufacture that exists...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGGTVE4UFKJGHMFVVT3BZQ3R7TIR3ANCNFSM4I6SXYPQ>.
|
Thanks for tracking this down @jkellerPTB. I updated wiki with cable advice. https://github.com/sinara-hw/Grabber/wiki#overview |
I am not sure, where the following information is placed best. It is interesting for users of the Andor iXon Ultra 897 and the Sinara Grabber, which is why I added it to this issue. @jordens & @sbourdeauducq: If I should move/copy it somewhere so that it reaches the ARTIQ community better, please tell me. Bug in FPGA of Andor Ixon Ultra 897 In the CameraLink implementation of the Andor Ixon Ultra 897 (i.e. the 512px x 512px variant) is a bug, which occurs due to some error in the FPGA of that camera model. This leads to the following behaviour on ARTIQ side:
Andor is aware of this behavior and can reproduce it with a different frame grabber card. They suspect an error on the camera FPGA and are currently working on fixing this, but it might take some months to supply a patch.
Remark: For the iXon Ultra 888, i.e. the 1024px x 1024px model, this bug does not occur. The readout over the CameraLink works correctly independent on the sub-image dimensions. |
@JKiethe Thanks for all that valuable info! |
@JKiethe thanks for the summary on that bug! Did Andor release a fix by now? |
@airwoodix Yes, they did fix it. Sorry for not updating this thread when they informed us. In the firmware with FPGA version of 6.30 (and I would assume above) the bug has been fixed for the iXon Ultra 897. |
Awesome! Thanks for the quick feedback. |
Bug Report
One-Line Summary
The grabber only detects 0 counts in a region of interest, even though the camera image shows non-zero counts.
Issue Details
Steps to Reproduce
Expected Behavior
print("ROI sums:", n)
displays the correct counts, i.e. the counts of the camera image, which are read out after the experiment. For the given ROIs and camera settings around 50000 counts per ROI are observed.Actual (undesired) Behavior
Print out is
ROI sums: [0, 0]
.Your System
Additional information:
The method
grabber0.input_mu(n)
actually puts in 0s in the listn
. This was tested by initializingn
with non-zero values. The result printed was still 0.This bevaior is seemingly independent on the ROI coordinates. The same happens for the following ROIs as well:
rois = [[1, 1, 10, 10 ], [503, 503, 512, 512]]
rois = [[503, 503, 512, 512], [1, 5000, 10, 5010]]
I am not surprised the last one has only 0s, as the ROI edges are outside the actual image (512px X 512px). But the other ROIs should give some non-zero values, as far as I understand.
This result does not dependent on external triggering of the camera, as done in the above example. Even using the video mode / internal triggering of the camera produces the same zero result.
Connecting to the Medium link input, instead of Base, blocks execution. This is probably because the Grabber does not get any input during the ROI gate time. (The same thing happens if CameraLink option of the camera is off).
This also indicates, that
grabber.input_mu(n)
actually registers inputs (or at least an image), but for some reason the counts are 0.Camera Link cable length is 5m.
The text was updated successfully, but these errors were encountered: