05-24-2012 07:10 PM
Hello,
I would like to know if it is possible to send multiple samples or a single waveform to a PCI-6703. Also, can this board work with the DAQmx timing vi? From surfing the forums, I see that some boards cannot accept a software timing vi, and I am wondering if PCI-6703 is one of those boards or not.
Basically, I would like to send a user-configurable pulse or square wave to the channel on command. From the online tutorial, it seems easy to create a finite-sample waveform and send it to both the DAQ timing vi and the DAQ write vi, then play the channel, and wait until it is done. My idea is to create the pulse according to voltage, time duration, and resolution input provided by the user and play it when a push button is pressed (latched until release). Otherwise, send a 0 voltage signal. However, the writing vi does not seem to accept either a waveform, or a 1D array of values. I have tried to run the vi with and without the timing vi, with different error messages complaining about sample timing types.
I have seen programs work where you can feed the write vi sample by sample and set a separate clock or shift register; do I have to do that here? If so, is there a better way to do that for running multiple channels in tandem?
I have tweaked my program in several ways, but here is a sample image of one of my iterations and its error message.
Thank you for your attention!
05-25-2012 04:54 PM
This should be doable. I believe the problem is that you are using the DAQmx start VI after the DAQmx read VI. What you need to do is start the DAQmx task that is being created before writing/reading to the channel. I'd suggest starting your DAQmx programming with the shipping examples that come with LabVIEW for the type of task you would like to accomplish. To access these, navigate to help >> find examples in your LabVIEW window. For DAQmx choose browse >> hardware input and output >> DAQmx >> Analog Generation.
If making that alteration doesn't alleviate this error repost and we'll see what else might be the problem.
Regards,
05-27-2012 03:33 PM
Thank you for your suggestions. I will try placing the start vi before the write vi, and take a look at the shipping examples -- I had dug around the generic Labview examples and not the DAQmx / Analog Generation ones.
If those doesn't work out, I'll be back.
06-01-2012 05:19 PM
Hi again,
So I have poked at my vi some more, and have moved the start channel vi to the front and added a timing vi too. There is no longer any error, and the waveform chart shows that the pulses are generating on command. The only thing left is to get the voltage samples to the DAQ card.
Quick summary: I am trying to write a vi that generates a specified single pulse on command, and leave it idle at 0 volts otherwise. I have attached screenshots of the "run pulse.vi" and the "pulse generator.vi", the latter of which I generate a finite pulse waveform. The push button in the "run pulse" vi has the mechanical action of "latch until released".
I have been trying to troubleshoot "run pulse" on my own, which is why there seem to be many indicators floating around. I have noticed that there are no samples being written by the write vi... I am not sure if this is because I don't specify a t0 for the generated pulse waveform in "pulse generator", or if there is some other issue. Another thing is that sometimes the vi doesn't respond when I press the push button several times in a row.
I've looked at the DAQ examples, and while they are insightful, I haven't seen/figured out which one would be closest to what I would like to accomplish.
Please help!!
Thank you!
06-04-2012 05:24 PM
Hello,
To generate the finite pulse train, take a look at the example "Gen Dig Pulse Train-Finite.vi" located in the example finder under Hardware Input and Output>>Generating Digital Pulses. This uses one of the counters on your device to generate a finite length pulse train.
You can also use Gen Dig Pulse.vi to generate a single pulse.
Regards,
06-05-2012 04:40 PM
Hullo,
Thanks for your reply. I had taken a look at the examples you suggested before, and they seem to be what I would like to accomplish, but when I tried to tweak them to work with my PCI 6703 board and generate an analog voltage output, I discovered that my device doesn't have a counter. That is why I've been trying to manually generate a discrete analog voltage pulse.
Is there a way to make the Gen Dig Pulse Train-Finite.vi or the Gen Dig Pulse.vi work with the PCI 6703? Or what can I improve in my developing vi's?
Thank you again for your time and help. I really appreciate it.
06-06-2012 05:49 PM
Ah I see, sorry that was an oversight on my part. I have created two small examples that will generate an analog or digital output pulse train based on loop timing (as one option).
You should be able to alter the logic if you want to time the pulses based on different parameters.
Regards,
06-06-2012 07:16 PM
Hello,
Thanks for the small examples! They give me a good idea on where to start for my next attempt.
Just curious, is it possible to feed a single, finite waveform to the write vi? If so, should I select 1 channel N samples, or...? I have been trying different combinations with my existing vi's, and nothing gets written to the channel. I'd really like to know, as it was one of the problems that I had started out with.
Thanks again, you've been a great help!
06-07-2012 01:31 PM
Hey,
Take a look at Gen Mult Volt Updates-Int Clk.vi under Analog Generation. I believe that does what you're looking for.
Regards,