02-03-2020 05:14 PM - edited 02-03-2020 05:35 PM
Hi,
I am having trouble wiring my digital trigger to the analog output. I am attaching a portion of the labview program I am modifying...in short, trying to get Dev1/ctr2 to control Dev1/ao1. The top portion does not make sense nor work, but it is my attempt to incorporate the digital edge module.
Thank you.
Edit - the analog waveform I am triggering is being read from a data file (table) that I've created outside the program. Ultimately, I want a 1 second square pulse wave (digital) aligned with a 3 second custom waveform (analog).
Solved! Go to Solution.
02-03-2020 05:56 PM
First off, please attach code as we cannot debug pictures.
Next, it's unclear as to what you're doing. Are you generating the square wave, or is it coming from somewhere else? If you're generating it, you can share a StartTrigger between the two tasks. If it's coming from somewhere else, you can use the Start on digital edge trigger. For that, you'll need to wire the trigger source (i.e., which pin you want to use) to the Start- Digital Edge trigger.
I recommend looking in Help -> Find Examples, then Hardware and DAQmx. There are many very good examples there. I would recommend you start with one of those and modify it to meet your needs.
02-03-2020 06:15 PM - edited 02-03-2020 06:44 PM
I've attached our entire code here.
To answer your questions: yes, we are generating both the square wave and analog wave. I'm having trouble understanding how to properly wire the Start Trigger module, or another method of synchronization between the digital and analog signal.
If you could direct me to an example, that would be helpful as well. I have yet to find something that matches our needs, so I'm looking for any lead.
Thank you so much in advance.
Edit - I'm also attaching the excel file required to run the program here.
02-03-2020 07:50 PM - edited 02-03-2020 07:50 PM
Ok, a set of possible changes. Hopefully you can try them and see if they work - I only checked they don't have errors:
There are other improvements that could be made, but hopefully that will get you started.
02-03-2020 10:58 PM
Wow thank you!! Much appreciate your help. I will try this tomorrow.
02-04-2020 05:25 AM
One more improvement for you:
Be sure the AI task gets started before the counter task that's going to trigger it.
-Kevin P