LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

analog voltage generation for 1.2 ms problem

Hi everyone,

 

I am trying to generate finite analog voltage for 1.2 ms with NI 6353 USB X by adapting an example vi, Voltage - Finite Output.vi. I have opened an thread relevant to generation here however, none replies anymore. I am testing the vi functionality with a led which is connected to one of AO channels. I realized that led always remains on with the same period of time. I attached the modified vi. For instance, when I tried to generate voltage for 3000 seconds by entering the "pulse timing [ms]", led does not remain on position for 3 seconds. I do not understand what is wrong with it? Could you help me on this?

Egemen
0 Kudos
Message 1 of 4
(3,381 Views)

You probably should have just bumped your old thread.

In any case, your math looks wrong. You're generating a Waveform using the Basic Function Generator with SampPerChannel samples with a dt set to the SampClk.Rate. That's ok but then you wipe out that Waveform by squashing dt.

Why not just build a waveform with a dt of 1.2 ms and a Y array that goes [0,target,0]?

0 Kudos
Message 2 of 4
(3,369 Views)

You don't seem to know much about LabVIEW, nor understand how to write a LabVIEW program.  When learning LabVIEW, it is often a good idea to write little Experiment (or Test) VIs that don't use hardware.  For example, instead of trying to turn on a real LED connected to an NI USB 6353, why not try "turning on"  a Boolean control on your Front Panel?  You can play with timing, waveform generation, etc. and see if you can "light" your LED.  You can also skip the LED entirely, and wire a numeric indicator so that you can see the actual values (and watch them change).

 

Once you have the basic logic worked out, and know how to generate a signal of the appropriate size and timing for your task, take that output and try to connect it to your output device.

 

Bob Schor

0 Kudos
Message 3 of 4
(3,345 Views)
Yeah Bob, thank you very much. Your suggestions are very helpful. I have had a very very big step forward with the help of your precious and priceless advices, thanks again!.. This is a milestone for me!..
Egemen
0 Kudos
Message 4 of 4
(3,326 Views)