LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

please help on analog sig gen for 1.2 ms

Solved!
Go to solution

Hi guys. I need your help on generation analog voltage for 1.2 miliseconds. I really do not know about generation/maninupulation of waveforms. I tried to modify two examples as I attached but I was unsuccesful. I tried to modify frequency input for waveform generation, however, I cannot manage it 😕 I tried to access examples/references/answers from net, however, I cannot find any helpful stuff. Could someone modify one of this vis for me to generate finite analog voltage for specified time in miliseconds. Is there any good resources to learn analog signal generation/manipulation you can suggest? I appreciate in advance.

Egemen
0 Kudos
Message 1 of 16
(3,709 Views)

You've already asked this twice http://forums.ni.com/t5/LabVIEW/analog-voltage-generation-for-1-2-ms-problem/m-p/3145950

 

Can you be more specific about what you are having problems with? You made it sound in the last thread like Bob had you all fixed up.

0 Kudos
Message 2 of 16
(3,693 Views)
Hi Taki1999. My answer to Bob is full ironic. His reply is nothing more than chunk. Anyway, I cannot managed to modify example vis to my desire as I said in the thread that you are aware.
Egemen
0 Kudos
Message 3 of 16
(3,675 Views)

OK. So let's hear more about your desires.

What sort of analog signal do you want to generate? Square? Sine? What frequency do you want to generate?

Are you able to generate any voltages?

Have you done any DAQmx tutorials?

Have you been able to produce any voltages using tasks in NI-MAX?

 

Just reposting the example VIs doesn't show much about what you've tried on your own. It doesn't look like you've tried the suggestions given in the other threads.

 

P.S.: Don't tick off Bob. He gives good advice and is relatively polite.

0 Kudos
Message 4 of 16
(3,668 Views)
Analog voltage signal for 1.2 ms. It's signal type is square. It is finite signal, I want to generate it on demand. I do not adjust the frequency, but it must be once 2.4 ms like 50% duty cycle to get 1.2 ms regarding square signal. But the am not sure.

I am familiar with labview and generating signal just by software timing. I have done a huge project controlling a variable speed compressor, but timing is not too important for this project and software timing is enough for it. Anyway, I have never been worked with hardware timing with waveform manipulation. That's why I stuck in this basic job.

I have done many tutorials on labview but not based on hardware timing. I really do not understand how the hardware timing works and communicate via the program. If I the project does not need to deal with timing control lower than 1 ms, I would not try to use hardware timing.

When I try to manipulate the examples in which the suggestions, I will come across some errors from the daq. I do not remembered the codes now, but they are relevant to memory. I can check it again when I am available.

P.S. I was too kind to Bob, wasn't I? I didn't say any rude word and I thank to him for his valuable advises.
Egemen
0 Kudos
Message 5 of 16
(3,658 Views)

Maybe it's just a language barrier thing. Does the following make sense to you?

DAQmx write example.png

 

0 Kudos
Message 6 of 16
(3,647 Views)

To quote this Bob character,

 

 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.

 

I'm not sure what he had in mind by an Experiment VI, but it may have been something like this -- here is an example of two (!) generated Analog Voltage Signals, a 2Hz Square Wave and a 5Hz Sinusoid.  Instead of sending them to some DAQ Device (which you might not have lying around, and even if you did, how would you know what it was doing?), you could send them to an Indicator of some sort.  It is extremely quick and easy to rig something up like this, you can test it, see if it works as only you know it needs to work, modify it, tinker with it, and when it "does the right thing" with LabVIEW indicators, see how you can translate this to DAQmx.

 

Bob Idea.png

BS (who is this Bob guy, anyway?)

0 Kudos
Message 7 of 16
(3,635 Views)

@newbieeng wrote:
Analog voltage signal for 1.2 ms. It's signal type is square. It is finite signal, I want to generate it on demand. I do not adjust the frequency, but it must be once 2.4 ms like 50% duty cycle to get 1.2 ms regarding square signal. But the am not sure.


I can't even begin to guess what output you're asking for here.  Can you post this in your native language so we can translate it.  Or even better,  provide a picture of the signal like it would appear on an oscilloscope showing the timebase and amplitude.  It is very easy to create a constant of a waveform to feed into a one-shot DAQmx program but we need a better description of what output you need.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 8 of 16
(3,626 Views)

Hi everyone. I really do not understand what is too diffucult to understand about the problem. Anyway, I put a graph represents the analog signal that I wan to generate.

 

It seems that Taki1999, you have not looked at the VIs that I attached in the first thread. There is no difference between your suggested vi and  "Gen finite waveform trial.vi" that is included in the attachment. Anyway, thanks again.

 

By the way, I am using NI USB X 6353 for that task.

 

signal.png

Egemen
0 Kudos
Message 9 of 16
(3,606 Views)

I also edited the waveform parameters in the "Gen finite waveform trial.vi" that is attached in the first thread. However, when I decrease the duration parameter too much (magnitude of ms) chart looks like weird as it seen in the attached image. Am I in the right way to get 1.2 ms by changing the frequency and sampling frequency?

 

waveform manipulation.png

Egemen
0 Kudos
Message 10 of 16
(3,590 Views)