02-15-2016 11:26 AM
I built a waveform in labview and connected it to the daq write function. When I plug it up to the oscilloscope I do not get any reading. I am looking for a square wave by the way. Here is a copy of my code attached. current input voltage output is the main vi and the other two files are need to create the waveform and run the waveform through the daq.
02-15-2016 11:51 AM
02-15-2016 12:22 PM
@reggie2016 wrote:I built a waveform in labview and connected it to the daq write function. When I plug it up to the oscilloscope I do not get any reading. I am looking for a square wave by the way. Here is a copy of my code attached. current input voltage output is the main vi and the other two files are need to create the waveform and run the waveform through the daq.
You are building a 1D array that represent a waveform but it is not the LabVIEW Waveform datatype (note that it will also work with a 1D array but there are advantages using the waveform type). I just realized that you set the sampling clock to continuous so you probably want a continuous output? You should have a look at the DAQmx exemples that are shipped with LabVIEW (Help menu -> Find Exemples ... Browse directory structure -> DAQmx -> Analog Output)..Adding DAQmx Wait Until Done will probably only trigger a one shot waveform generation.
Ben64
02-22-2016 10:36 AM
Thanks sorry for the late reply had a lot of test last week. I have enocuntered a new problem when i run my vi.
02-22-2016 10:44 AM - edited 02-22-2016 10:57 AM
@reggie2016 wrote:Thanks sorry for the late reply had a lot of test last week. I have enocuntered a new problem when i run my vi.
What's the new problem specifically?
Just looking at the code, I can guess.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-24-2016 09:04 AM
Attempted writing analog data that is too large or too small. Change Minimum Value and Maximum Value to reflect the range of the channel. this is the error im getting.
02-24-2016 09:08 AM
Right, so in my last reply, I said that the sine wave is going to give you negative values (because it's a sine wave) and your output limits can't handle that. Shift the sine wave, or something.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-24-2016 09:22 AM
Yes I switched it to a square wave and it still gives me the same error.
02-24-2016 09:28 AM - edited 02-24-2016 09:32 AM
Reggie, my man, a sine wave and a square wave both have negative values.
Does your module allow positive and negative output? If so, just change your limits to allow negative. Otherwise, shift your sine or square wave so that no negative values are attempted output.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-24-2016 09:33 AM
i forgot i switched from the step function sorry haha. so what you are saying is to switch the range of the channel to reflect positive and negative channels.