08-24-2020 04:22 AM - edited 08-24-2020 04:23 AM
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).
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
-----------------------------------------------------------------------------------------------------------------------------------------
08-24-2020 05:25 AM - edited 08-24-2020 05:26 AM
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).
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
-----------------------------------------------------------------------------------------------------------------------------------------
09-07-2020 09:35 AM
Hi Engin33r,
Can you attach please all your project files in order to us to reproduce your problem?
Thanks in advance,
Alexandre
09-07-2020 10:32 AM - edited 09-07-2020 10:35 AM
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
09-07-2020 11:47 AM
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