VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronized DAQ Counter Pulse Generation

I am trying to use a DAQ Counter Output to generate two synchronized pulse trains.  In NIDAQmx two counters with a common clock can be synchronized by sharing a start trigger. 

 

Configuring the same settings in NI VeriStand 2019 R2, and it does not seem to have any impact on the Counter Output behavior. There is an unavoidable phase-shift between the two channels, as shown below. Am I missing something here? Is this a bug?

 

BryanLieblick_0-1616170468504.png

 

 

Exporting the Chassis start trigger on PXI_TRIG_1:

BryanLieblick_0-1616168952415.png

 

Then two counters on the same X-Series device are configured as follows. The behavior doesn't change if the "Start Trigger: Source" parameter is changed from Default to RTSI/PXI_TRIG_1.  I also explored different HWTSP settings for synchronization and that doesn't seem to do the trick either.

BryanLieblick_1-1616169028125.png

 

Lastly, I would like to use the .NET API to configure the counters automatically.  I noticed that there are no properties for the trigger settings (once they eventually work) in the API.  Looking at the *.nivssdf file, the names of the associated properties are listed, but accessing these parameters through the "SetI32Property" style commands returns an exception.

 

Pulse generation properties in .NET API help:

BryanLieblick_2-1616169258238.png

 

Excerpt from *.nivssdf file:

BryanLieblick_3-1616169516835.png

 

 

 

 

 

 

0 Kudos
Message 1 of 2
(1,118 Views)

Also, eventually I would like to set the "Initial Value" setting for the counter output's Duty Cycle and Frequency via the .NET API.  Any ideas on how to set this?  Currently the only place I can see this value set is shown below.  However, there appears to only be a getter for this property, not a setter.  Making the assignments below have no impact.

 

_DAQPulseGeneration.DataChannels[0].DefaultValue[0] = 25000.0; //Frequency
_DAQPulseGeneration.DataChannels[1].DefaultValue[0] =0.2; //Duty Cycle

 

VS Debug Window:

BryanLieblick_0-1616171790091.png

 

 

0 Kudos
Message 2 of 2
(1,097 Views)