02-14-2013 04:35 AM
Greetings,
I'm using a DAQ Assistant to output a 0-5V signal. I added a Triangle Pattern to the input of the DAQ Assistant.
The point is that I do 0-5V and then back to 0V. But the problem is that the DAQ Assistant just stops at 1V.
P.s. I have the DAQ Assistant in a For Loop
Thanks in advance
Solved! Go to Solution.
02-14-2013 06:23 AM
Can you share your code? We would be purely guessing otherwise.
02-19-2013 05:23 AM
Greetings Innervision,
Can you give an update on where you stand with this problem and whether or not you will be needing additional assistance?
There is a reference example that ships with LabVIEW which shows how to output a triangular signal with a DAQmx device. This one should be a good starting point.
The name of this example is 'Voltage - Continuous Output.vi'
Kind Regards,
Wouter
National Instruments
02-20-2013 07:18 AM
I'm still having the same issues. Not quite sure how to solve it. Maybe it's a hardware issue with the DAQ Assistant?
I've added an image of the block diagram.
02-20-2013 07:56 AM
Hello Innervision,
Can you share the VI with us?
Without it it's impossible to see what you have configured inside the DAQ Assistant?
This will allow us to test (and resolve) your issue in an efficient way.
02-20-2013 08:03 AM
I've added the program with this post 🙂
02-21-2013 04:05 AM
Hello Innervision,
Thanks for sharing the code!
This already helps me understand what is going wrong.
The only I don't completely see (based on your code and explanation) is what you actually want your code to do.
The things I need to know are:
- What do you want to do when you press start? (My guess: start the outputting)
What should happen when you press it a second time? (My guess: Start again with outputting)
- What should happen when you press the stop button? (My Guess: Stop the complete application)
- What is the exact goal of the while loop? (My guess: continuously show the evolution of your measurement signals)
- What should happen when you press the report button? (My guess [based on your code]: Output the last 60 samples that were added)
This seems unusual so this guess can be wrong.
- Do you want your code to keep on running after you press on the report button? (for example: do you want to be able to start a new Voltage Output?)
Thanks for your feedback!
02-21-2013 10:39 AM
Thanks for helping me out!
I want the program to start outputting the triangular signal while also starting the acquisition of data. The start doesn't have to be pressed twice.
The "Stop" button is there in case of emergency, making the voltage 0V.
You are right about the while loop for the evolution of the measurement signal, the program suggested that I'd do this so I did this.
I'm just maybe struggling with the loops, it could be simpler maybe..
The report button ends the data acquisition and also prompts for the logfile to be saved. I think there should be an easier solution, I just want all the acquisitioned data to be saved to a .tdms file when the triangular pattern has finished.
Normally it should only run once, so it should not be able to start again without pressing the "Abort" button.
02-22-2013 03:18 AM - edited 02-22-2013 03:19 AM
Hello Innervision.
Just to recapitulate what you're saying:
- "Start" Button is only pressed once and starts the application
- "Stop" button is an emergency stop for the application (for acquisition and generation?) which will also make sure the outputted value is set to 0V.
No saving of data happens in this case?
- "Report" button ends the acquisition (and also the generation?) and saves all the acquired data.
Does it stop also your application?
- What should happen when your triangle has been generated completely?
Should your acquisition also stop or should it keep on running?
Do you use the abort button (the big red circle in the Front Panel Toolbar) to stop your application?
This is something you should absolutely try to not do.
It's always better to stop an application with application logic.
PS: Sorry for all the bold sentences, but this makes it easier to distinguish my questions towards you.
02-22-2013 09:37 AM
I'll just just answer like this 🙂
- "Start" Button is only pressed once and starts the application
Yes
- "Stop" button is an emergency stop for the application (for acquisition and generation?) which will also make sure the outputted value is set to 0V.
No saving of data happens in this case?
Yes
- "Report" button ends the acquisition (and also the generation?) and saves all the acquired data.
Does it stop also your application?
- What should happen when your triangle has been generated completely?
Should your acquisition also stop or should it keep on running?
I used the Report button so I could start the prompt and save the data. But I actually want the data to be automatically saved when the triangle reaches 0V,
Do you use the abort button (the big red circle in the Front Panel Toolbar) to stop your application?
This is something you should absolutely try to not do.
It's always better to stop an application with application logic.
The program should be able to stop with the "Stop" button. Which makes the outputted value 0V. Then when the user wants to use the program again.
The Start and Stop buttons should be in default position, so they can start again.
I have all these ideas but just can't implement them in the program.. 😕