07-29-2016 11:15 AM
Hello,
we are trying to communicate commands to a camera through the ClallSerial.dll which wants the commands in an int8 format. However, our command is in known only in hexadecimal(CA00 6900 0400 0A00 4101 0000 0000 0000 ) which of course is much lager than 127 allowed by an int8 value. How could we parse this information to properly communicate through the dll?
07-29-2016 12:42 PM
You'll need to provide more information than this such as the defintion of the call for the .dll. Perhaps its header file.
There is no way you can send 16 bytes through a U8 or I8.
07-29-2016 01:55 PM
We are trying to use ClSerialWrite, the parameters are the serial reference which we have, the buffer which is for the command (int8) the buffer Size in bytes (int32) and the serial timeout.
07-29-2016 09:38 PM
Maybe you can only send 1 byte to it at a time.
You've said a few things, but you really haven't shown any information about the dll that anyone can act on.
07-30-2016 02:49 PM
The DLL you are using appears to be a 2004 Serial-to-Camera Link DLL written by (and, boy, was I surprised to see this!) National Instruments.
National Instruments has had more than a decade to make improvements to their Vision platform(s). I recommend seeing if your camera (what camera, by the way) can be recognized by MAX and whether you can use the well-developed IMAQ and IMAQdx Camera functions to do whatever it is that you are trying to do. Let LabVIEW (through IMAQ and IMAQdx) take care of the low-level protocols, leaving you to worry about frame rate, high-level camera control, image format, etc.
Bob Schor
07-30-2016 06:15 PM
The camera is an Intevac, and the frame grabber is BitFlow. Neither of which are recognized by NI.
Any advice on how to use IMAQ with third party frame grabbers would be most appreciated!!
07-31-2016 12:37 PM
BitFlow's Web Site says "Drivers are available for off-the-shelf 3rd party applications such as A&B Software's ImageWarp, Cognex's Vision Pro, MVTec's HALCON, The Mathworks MATLAB, National Instrument's LabView, NorPix's StreamPix, IO Industries' Streams and Stemmer Imaging's Common Vision Blox. Finally, BitFlow provides a TWAIN driver. TWAIN is a image acquisition standard used by hundreds of applications. Of course, if you don't see your favorite package here, please let us know."
I'd contact BitFlow and find out from them how to use the LabVIEW Drivers. I'm guessing that with the proper Driver installed, the Frame Grabber should become visible in MAX.
Bob Schor
08-01-2016 07:51 AM
We have contacted bitflow, and their VIs work great. The problem is, that although we can grab frames from the camera through cameralink (using vss_bitflow.dll), they use a seperate dll for serial communication outward to control the camera, which is the ClallSerial.dll we are having trouble with.
We also checked to make sure the propper drivers are installed, and asked bitflow about the frame grabber being visible in MAX. Unfortunately, they confirmed that because it is a third party piece that MAX will not recognize it.
08-01-2016 08:49 AM
@Shredderofmass2 wrote:We are trying to use ClSerialWrite, the parameters are the serial reference which we have, the buffer which is for the command (int8) the buffer Size in bytes (int32) and the serial timeout.
I never worked with that dll but just looking at the input parameter list, it has a "buffer Size in bytes". You would therefore assume you can send more than one byte at a time. Have you tried sending CA00 6900 0400 0A00 4101 0000 0000 0000 with a buffer size of 16 bytes?