From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

clsernat.dll x64?

Solved!
Go to solution

I am having an issue where myself and many camera manufacturers are unable to communicate over camera link using 64-bit.

Does NI plan on releasing a 64-bit version of clsernat.dll?  It seems that it is not possible to develop a native 64-bit application without this.

I am fully able to utilize IMAQ.dll to communicate, but this is not a solution with certain types of cameras because of baud rate problems.

For instance, when a camera power cycles, the baud rate might not be known.  When this happens, there is no 64-bit solution.

Or worse, it becomes impossible to run a camera at anything other that 9,600 baud.

 

If there were a way to programatically change the baud rate using IMAQ, this would be a viable solution.

In reading the forums, NI does not seem to allow programatic changes to camera link baud rates:

 

"Solution: 
No, you cannot change the baud rate of a Camera Link card programmatically. The baud rate needs to be changed in the camera file before opening a session to the camera."

 

I need a solution because I own cameras that will not run in 64-bit simply because I own a National Instruments frame grabber.

 

Thanks for any help,

Henry

 

0 Kudos
Message 1 of 14
(5,638 Views)

Hey henryz,

 

A 64-bit version of clsernat.dll has already been released.  You can find it in Vision Acquisition Software 2011.09 .

 

Ryan F.

0 Kudos
Message 2 of 14
(5,631 Views)

[Edit] My previously posted solution does not actually work. Ryan's suggestion of using the latest clsernat from Vision Acquisition is the best way to go.


Eric

0 Kudos
Message 3 of 14
(5,626 Views)

Thanks for the quick replies Eric and Ryan!  I have been using VAS_September_2011 since September of 2011.

Correct me if I am mistaken, but the version of clsernat.dll included in this package is NOT a 64-bit library.

The first clue is that the package installs into C:\Program Files (x86)\National Instruments\

The second clue is to examine the PE File header of the library to confirm that it is, in fact, an x86 library:

 

C:\>dumpbin clsernat.dll /headers

Microsoft (R) COFF/PE Dumper Version 10.00.30319.01

Copyright (C) Microsoft Corporation.  All rights reserved.

 

Dump of file clsernat.dll

 

PE signature found

 

File Type: DLL

 

FILE HEADER VALUES

             14C machine (x86)

               5 number of sections

        4DEE98BC time date stamp Tue Jun 07 14:31:40 2011

               0 file pointer to symbol table

               0 number of symbols

              E0 size of optional header

            210E characteristics

                   Executable

                   Line numbers stripped

                   Symbols stripped

                   32 bit word machine

                   DLL

 

I am aware that it will run in a 64-bit environment.  This is referred to as a 64-bit compatible library.

Unfortunately, when a true 64-bit application attempts to utilize this library in native 64-bit mode, it does not work.

 

Please keep me in the loop for the time that NI decides to release a 64-bit version of the library.

In future replies, all I require is an x64 version of CLSERNAT.DLL (from ftp.ni.com perhaps?), not another 1.4GB+ download of VAS,

 

Henry

0 Kudos
Message 4 of 14
(5,615 Views)

Hi Henry,

 

The 64-bit version is definitely installed into C:\Windows\System32 (and the 32-bit version is installed in C:\Windows\SysWOW64). The DLLs have been placed in system32 historically because some utilities had trouble loading them via the non-system paths. Note that the 32-bit build is also installed in %Program Files%\cameralink\serial as well per the official cameralink specification for how clallserial loads DLLs.

 

I think right now there is not an "official" location to place 64-bit clserXXX files such that a 64-bit build of clallserial can find them. We do place a 64-bit copy of clsernif.dll (used to provide serial functionality for the NI 1483 FlexRio adapter module) in "C:\Program Files\cameralink\serial" (note that this is the 64-bit Program Files directory) but strangely the 64-bit build of clsernat.dll does not seem to be installed there. My hope is that once the locations are standardized by the CameraLink working group the NI installers will be updated to place them in the "official" locations and clallserial.dll can find them out-of-the-box.


