LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Discontinuity problem during analog signal generation with DAQmx Task

Hello everyone,

 

We are currently facing a problem of discontinuity while trying to change the setpoint to a sinus, triangle or whatever via DAQmx tasks on our LabVIEW application during the "Execution" state (e.g the attached screenshots).

 

Capture2.PNG

 

 

 

 

 

 

 

 

 

 

 

 

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

So, in our code we are stoping the tasks if the frequence or type is changed (constant, sinus, ...). We would like to be able to change the setpoint without observing the taskes's discontinuity, any help would be aprecied.

 

Thanks a lot,

 

----------------------------------------------------------------------------------------------------------------------------------------- 

Software : Windows 7 / LabVIEW 17.0

Hardware :

Compact DAQ-9185 with following modules for the analog signals generation

- 2 * NI - 9263

- 1 * NI - 9264

 

And a NI-6221 linked to a SCB-68A for the signals acquisition

-----------------------------------------------------------------------------------------------------------------------------------------

 

 

 

 

0 Kudos
Message 1 of 5
(1,931 Views)

Hello everyone,

 

We are currently facing a problem of discontinuity while trying to change the setpoint to a sinus, triangle or whatever via DAQmx tasks on our LabVIEW application during the "Execution" state (e.g the attached screenshots).

 

 

 

Capture.PNG

 

 

So, in our code we are stoping the tasks if the frequence or type is changed (constant, sinus, ...). We would like to be able to change the setpoint without observing the taskes's discontinuity, any help would be aprecied.

 

Thanks a lot,

 

----------------------------------------------------------------------------------------------------------------------------------------- 

Software : Windows 7 / LabVIEW 17.0

Hardware :

Compact DAQ-9185 with following modules for the analog signals generation

- 2 * NI - 9263

- 1 * NI - 9264

 

And a NI-6221 linked to a SCB-68A for the signals acquisition

-----------------------------------------------------------------------------------------------------------------------------------------

 

 

0 Kudos
Message 2 of 5
(1,942 Views)

Hi Engin33r,

 

Can you attach please all your project files in order to us to reproduce your problem?

 

Thanks in advance,

 

Alexandre

 

0 Kudos
Message 3 of 5
(1,867 Views)

Hi Engin33r,

 

This is a duplicate of : https://forums.ni.com/t5/LabVIEW/Discontinuity-problem-during-analog-signal-generation-with-DAQmx/m-...

 

We will continue the conversation on the other forum.

 

Thanks

 

Alexandre

0 Kudos
Message 4 of 5
(1,861 Views)

I suspect this is a Math problem, caused by not thinking about what the concept of "continuity" means.  I can't really tell because you failed to include all of your code, but I suspect it has to do with not maintaining continuity of your waveform when you change parameters.

 

Suppose you want to play a continous waveform, and have a function f(t) that generates each point of the waveform.  An example would be a simple sinusoid, which can be parameterized by signal(bias, gain, f, phase, k) = bias + gain * (sin (2 pi f k + phase).  If you are generating 1000 points at a time to send to an Analog Output, you would generate signal(b,g,f,p, 0) through signal(b,g,f,p,999) for the first bunch, then signal (1000) through (1999) for the second, etc. and everything would be "continuous" as signal(b,g,f,p,k) and signal(b,g,f,p,k+1) are "next to each other", i.e., "continuous".

 

But now you change the frequency, or the phase.  Let's say you do this at the end of 1000 points.  For point 1000, signal = b + g * sin (2 pi f 1000 + p), but for point 1001, signal = b' + g' * sin (2 pi f' 1001 + p') and with all of those other constants changing, it is unlikely that signal (1000) will be "near" signal (1001), unless you shift the signal (most easily accomplished by setting p' appropriately.

 

Did you do that?

 

And, if the change is in the middle of a Stimulus chunk, you'll have an even more interesting problem to solve.

 

Bob Schor

 

0 Kudos
Message 5 of 5
(1,844 Views)