05-09-2016 10:26 AM
I'm trying to output a square wave with frequency 100Hz and a duty cycle of 98% but when I do this with labview I just read a flat 5v's and don't see any edges. I can output the square wave using NI ELVIS(and having it work) so I figure it should be doable with labview. Any sudjestions on how to make this work would be great thanks. I will atach my vi file.
Solved! Go to Solution.
05-09-2016 12:13 PM
Your attached VI shows a DAQ Assistant with no input device wired. Are you not using the NI ELVISmx library for your myDAQ device?
Bob Schor
05-09-2016 12:38 PM
Uhmmmmm...
you have a 1000 sample per second task with 100 samples being written.
Lets just check this box and make it a bit simpler:
05-09-2016 12:44 PM
Alright I have the box checked now.
05-09-2016 12:46 PM
I'm using an external oscilloscope to measure the output and I belive I'm using the NI ELVIS mx libary.
05-09-2016 12:59 PM
When you enter the duty cycle, be sure and enter it as 0.98, not 98. You can add a Waveform Graph indicator and you can see what the signal out should look like.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-09-2016 01:11 PM
Alright I tried the .98 and put it on the graph this is what I get.
05-09-2016 01:13 PM
If this would be easyier to do using a digital output I would be open to that method aswell.
05-09-2016 01:20 PM
Something is clearly wrong. What happens if you use 0.5 and 50? Do either of them look like 50%? If so, that tells you where the decimal point goes. Then you can try 75%, 85%, 90% to see where it breaks down. When you have the answers, post them, along with your current code (please post the VI, not a picture).
Bob Schor
05-09-2016 01:24 PM
Okay so I have something that appears to work but I feel as theres probably a more elegent way of preforming it
here is the output.