Output analog, the USB-6009 case - can I use DAQmxWriteAnalogScalarF64?
I just got a NI USB-6009 and I try to use the outputs analog simple.
I'm running on a Mac, so I'll try to use the API OR-DAQmx Base 3.2 C (downloaded from here: http://joule.ni.com/nidu/cds/view/p/id/1078/lang/en). This is the most recent version of NOR-DAQmxBase, I could find.
I try to do continuous analog output on the 6009, which does not have a built-in clock. I was hoping to do the sync software and just new output values when I want to.
I can't get an output of database to work. Other messages and the example of Windows files, (e.g., National Instruments/NOR-DAQmx Base/examples/ao/MultVoltUpates-SWTimed.c) it seems that the best thing to do would be to use the DAQmxWriteAnalogScalarF64 function.
However, this is not in the Mac version of the C API of NIDAQmxBase. There is actually an entry for this in the NIDAQmxBase.h file, but it is commented out. Anyone know why? Is it possible to use this function for the analog output on request on Mac?
Thank you.
Clement
I have NEITHER-DAQmx Base installed 3.2 on a 10.4.11 system. One of the examples files 'genVoltage.c' calls DAQmxBaseWriteAnalogF64. I was able to compile and run this example with a USB-6009.
The DAQmxBaseWriteAnalogF64 function would work for you?
My guess is that, since you can write a scalar value with DAQmxBaseWriteAnalogF64, DAQmxBaseWriteAnalogScalarF64 becomes superfluous. The example provided with the installation shows how to write a unique value (i.e. scalar.). I pasted the code of OR below.
int main (int argc, char * argv [])
{
Task settings
Int32 error = 0;
TaskHandle taskHandle = 0;
char errBuff [2048] = {'\0'};
Channel settings
Char [] = "Dev1/ao0" chan
float64 min = 0.0;
float64 max = 5.0;
Sync settings
uInt64 samplesPerChan = 1;
Writing data parameters
float64 data = 3.25;
pointsWritten of Int32;
float64 timeout = 10.0;
DAQmxErrChk (DAQmxBaseCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxBaseCreateAOVoltageChan(taskHandle,chan,"",min,max,DAQmx_Val_Volts,));
DAQmxErrChk (DAQmxBaseStartTask (taskHandle));
DAQmxErrChk (DAQmxBaseWriteAnalogF64(taskHandle,samplesPerChan,0,timeout,DAQmx_Val_GroupByChannel,&data,&pointsWritten,));
Error:
If (DAQmxFailed (error))
DAQmxBaseGetExtendedErrorInfo (errBuff, 2048);
If (taskHandle! = 0) {}
DAQmxBaseStopTask (taskHandle);
DAQmxBaseClearTask (taskHandle);
}
If (DAQmxFailed (error))
printf ("error in DAQmxBase: %s\n",errBuff); ")
return 0;
}
Hope this helps!
Tags: NI Hardware
Similar Questions
-
How to configure the PFI0 terminal on the USB-6009 case as came event counter
I'm watching the 8 inputs on the USB-6009 case and when fires Terminal PFI0 start saving the data.
Y at - it and why to read the 8 inputs while monitoring the PFI0 terminal? I appreciate any help!
Hi yacs1,
You can certainly do. I assume that you already have your 8 entries read correctly. Everything you have to do is now to put a statement button in your loop that is controlled by your pfi0 line. If this line is high, then save the data, if it's low, then only display data of your control. If you need help reading the pfi line, open finder example under help > find examples. Then go to the material input and output, reading Dig channel DAQmx, numerical measures. If you need help logging data, go in Fundamentals, file input and output, and then depending on what type of file you want to write to, find the appropriate example (IE write into text file).
Let us know if you need more assistance,
Ryan
Technical sales engineer
-
What is the MTBF for the USB-6009 case
What is the average time between failures (MTBF) for the USB-6009 case?
Hello
Unfortunately, there is no available for the USB-6009 case MTBF. In order to retrieve this information, there is a cost for our R & D department. If you need this number, please contact your local representative OR or open a service request to ni.com/ask.
I apologize for the inconvenience.
-
inputs and outputs analog digital usb 6009
I'm having a problem with my USB 6009 in labview programming. I try to read continuously from the analog inputs while having an event focused on digital output within the same program/vi. Basically, I need to taste all the time the analog inputs while having an event defined by the user (button control) to signal the digital inputs to turn on then after awhile. The event of digital output must be independent of the analog sampling system. I was throwing the "error already allocated resource" in most of the vi, I wrote to try to achieve. What is programmatically possible with usb 6009? I am at my wits end trying to do this and any help would be greatly appreciated (by myself and my boss). Thanks in advance for your answers.
RJ
-
Configuration of the digital output in the USB-6009
I have a card for the acquisition of data USB 6009. It seems that him when DAQ card is turned on, it is always default to digital output of 'High' or 'floating '. I want to default to 'low '. Is there some setting I want to 'program' the hardware DAQ to have all the outputs low when it is powered on the value? Right now I have manually enter MAX and adjust the level 'low '. Thank you very much for your help.
Sid05,
Yes, it's low of 820 ohms. Unfortunately, the way in which the system is built, it is the only choice you have without having to build external circuits such as SnowMule suggested.
AK2DM,
Thanks for pointing the USB-6000. Finally a real, if limited, the DAQ hardware. Nevermind, he was only 4 DIO lines.
Lynn
-
Also, I need to set up a timer so that the shutter is open for 15 minutes and closed for 30 minutes. It has to do 500 times.
The USB-6009 case is a relatively new device, and LabVIEW 8.5.1 is a fairly old software. You should check to be sure that you have the corresponding to your version of LabVIEW (DAQmx) drivers that support of this material. It sounds as if you put it in place to MAX and control the output manually, which is a good sign. I don't have access to the version 8.5.1 and I do not exactly remember which functions he supported, but the attached picture shows a simple diagram in a new version of LabVIEW that would do what you want. Of course, you should test with shorter and less iterations because it takes more than 2 weeks to complete! Add any controls, indicators and the error checking you want.
Rich
-
I just upgraded 5 c to 6 s GSM (o2). I have all new versions of itunes ob both devices. When I connect usb a message:-can't use the iphone "iphone" because he needs a newer version of itunes. Help!
But you have the latest version of iTunes on your computer?
-
I plug in a device after I installed the drivers from the USB says windows can't recognized the device what should I do to solve it.
Hello
I suggest to go to the link below and run the fix tool provided or follow the manual procedure provided to solve the problem.
A computer that is running Windows XP cannot detect a USB, an Apple iPod flash drive or an external hard disk drive
http://support.Microsoft.com/kb/925196
You can also check the below link for more information about advanced troubleshooting tips for General USB in Windows XP problems.
-
My PC is infected with Vista Antivirus 2012. He keeps me get on the internet, so I can't use malwarebytes or antispywaredoctor because I can't go on the web, even in safe mode. Any help, please. How can I get rid of it when I can't get on the web?
Try using the Standalone System Sweeper http://connect.microsoft.com/systemsweeper
You download it on another computer and copy on a DVD drive or USB key. You can then do a scan without starting Windows.
There is a list of CD received by other vendors antivirus here:
http://www.TechRepublic.com/blog/security/rescue-CDs-tips-for-fighting-malware/3803
-
I have to save files in the creative cloud, or can I use a local file server?
I have to save files in the creative cloud, or can I use a local file server for sharing in exercise?
You are not required to save the files in the creative cloud.
Storing files online is simple and an additional service, but there are several advantages:
- Your file is saved online in which case the file is accidentally deleted locally or your hard drive fails.
- Previews of InDesign, Illustrator and Photoshop files in the web browser for someone who doesn't have these programs and would not be able to view the image file.
- Share the file with another allowing them to comment on and download.
-
A Mac mini, purchased in the UNITED Arab Emirates can be used in the USA with only change the power cord?
Yes.
http://www.Apple.com/Mac-mini/specs/
the voltage may vary from 100-240 V AC.
-
I have 2 credits of the film. How can I use them?
I have 2 credits of the film. How can I use them?
If you show a credit of movie rental, when you are signed into your iTunes account Store, just rent a movie. The credit must be used automatically.
In my view, the rental must be for $4.99 or less when using a rental credit. If it is more you will be charged.
Hope that helps!
-
i; ve been using a Flash DRIVE from lexar to work on excel sheets. I went to open the USB key that ive been using and he said: "it must be in the format". I did have to do at this point and that to format ill lose all my docs? Help
Try to play on another computer. If she still wants to be shaped, it's game over.
If it's ok, copy the files on it before doing anything else and you get a new flash drive...
-
I have the license for the standard 8 Arcobat, can I use it in Arcobat professional 8 as standard 8 is no longer available for download? Also install win 10, is this good?
PAM,
I don't know the link to Acrobat 8 Standard still works, but it can. See: Re: is there way to download Acrobat 8 standard?
For Windows 10, you can look at my answer to: will be an earlier version of acrobat 8 Professional install and function on a newer computer using Windows 10?
Educated man
-
The pen Surface Pro can be used with a Dell computer, or does it take a specific Terminal?
Hi Luzs,
Could you please let me know if you want to use from the pen of Surface Pro with Adobe Applications for editing?
Dell computer is also a touch screen computer you have?
Kind regards
Tanuj
Maybe you are looking for
-
Drive necessary recovery for Qosmio F20
I lost my recovery disc for my laptop Qosmio F20-104 (I don't remember if he even came with any!). How do I restore my laptop to zero?I have the disk utilities and tools, but unfortunately, that's all... Help! Thank you Gee
-
Satellite M40x-149 and atheros ar5005gs
I recently bought a laptop, a few weeks previously and recently I tried to connect it to a work already wireless network in the home and found that the laptop could not see the network and then connect to it. I know that the network is working with t
-
I want to "stack" a DSP filter on a LabVIEW waveform. 'Stack', I mean just run twice, but with different cut-off frequencies of; I'm trying to simulate the actual hardware. I use a basic built-in LabVIEW DSP filter: \vi.lib\Analysis\3filter.llb\Butte
-
Security check has shown that my computer has 2100 clear... running slow... How can I fix it?
-
3.27.10 I looked at in the previous questions and nothing precisely meets my situation. My laptop was bought with Home Basic. Later, I bought Anytime Upgrade Pack from the microsoft site. It installed fine. THEN my cell phone got reimagee when the se