02-26-2008 12:43 PM
02-26-2008 02:21 PM
Jakeus,
Your CVI code looks good. HWS files can contain many individual wfms in a single file, however the Digital Waveform Editor is only capable of reading HWS files that contain ONE waveform.
It is perfectly reasonable to have a single wfm in HWS that has 80 nodes and 20k samples. HWS was designed to support very wide digital patterns, and 20k samples is a very small number. HWS can handle millions of samples. Also, if you keep all 80 of your nodes in one waveform datatype, than the DWE can read all 80 nodes.
Is there a reason you want to break up the 80 nodes?
-Jared
02-26-2008 04:04 PM
02-26-2008 04:37 PM - edited 02-26-2008 04:40 PM
The way you write large sets of data to an HWS file is to do repeated writes on smaller chunks of data.
In your 50,000 sample example, you could initialize just 1000 samples (with 20 nodes) and then in a for loop generate the data for just 1000 samples and call niHWS_WriteDigitalWDT to write those 1000 samples.Set the For loop to run 50 times.. The niHWS_WriteDigitalWDT will automatically append each 1000 sample segments to the end of the waveform. So after calling niHWS_WriteDigitalWDT 50 times, you end up with one waveform that is 50,000 samples long.
If you have NI-HSDIO installed, I beleive there is a "streaming data to disk" example that shows how to do this.
-Jared
02-26-2008 07:36 PM