LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with the generation of time-varying analog output signals

Hello all,

unfortunately I have a problem with the generation of time-varying analog output signals with the MyDAQ.

 

A defined voltage curve is to be given at different intervals via the analog output. With one signal alone this worked well with stopping and then restarting the signal output as soon as the trigger was set.

But now the problem is: I have to output two independent pulses, which are triggered by two different triggers. If they happen to occur at the same time, their voltage values should be added. I have stored the two courses in an array each and read out the next value from the arrays for the output of the values and add them.

Unfortunately, the voltage that I read in via the analog input does not match the expected results at all.

 

Can you tell me where my thinking error is? I'm afraid it has something to do with the timing or my method of signal output, but I just can't find the error.

 

Best regards
Josi

0 Kudos
Message 1 of 8
(1,249 Views)

Hi Josi,

 


@J0SI wrote:

But now the problem is: I have to output two independent pulses, which are triggered by two different triggers. If they happen to occur at the same time, their voltage values should be added. I have stored the two courses in an array each and read out the next value from the arrays for the output of the values and add them.

Unfortunately, the voltage that I read in via the analog input does not match the expected results at all.

 

Can you tell me where my thinking error is?


Mind to share your VI?

And please define the term "triggers"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(1,246 Views)

Hi GerdW
I am so sorry, I just saw that it was not uploaded in my post and added it again.

 

Best regards
Josi

0 Kudos
Message 3 of 8
(1,238 Views)

Hi Josi,

 

unfortunately you are using a very recent LabVIEW version.

Mind to attach a downconverted version of your VI (File->Save for previous)? (I prefer LV2019.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(1,204 Views)

Hi GerdW,

 

yes of course, gladly, here is version for LabVIEW 2019.

 

Best regards,

Josi

 

0 Kudos
Message 5 of 8
(1,194 Views)

Hi Josi,

 

thanks for conversion!

 

See this:

How do you make sure both input arrays have the same (and sufficient) number of elements?

How do you know the shift registers ALWAYS start with valid values?

 

Why were there so many orange wires when you want to handle integer array indices?

Why do you need expression nodes when there are simple and equivalent math functions, like "+1"/"-1"?

Why are there indicators with generic labels or even worse without a label?

Why do you multiply with "0" and "1" in your formula nodes? The results of those operations is known at edit time (aka Rube-Goldberg)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(1,172 Views)

Hi GerdW,

thank you for your time and feedback. Regarding your questions:
1. i wanted to set the size of the array for the output by the variable length, which limits the length of the output array section, for both arrays equally.
2, 3, 4, 6. thanks for the hint, i have adjusted these points now
5. these indicators are only used for error detection, they should not be part of the later VI... so I didn't spent time on labeling them.

Best regards
Josi

0 Kudos
Message 7 of 8
(1,156 Views)

I have made the

  • adjustments as described above and also set the
  • output to finite samples and
  • inserted a write output before the start of the output, so that data is available at the start of the output.

Now the time interval of the output of the array seems to be correct, but the measured output is still too long (if I set the values to 10 for dt and 20 for dT i have an interval of 30 instead of 10 for dt measured at the ai).

I tried to solve this timing problem via the onboard clock (by setting my loop for the onboard clock to true) but then I don't get any voltage drop at the ai at all.

0 Kudos
Message 8 of 8
(1,148 Views)