03-19-2021 11:01 AM - edited 03-19-2021 11:15 AM
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?
Exporting the Chassis start trigger on PXI_TRIG_1:
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.
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:
Excerpt from *.nivssdf file:
03-19-2021 11:37 AM
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: