09-12-2011 03:30 AM
Hi,
How can one generate a continuos signal wave as an analog output in Mac with Labview 8.5. It seems simple, but I couldn't find any solution for that.
Solved! Go to Solution.
09-23-2011 04:36 AM
Hello Timi,
My name is Larry and I am an Application Engineer at NIUK, I apologise for the delay the response however I hope this information helps.
Do I understand correctly that you are trying to output a signal from your Mac to some external device? Are you using any hardware plugged into your Mac which allows you to send a signal?
A computer by itself will not be able to acquire or output any signals without some sort of dedicated hardware designed for the task. LabVIEW is used to generate the code which will run your DAQ device, which in turn transfers signal data externally.
National Instruments offer a wide range of DAQ devices to suit any application. A great introduction to data acquisition and DAQ devices visit the following link:
I hope this resource helps with your application. If you have further questions about which products suit which application the NI website holds allot of information, however do not hesitate to ask further questions on the forums if you cannot find the information you need.
Regards,
Laurence Colvin
Applications Engineer
National Instruments UK
09-26-2011 02:08 AM
Hi
Thanks for your reply. Actually, I have a NI PCI-6259 16-bit card and a connector box. So I can produce a signal as output. But my problem is that how can I make a sinus wave (or any kind of periodic signals) continuously with a good resolution. At the older version of Lab-view, there was a “continuous” option in “Start” icon among making a output signal, but in the Lab-view 8.5 I cannot find it and generate a continuous signal. Can you give me a suggestion to solve the problem?
Regards
09-26-2011 05:16 AM
Hi Timi,
Creating a continuously generating signal waveform in LabVIEW can be done in multiple ways:
Simple method:
You could place down on the block diagram a DAQ Assistant which can be found in the Express input or output palette.
Firstly you will be prompted to set the express VI to a particular output/input on your DAQ device.
In the following window set the attributes of your waveform which you would like to generate and close the popup window.
This will build your VI which can be executed by running your program. This will however only execute this generation once.
To generate continuously you can place a while loop around the DAQ assistant and wire the error signal to the conditional terminal using an unbundle vi.
This can be seen in example1. There is also a comprehensive guide to using the express VIs which can be found here.
Complex but adaptable method:
An express VI is simply a sub-VI which contains lower level VIs which create your task. However if you want to adapt the reading and writing of signals in a program it is best done creating it from lower level VIs in the first place.
There are many tutorials online which explain how to structure a program with DAQmx Vis, one of which can be found here.
I have also attached a sample code (example2) which uses the lower level VIs which are being used to generate a sin wave signal on one channel (AO) and then read back in through another channel (AI).
I hope this information helps with generating the signal, please do not hesitate to reply if you need more assistance
Regards,
Laurence Colvin
Applications Engineer
National Instruments UK
09-26-2011 08:44 AM
Laurence,
Please read the original post! Timi asked how to do continuous output on a MACINTOSH.
The DAQ Assistant and DAQmx are not available on the Mac, so how is your suggestion of any use?
If you have some influence to make DAQmx work on the Mac, that would be nice, but I suspect that you do not.
He is probably using DAQmx Base, which is entirely different from DAQmx.
Lynn
09-27-2011 04:59 AM
That is right!
I have Mac and no DAQ Assistant is available.
Solution?
09-27-2011 08:44 AM - edited 09-27-2011 08:50 AM
Hi Timi,
Sorry for not having realised my mistake. DAQmx Base is very similar though to DAQmx in the way the lower level VIs are constructed.
If you were to replace all the DAQmx VIs for their equivalent DAQmx Base VIs in my second example you would have a program that nearly runs the way it does using DAQmx.
The only problem with DAQmx base is that you must start each channel with a start task function found in the DAQmx base palette. (Knowledge Base article on this)
I do not recommend sitting there and replacing all the VIs one by one, as a perfect example for generating a continuous waveform in DAQmx Base can be found on your MAC:
Cont Gen Voltage Wfm-Int Clk-On-Board Regeneration.vi
Found at:
/Applications/National Instruments/<LabVIEW>/examples/daqmxbase
I do hope this helps and you are successful with your project. Please do not hesitate to post if you get stuck or I have missed something.
Regards,
Laurence C.
Applications Engineer
National Instruments UK