03-25-2019 05:25 AM
Hello everyone,
I'm using LabView 2017 and I need help making a very simple program in Labview. I'm using an external clock signal to syncronize the generation of an output signal. I'm using MC USB-1808X and a square wave generator as the external clock; with the Ulx library, I was already able to syncronize a Delta-Ramp in output with this type of clock, but I eventually need to use an array.
The problem is that what is passed in output is only the last element of the array; I don't understand what is wrong since a pre-build function as Delta-Ramp is sending out an array as expected, but in this case it doesn't work. I started using LabView two weeks ago, maybe the solution is obvious but I really can't see it.
Please take a look at my VI, this problem is really holding up my research.
03-25-2019 08:10 AM
Well, with two weeks of LabVIEW, you are not ready to start using it in your "research". You need to learn LabVIEW. Here are some comments:
Bob Schor
03-25-2019 08:46 AM
The device outputs correctly when I use a waveform instead of the array I'm passing, I have ,obviously, already tested it with an oscilloscope using a signal generator which is setted as external clock (connected to the correct pins of the device). I have already used this program with DAQmx commands and another DAQ (which was from NI), it worked as I expected; with the USB-1808x, the functions from Ulx which substitutes DAQmx are not working. The analog write only writes the last element of the array; it should write a new value in synch with the external clock as it was done with, for example, the Ramp by Delta. It happen a strange event this morning: LabView failed and quitted, and the output signal was sent correctly to the oscilloscope, doing up and down ramps as written in the code.
I am working on a master's thesis, despite being new to LabView I have a deadline for this part of the project which is for the end of this month; meaning that I can't really start to learn labview from the basics.
03-25-2019 08:57 AM
03-25-2019 01:54 PM
I solved this problem in a different way today, by putting the Ulx function "Start" into a while loop. I don't know if there is a more efficient way, but with a 1 kHz external clock the output signal is correct: each step of the ramp has 1ms lenght as expected. I post the code here in case anyone encounters the same problem, but for sure it is possible to do a better VI for this task. Thanks for the help!