From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VirtualBench

cancel
Showing results for 
Search instead for 
Did you mean: 

Can VirtualBench be programmed in C (Or anything other than LV)


@gludev wrote:

If I use digital IO as a trigger for my measurement the VertualBench report following trigger point:  'timestamp': (1433170387L, 0.199386852), 'T0': (-2082844800L, 0.0). Why is T0 negative?


You can call niVB_ConvertTimestampToValues to convert those values to more understandable formats.  When you do that, does it make any more sense?

 


@gludev wrote:

The function niVB_MSO_ReadAnalogDigitalU64 takes uint64_t* digitalData as parameter. Which elements does digitalData have and at which positions?


From the C Reference Help.

 

Logic Analyzer Data

Logic analyzer reads returns parallel arrays of data and timing information. The logic analyzer data is represented as a 64-bit integer, with each logic analyzer line corresponding to each bit in the integer. If a line is disabled the value for its bits will always be 0. The logic analyzer timing array indicates the offset of the sample from the initialTimestamp. The units of the timing array are in sample periods. This can be retrieved by calling either niVB_MSO_QueryTiming or, if you have configured the digital timing to be separate from the analog timing, niVB_MSO_QueryAdvancedDigitalTiming. The initialTimestamp is represented as a timestamp.

 

Does that help?

------
Zach Hindes
NI R&D
0 Kudos
Message 31 of 32
(2,652 Views)

For each element in digitalData:

  • bits 0 through 31 correspond to mso/d0 through mso/d31.
  • bits 32 and 33 are mso/clk0 and mso/clk1.
  • bit 37 is fgen/start
  • bit 38 is powerfreq
  • bit 39 is trig
  • bits 40 through 47 are dig/0 through dig/7

All other bits are unused. If a channel is not enabled for an acquisition, the bit for it will be 0.

 

(I'm still looking at your other question about T0.)

——
Brandon Streiff
ni.com/compactdaq · ni.com/daq
0 Kudos
Message 32 of 32
(2,649 Views)