Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communication is not working or keeps disconnecting

Solved!
Go to solution

Hello everyone,

 

I’ve encountered an issue with using the Basler camera (Basler ace acA2040-180km NIR). For some reason I am not able to establish/maintain the serial connection to the camera using e.g. Pylon viewer. Other than that, the camera works fine and I can acquire data as usual, however I cannot change the parameters like exposure time or area of interest.

 

Used Hardware & Software

 

Hardware

 

  • NI PCIe 1473R Camera Link Frame Grabber With FPGA Image Processing
  • Basler acA2040-180kmNIR Camera Link camera with the CMOSIS CMV4000 CMOS

 

Software

 

  • Pylon 5 Camera Software Suite for Windows (version 5.0.0)
  • LabVIEW 2014 SP1
  • LabVIEW 2015

 

Where it all started

 

The whole imaging system is connected to an isolation transformer as a safety precaution. During standard image acquisition, power went off in the lab thus shutting everything down. After the power came back online, I started the computer and wasn’t able to establish a serial communication to the camera anymore (using Pylon viewer from Basler).

 

Troubleshooting so far

 

  1. As we have another almost identical setup with the same frame grabber (NI PCIe 1473R) and camera, it was easy to switch my camera to the second system and confirm that I can establish a serial connection to the camera as usual and change parameters.
  2. I’ve also used the examples provided by LabVIEW (for example 1-tap 10-bit Camera with Frame Trigger) and the serial connection didn't work either which means that the LabVIEW code itself is not the problem.
  3. When I initialize the NI MAX and go to Tools -> NI Vision -> Select CLSerNAT systems, the camera is not showing up even after pressing the update button and only shows localhost
  4. The FPGA code includes the 2 Serial interface loops and Host VI has the SerialServer subvi with no alterations. When I run the host VI and open Pylon viewer, I can see that the serial connection does not stay connected and when you try to scan available cameras with Pylon Viewer, the serial connection only stays on for a short period of time (Connected boolean indicator in serialserver.vi flips green for a second or so). With the second system, upon opening the Pylon viewer, the serial server stays connected with the camera and you’re able to see the camera in the device tree in Pylon viewer and access the camera parameters.
  5. When I use the Pylon CL Configurator, it detects the FlexRIO port but gives a message: “The stream is not a CLPort registry stream since it is missing the magic GUID in the first line”. And as an intermediate user I have no idea what the message is about.

ni_post.png

 

Long story short

 

The serial communication between the PC and the camera is not working and for some reason Pylon viewer is not able to detect the camera. I’m so baffled myself why this is not working so if someone can shed light on this mystery I'd be grateful.

 

Best,

 

Kari Vienola

0 Kudos
Message 1 of 6
(6,890 Views)

Hello Kari,

 

Thanks for posting so much information about your problem. I've not been able to find any documentation about that error code, but having duplicate systems is very helpful. I may have misunderstood but it sounds like you've been able to establish that the camera is not the problem. Have you tried the PCI card in a different slot in the PC? Additionally, if you move the PCI card, does the problem migrate or is it resolved?

 

Best regards,

Jake A

Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 2 of 6
(6,860 Views)

Hello Jake,

 

Yeah currently we have done several things:

 

  1. Tested the camera in the other system where the serial connection (works flawlessly).
  2. Tested my frame grabber (NI 1473R) in another PCIe slot in my system (didn't help) and with the secondary system (worked perfectly).
  3. Tested the identical frame grabber from the secondary system in my system (didn't help).
  4. Only took the camera link cables from my system and used them in the secondary system (worked perfectly).

What I can deduct from this troubleshooting is that the frame grabber, cables or the camera is not the origin of this issue. The issue lies in the software but pinpointing it out is like finding a needle in the haystack if it's something like a corrupted dll-file somewhere (or at least with my skillset it is).

 

I will spend few more days investigating the issue but currently the only option seems to be formatting the OS drive and reinstalling everything. If you have any further suggestions, I'll be glad to test them out.

 

Best,

 

Kari

0 Kudos
Message 3 of 6
(6,801 Views)

Hello Kari:

   I also have the same problem and the same reason.

   Have you solved the problem and how? 

   Thank you very much.

0 Kudos
Message 4 of 6
(5,448 Views)

Is the serial bus transformer connected?  Try to temporarily by-pass the transformer and check for communication.  If communication works, then the transformer may have an issue.  You might want to try optocouplers for isolation on the serial bus rather than the transformer.  A transformer will pass along spikes to the other side (di/dt) where as an optocoupler will clip any spikes.  Also, a discontinuity in the transformer core may cause odd behavior.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 5 of 6
(5,422 Views)
Solution
Accepted by JÞB

Thank you , the problem have been fixed by follow steps:

 

When you can't find camera link camera in pylon viewer, and the pylon CL configurator say "The stream is not a CLPort registry stream since it is missing the magic GUID inthe first line", you can solve the problem like below.

Cause: A file may not have been created correctly during installation or may have been corrupted/overwritten at some point by other 3rd party software.

Solution: 1. Delete the PortIDDeviceIDCache.ini or PortIDDeviceIDCache2.ini file, found in the folder below.

2. Relaunch the CL Configurator and probe the ports again to generate a new .ini file.

(Please note that these folders may be hidden by the operating system)

pylon 2.3 (PortIDDeviceIDCache.ini)

C:\ProgramData\genicam\xml\cache\

pylon 3 (PortIDDeviceIDCache.ini) and pylon 4 (PortIDDeviceIDCache2.ini):

(WIN7)

English: C:\Users\All Users\genicam\xml\cache

German: C:\Benutzer\All Users\genicam\xml\cache (WinXP)

English: C:\document and settings\All Users\application data\genicam\xml\cache\

German: C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\genicam\xml\cache\


Other problem:http://www.baslerweb.com/en/support/knowledge-base/frequently-asked-questions?page=5

 

Message 6 of 6
(5,415 Views)