New Reply

Genie 2000 Programming Library

 
Share Thread
Oct30-12, 04:36 AM   #18
 

Genie 2000 Programming Library


Quote by 0x0000eWan View Post
Hi,
I've finished processing cnf files. It's working fine for new version cnf files, but in old version ones, there are issues with realtime, livetime, dates and calibration values. It's easy to change code to work with old cnf files, but i wanna my app to be universal and can be used for both kinds of cnf files. I didn't figured out how to clearly determine which file is old and which is new, but I'm working on it ;) I'm sending you my code written in Delphi. It's quite messy because i used it only for testing and then rewrote it to another app, but i hope it will help you. I'll send updated version when I complete it.
There are no "old" and "new" versions of the CAM (cnf) file format, there is only one and it is quite old. What is happening is that you are relying on fixed offsets to read parameters, spectral data, etc. and CAM files are much more complex than that. They have a filesystem-like structure, with "directories" to locate parameters, spectral (or any other) data, as well as an allocation bitmap and some other stuff. Neither the spectrum nor the parameters are at a fixed address, and neither they have to be contiguous inside the file (most of the time, for example, the spectrum is not!) All that was inherited from VMS (where Genie originated), which supports files with complex structure, unlike Windows. I don't think even CANBERRA has today the complete description of the CAM format...

A newer version of Genie might seem to generate a different "version" of the CAM file, simply because is saving a different number of parameters or in a different order. If you create the CAM file in VB using the CANBERRA SDK, chances are that you will not be able to read them back with your code. Even when using the same version of Genie, changing something as the detector type or a setting somewhere can cause your code to fail.

The best way to read the CAM files is by using the CANBERRA libraries, otherwise you'll be reinventing the wheel (and believe me, is a complicated one). CANBERRA has an SDK consisting of a set of COM components and C libraries that can be used with VB or C++. IIRC, the pcam.dll in the EXEFILES directory is the one that does all the low-level access. There should be also a sad.dll file or similar that can be called from C to access files and devices. The documentation is available from CANBERRA (usually comes with the Genie distribution).
Oct30-12, 09:23 PM   #19
 
Hi hperaza,
I've finished work 2 days later after I posted previous post on forum. I managed to get everything I needed from cnf files, but I just didn't have time to update my solution. I did all this work because of clients which aren't licenced to use canberra software, but still wanna use our software. But anyway, thanks for your post, I'm sure it will help someone else trying to accomplish what I did :D

Btw it seems even canberra doesn't know, how cam files actually work :D
Nov7-12, 07:50 AM   #20
 
Quote by 0x0000eWan View Post
I did all this work because of clients which aren't licenced to use canberra software, but still wanna use our software.
If you own a CANBERRA license, I believe you can use their COM components in your application and distribute it the same way you use third party components in a VB or .NET application. After all, CANBERRA applications require a hardware key to run. What can happen is that your clients will not be able to connect to a detector or to save CAM files (for that they'll need a key), but they should be able to read the files without problems.

And you're right. I don't think CANBERRA knows how the CAM file works, since they did not invent it.
New Reply

Similar discussions for: Genie 2000 Programming Library
Thread Forum Replies
Super Nintendo Game Genie Codes Computing & Technology 10
Genie 2000 - CAM files Nuclear Engineering 1
A.D. 2000 as seen from 1966 General Discussion 9
Genie and 3 wishes. General Discussion 33
2000 posts!! General Discussion 9