Eric

 

0 Kudos
Message 5 of 14
(5,613 Views)

Eric, I do not have a single version of clsernat on my machine that claims it is native 64-bit.

I also have the source code for the 64-bit version of clallserial that cannot enumerate a valid return from clGetNumSerialPorts to see the NI port. (this might be the root of the problem).

Of course, all of this works perfectly in a 32-bit build utilizing the path is given in the registry entry: HKEY_LOCAL_MACHINE\SOFTWARE\CameraLink.

I can swap out libraries in this path with no luck for anything except 32-bit.

 

I'll un-install and then re-install everything and try again from scratch.

Your responses are extremely helpful and insightful,

Henry

0 Kudos
Message 6 of 14
(5,609 Views)

Hi Henry,

 

Did you not have any clsernat.dll installed in your 64-bit system32 directory or are you saying the version there is not 64-bit? I'm fairly positive the version you installed should have installed it there. 

 


Dump of file c:\windows\system32\clsernat.dll

PE signature found

File Type: DLL

FILE HEADER VALUES
8664 machine (x64)
6 number of sections
4E090849 time date stamp Mon Jun 27 17:46:33 2011
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
2022 characteristics
Executable
Application can handle large (>2GB) addresses
DLL

 


0 Kudos
Message 7 of 14
(5,599 Views)

henryz wrote:

I also have the source code for the 64-bit version of clallserial that cannot enumerate a valid return from clGetNumSerialPorts to see the NI port. (this might be the root of the problem).


So one question is, what copy of clallserial are you using? As far as I know, there has been no "official" 64-bit build for quite some time and multiple vendors have ported this component to 64-bit with slightly different implementations (namely how they search for clserXXX DLLs since the registry key mechanism was never clarified by the cameralink committee for 64-bit).

 

Eric

Message 8 of 14
(5,598 Views)
Solution
Accepted by topic author henryz

UPDATE:

 

Eric, I had versions of VAS going back for years.  I think part of my problem may have been that clsernat.dll was not updated during one or more of my installs, namely VAS_September_2011.

I un-installed every NI package I have, then re-installed the latest version of VAS.  With this, I now have a genuine 64-bit version of clsernat.dll.  Prior to this, I guess I had an x86 version stuck in sys32.

So far, so good...

 

I'm still stuck at the high-level however, that none of the cameras I have can use this library with their applications?  They just cannot see the NI port in 64-bit.

They seem to find the .DLL, but it will not enumerate it's port.  This is likely due to some idiosyncrasies with the many flavors of clallserial as you have pointed out.

Since I also had no luck with clallserial-111beta x64, I decided to write my own low-level driver to overcome any of this vendor-specific nonsense.

I am now linking directly to both of the (x86 / x64) clsernat.dll libraries and bypassing the clallserial hoopla:

 

clGetNumSerialPorts.  OK.

clGetManufacturerInfo.  OK.

clSerialInit.  OK.

clGetSupportedBaudRates.  OK.

clSetBaudRate.  OK.

clSerialWrite.  OK.

clGetNumBytesAvail.  OK.

clSerialRead.  OK.

 

Thanks for the help,

Henry

0 Kudos
Message 9 of 14
(5,589 Views)

Hello,

 

I have a very similar problem. I am running a Windows 7 - 64 bits, and I tried to install IMAQ4.6.4 (doawnloaded from niserver).

The installed dll are 32 bits versions, i.e.:

 

C:\Windows\system32>dumpbin "C:\Windows\System32\clsernat.dll" /HEADERS

FILE HEADER VALUES
14C machine (x86)
5 number of sections
4F1A7098 time date stamp Sat Jan 21 09:00:24 2012

 

Idem with imaq.dll, etc...
What is the right way to force 64 bits dll to be installed on 64 bits system ?

0 Kudos
Message 10 of 14
(5,456 Views)