Jump to content
  • 0

DEMOx.DAT files using cbw64.dll



I have been using this somewhat hidden feature of InstaCal for many years now, but as I am migrating from 32-bit to 64-bit build of my project, I find it does not work for 64 bit. Years ago, someone at MCC sent me documentation to create a DEMO0.DAT file from a source of raw data. I imagine this information is what is used in the cbFileAInScan() routine. I can't use that routine in my code, my approach is to take the raw data created by my users, stored in my proprietary binary file, and write a DEMO0.DAT file to allow me to 'replay' this session through Instacal during development and debugging. So, my question is, does anyone know how I can get hold of the API/file format information to create the DEMO0.DAT file in the 64-bit world? Maybe all the integers (see below) are just twice as big as they used to be?

Here is the info I got from someone at MCC years ago. When I call their engineers today, they tell me that function never worked and is no longer supported. Well, it DOES work in 32-bit version up to the latest InstaCal as far as I can tell.

  Here is the format of the binary file:
  ASCII Identifier (20 bytes) = "CB Raw Data File  \r\n"
  ASCII Date String (10 bytes) - date file was last written to (07/24/19\r\n)
  ASCII Time String (10 bytes) - time file was last written to (12:18 am\r\n)
  Low Chan (integer - 2 bytes) - Low A/D channel scanned
  HighChan (integer - 2 bytes) - High A/D channel scanned
  HzRate (integer - 2 bytes) - Hz component of sampling rate
  kHzRate (integer - 2 bytes) - kHz component of sampling rate (0 for 100Hz total)
  TotalCount (long - 4 bytes) - Number of samples in file (e.g. number (Hichan-LoChan) x # records)
  TriggerIndex (long - 4 bytes) - Index of trigger sample (set to zero)
  GainCode (integer - 2 bytes) - Gain code for A/D
  SkipCount (integer - 2 bytes) - Number of bytes to skip to first data point
  NotUsed (SkipCount bytes)

  Data (TotalCount integers)


Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...