Jump to content
  • 0

DEMOx.DAT file for MCC's InstaCal


CaseyB

Question

I develop software from home for several labs using MCC dacq boards and the Universal Library for C++. These laboratories run my proprietary software to collect data for physiological testing in (mostly) exercise physiology laboratories. The software is quite specialized and requires a $70,000+ instrument called a respiratory mass spectrometer. It is WAAAY beyond my budget to set myself up with one at home. So I have relied heavily on being able to do 'repolays' of data acquisition sessions to convert the raw data they send to me in proprietary-formatted binary files into DEMO0.DAT files, using information shared by one of the kind engineers at MCC years ago (probably 5+). BUT the 64-bit version of Instacal apparently does not read these files, or they are in a different format. This means I am stuck as I rely on this feature heavily. Is there any chance either a) someone can share the 64-bit version of the file format (in case it still works) or b) resurrect that feature?

Thanks for your help and support!

Just FYI, here is the information I use to construct DEMO0.DAT files extracted from my proprietary-formatted binary raw data files (usually sampled at 100 Hz per channel).

  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

2 answers to this question

Recommended Posts

  • 0

Hello @CaseyB.

The attached DEMO0.DAT file is a real-world sample file and it worked with InstaCal v6.73 (a 32-bit application), on my Windows 10 64-bit system.  It was already posted on this forum via the following link.

DEMO0.DAT

Save the DEMO0.DAT file to your target system's 'C:\Program Files (x86)\Measurement Computing\DAQ\' folder.  Afterwards, launch InstaCal.  Click on the 'Add Board' icon.  Next, click the 'DEMO' tab and add the default 'DEMO-BOARD'.

image.png

 

Go back to InstaCal's main page and double click on the 'DEMO-BOARD' to open the 'Board Configuration' window.  Set all eight channels on the demo board to 'DEMO0.DAT'.  Click 'OK' to close the configuration window.

image.png

 

From InstaCal's main menu, select 'Test' followed by 'Analog'.  Select an input channel to view the saved data.

image.png

 

Test this DEMO0.DAT file on your Windows 64-bit system and let us know whether or not it works.

Regards,

Fausto

Link to comment
Share on other sites

  • 0

Thanks for your response. This is a very lengthy response. What you sent me does not answer my question. What I will try to show below is first, that the Instacal and DEMO-BOARD work fine in my 32-bit version of my program. But when I compile and run in 64-bit, it does not. So IO repeat my questions: 1) does the 64-bit Instacal cbw64.dll support replaying data using DEMO0.DAT files; and 2) if so, is there a new file format specification you can send me so I can generate such files from my user data?

I made sure I have your ver 6.73 installed, and I am running the 64-bit Windows 10, all the latest updates applied. Note that Instacal is a 32-bit program (as you point out, it is installed in c:\Program Files (x86)...., the standard location for 32-bit programs in Win64), but the install package comes with a 64bit version of the .dll file that one can link into a custom program. My custom program runs fine in  64-bit version doing raw data acquisition, it just does not work replaying DEMO0.DAT files. Details:

Here is the DEMO board using a sine wave:

image.png.74369cfffb33d9600cade623de6ad241.png

Here is image from my custom 32-bit program using cbw32.dll, demo board and the damped sine wave:

image.thumb.png.c13ee0bfcfb3e6473dfff324324ca974.png

Now switching to your DEMO0.DAT file, I dont get anything using the Instacal test, loopback, but my program does see data. Is there something wrong with my setup there?) This is channels 2 and 3 in the top panel and 4 and 5 in the bottom. Channel 5 appears to have nothing, and I did not see anything in channel 0. Note the units in these graphs are physiological units, NOT VOLTAGES. And, BTW, these signals look a lot like a human subject breathing, gas channels in 1 & 2 and some kind of flow signal in chan 3! How did you generate this file?

image.thumb.png.ae10c7322565e7f2977113cd50a31676.png

Now here is a 'replay' of data one of my users sent. I created this DEMO0.DAT file using the algorithm in my OP. Still Instacal ver 6.73 using cdw32.dll:

image.thumb.png.089f46d1c40054ee187368ad6f28f249.png

Top two panels are chans 1 & 2 showing two flow signals generated by a human breathing. Bottom two are O2 and CO2 from a mass spectrometer. You can clearly see the breathing cycle in both panels. Instacal shows nothing in the loopback test. Am I doing something wrong with setup there? Clearly it is working, but instacal shows nothing.

Now I compile my program as a 64-bit. That means it now uses cbw64.lib to compile and therefore cbw64.dll at run time If I try to build with cbw32, it does not compile, I get compiler errors that none of the calls to MCC are present (e.g. cbAInScan, the one I use the most...). Here is output from my program using the DEMO board and the sine wave.

image.thumb.png.33f6bbc0f656b7d8c210b253c37466f8.png

Clearly, the 64-bit dll still has the sine wave feature. But using your DEMO0.DAT files shows nothing (even though it worked fine in the 32-bit, see above):

image.thumb.png.a82298626396c0011f4cfc174e288a70.png

And, finally, a DEMO0.dat file generated from user data by my program, which again, worked fine in 32-bit, gave same output as above.

See my questions to you at the top of this response, and see my original post for the file format information I use to create DEMO0.DAT files.

 

 

 

 

 

 

Link to comment
Share on other sites

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...