09-04-2018 01:21 PM
Hi, everyone.
I am completely new to LabView, and pretty new to programming in general, and am having some issues creating this VI. We are trying to create a waveform, then excite an analog port, which will trigger our camera. The camera will then provide a voltage output every time it captures a frame. I would like the actual playing of the waveform to be triggered by this output. I am getting an error message when I try to run my VI and I'm not very confident about the conditional formatting I've put together.
Another thought was to create a variable, which would change in value according to whether our conditional statement is satisfied. Basically:
X=0
If *trigger conditions* = true then
X=1
If X=1 then
*play waveform*
X=0 (until we run the VI again)
Appreciate all feedback! Thanks!
Solved! Go to Solution.
09-04-2018 01:49 PM
What error message are you getting?
I could not run your program because some dlls are missing, but you can see that there are some broken wires...
09-04-2018 01:51 PM
Possible reason(s):
Write cannot be performed when the task is not started, the sample timing type is something other than On Demand, and the output buffer size is zero.
Call DAQmx Start before DAQmx Write, set auto start to true on DAQmx Write, modify the sample timing type, or change the output buffer size.
Task Name: _unnamedTask<23>
09-04-2018 01:57 PM
Thank you for the help. I am not seeing any obvious broken wires, is it possible you could provide me with an example of where? Thank you again, new to labview!
09-04-2018 02:01 PM
Try to use a Start Task function between Trigger Configuration and Output array for loop.
"Call DAQmx Start before DAQmx Write"
09-04-2018 02:32 PM
You mention problems "creating this VI". The VI you attached is one that NI created as a "Do Everything" example -- you want to Start Simple and make As Messy As Necessary (but no messier!).
There are several things going on in your description, most of which are not in the Example code, and are not so well described or thought out. Sometimes it helps just to make a list of the things you want to do, then to think about how you might do them.
Juggling these multiple conditions may sound complicated, but once you have them written down and spelled out (please don't take shortcuts -- open a Text Editor and make a (formatted) list that you can post to the Forum), you can think about how to organize the various pieces. I would suggest starting without a Camera, without a DAQ Device for generating/recording pulses and other waveforms, but with simple logic and "dummy" (or "simulation") VIs for the Camera, Pulse Generator, etc. so you can test out your logic and simulate the timing.
Speaking of timing, the last Bullet point talked about playing the Waveform at the end (or beginning?) of each Frame. If you are taking a Video at, say, 30 fps, and are playing an audible sound (say a 1KHz tone), then it needs to be pretty short, as a new frame occurs every 33 ms (beep, not beeeeeeeeeeeep).
Looking forward to your responses.
Bob Schor