Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected behavior while generating an Analog Output (AO) using a USB-6341

Hello,

I am relatively new to LabVIEW so this question might be a very simple one, let see.

I am working with a USB-6341 DAQ and I am using it to generate an AO on a single channel. The AO has the shape of a ramp starting from 0 V and reaching 5 V, the number of point to described the ramp is set usually at 1000 samples.

The issue (or unexpected behaviour) I am facing is that regardless of the value I used for "SamplePerChannel" and "Rate", there is a portion of my ramp which is at 5 V (flat) for around 50 ms. That is at the end slowing down the AO generation and it is a problem for my future application.

I attached my VI and some jpeg illustrating the flat portion of the AO (measured with an oscilloscope).

Is there any way to go around that issue and make my AO being only my 0 to 5 V ramp?

Thanks,
Michael

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

(One attachment each is usually sufficient. Please ask the moderator to remove the duplicates to avoid confusion. Thanks)

 

When attaching example code, make sure that all controls have typical default values (do you know how to do that?). Also note that there is "ramp pattern"t o replace your weird FOR loop. (Start/Stop and the related math would belong before the loop unless you expect the values to change during execution of the loop, which seems unlikely and undesirable). Your VI does not have a toplevel loop. Are you using "continuous run? (that would explain a lot).

0 Kudos
Message 2 of 5
(2,510 Views)

Hi,

 

Thanks for the advices. I know the ramp pattern function. I used here a FOR loop just because in the future I might have more complex voltage pattern.

 

I have check that all controls are with default value (see attached new file).

 

Yes I am using continuous running.

 

Best regards,

Michael

 

 

 

0 Kudos
Message 3 of 5
(2,498 Views)

@Michaelll wrote:

Yes I am using continuous running.


Stop doing that! This is a debugging tool, not a valid way to run a VI. (There is nothing continuous, it just starts over whenever the code completes). You are basically restarting and configuring the AO from scratch with every new run, which takes time. If you want continuous output, only the AO tool belongs inside a (while) loop. There are also tools for continuous generation. (Sorry, I don't have any DAQmx installed, so I cannot look into this further.)

0 Kudos
Message 4 of 5
(2,489 Views)

Hi,

I am answering only to keep the question open so someone else might help me on that.

 

I modified the vi so ow it is running with a normal loop execution and not run continuously.

 

Please see attached updated vi

 

Best regards,

Michael

 

 

 

0 Kudos
Message 5 of 5
(2,454 Views)