02-05-2019 04:37 AM
Hi
I've made a VI which repeatedly triggers a 140ms sawtooth waveform off a TTL pulse on PFI0. The trigger signal coming in on PFI0 is a ~30Hz pulse train (pulse every 33.333 ms) and so only every 5th trigger signal is detected which is the behaviour I want. There should be ~27ms for the system to 'rearm' after the waveform finishes playing (i.e. (33.333 * 5) - 140ms). This works most of the time, but it is missing an occasional trigger which is screwing everything up. I have tried 'compiling' the VI, and also running it on a dedicated Windows 7 PC with no antivirus etc and all possible programs closed, but none of this helps. I notice that when I move the window of the VI around this also causes triggers to be missed, but this also happens with no interaction with the computer. This is my first LabVIEW project and so I might be doing something stupid. Is there any way to increase the reliability? The DAQ I'm using is a NI PCIe-6321. VI is attached.
Any suggestions much appreciated!
Adam
02-05-2019 07:27 AM
I can't open your code because I'm on LV 2016. Odds are, you're stopping and re-starting your task with software calls. Even 27 msec isn't necessarily enough time under Windows for this to be fully reliable.
What you should do is to make the task re-triggerable in hardware. There's a DAQmx Trigger property node that'll let you set the "Retriggerable" property to True. You'll find it at "Start-->More-->Retriggerable".
-Kevin P
02-05-2019 08:06 AM
Thanks Kevin. Yes that sounds right, but I don't see the property you're talking about. I've attached a vi saved in what should be an older version of Labview. Maybe this because I'm using the DAQAssistant?
Adam
02-05-2019 09:17 AM - edited 02-05-2019 09:25 AM
Lose the Express VI's and DAQ Assistant
The Express VI's were written ONLY for use in those LabVIEW sales pitches seminars to show how fast you can just "throw something together" in LabVIEW.
BTW: I am betting the DAQ assistant is opening and closing the DAQ task every single time your loop iterates and that's why you are occasionally missing triggers