Is it possible to loop AI Voltage readings without creating a new task (NI-DAQmx)?

I would like to repeatedly make n Analog readings in a program, however, I am unable to accomplish this without creating a new task each time... perhaps I'm doing something wrong.
Here is my pseudo-code:
DAQmxErrChk(DAQmxCreateTask("", &taskHandleAI));
DAQmxErrChk(DAQmxCreateAIVoltageChan(taskHandleAI, ...));
DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandleAI,...));
Loop start
DAQmxErrChk(DAQmxStartTask(*taskHandleAI));
DAQmxErrChk(DAQmxWaitUntilTaskDone(*taskHandleAI, 0.001));
DAQmxErrChk(DAQmxReadAnalogF64(*taskHandleAI, ...));
DAQmxErrChk(DAQmxStopTask(*taskHandleAI));
do_something();
Loop end
The first read seems to work fine, however, all subsequet reads gets the following error message:
DAQmx Error: Measurements: Task specified is invalid or does not exist.
Status Code: -200088
Does anyone have a clue what is happening?

Sorry... is it possible to move a post, or should I simply start another one?
Also. I don't fully understand what you mean by moving start & stop outside of the loop... the 'do_something()' part parses the reading results that was just read...
are you saying I should not run StartTask/StopTask for each iteration of the loop? 

Similar Messages

  • Is it possible to measure single voltages without creating a new task every time

    I need to take voltages as input in the event loop of a program. If I create a task, take a measurement, then stop the task I get roughly 10 - 20 measurements a second. Is this the most efficient way to do this, I would need many more measurements, but have to do other things in my program in between?

    Nevermind, found my answer in other threads.
    Looks like there's no real work-around.  It may be too that it is creating new clips on dropped frames.
    Not sure.  testing different theories.
    Thank you!

  • Is it possible to open a new Worksheet without creating a new *.sql file

    Hello Community,
    Declaimer: It may be a trivial question. I just willing to make SQL Developer my default day to day tool.
    I is possible to open a new Worksheet without creating a new *.sql file. Like in an MS Word. If I just need some space to write something and than destroy the file without saying. I can quickly click < ctrl + N > and get the space.
    In SQL Developer to get a new "space"/work sheet i
    -a- < ctrl + N >
    -b- choose "SQL File"
    -c- confirm default location
    -d- choose the connection to be used (right top conner)
    This process is way to long for getting a new sheet to put write an SQL.
    Can you suggest a better way to get a workspace with current connection assigned in no time (like in MS Word)?
    Please ;)
    Yury

    There is no need to create new .sql file.
    I don't know why you need new SQL Worksheet when you can simply do the space by pressing Enter, but you can open a new one from Tools -> SQL Worksheet. There is also a toolbar button for this.

  • ICal possible bug: cannot select appointment, quit, or create a new one

    Hello there,
    I'm having this weird issue with iCal where after some time of inputting appointments and changing them around, one of the appointments seems to remain locked together with the mouse. In other words, no matter what I try to do I cannot because that one appointment keeps following my mouse. When I left click and don't move my mouse around, nothing happens. When I right click my mouse button, the column gets selected, but nothing else happens. When I left click and drag as if I wanted to create a new appointment somewhere, the one blocked appointment keeps popping up right there and the new appointment never gets created.
    This is beyond my understanding so I'm asking for help. I have already trashed preferences and followed another post "how to completely reset ical" which was not entirely resolved, but I have deleted everything they listed there and I can't get rid of all the appointments. (This is quite ironic, because I've lost iCal databases quite a few times and was never able to get them back, and now I'm having trouble messing it up!)
    I have also recorded my screen to give you a better visual to the blah blah above.
    You can find it here: http://www.tigps.org/icalbug.mov [1MB file, 30 seconds]

    redsteven1,
    Thank you for replying. It is indeed a one-of-a-kind behavior. It has however fixed itself. It has not happened in a month now. I have not upgraded or otherwise changed anything on that computer.

  • Is it possible to re-install itunes and sign in your account without creating a new one?

    I cant access my itunes account so I am thinking of un-installing it and re-insalling it. Would I be able to sign in my account using my apple ID instead of creating a new account? thanks in advace

    Hi there
    The installation of iTunes has nothing to do with your iTunes account.
    Are you unable to access your iTunes account because of a forgotten password? If so, then you can reset it here.
    However, if you are unable to access your account for some other reason (disabled, etc), then you may need to contact the iTunes Store Support team
    Good luck

  • Any way possible to break the 3GB barrier without buying a new MBP?

    I've seen several posts here and saw reference to Video memory addressing hardware space that conflicts with limits of 3GB RAM but was curious whether anyone has been able to get more RAM in a MBP2.2 2.33GHz model. I just really need the horse power and can't wait until refresh next year.
    Thanks

    Thanks Joey, I knew there was a limitation but wasn't sure whether anyone had found a way to bypass it. What I mean by refresh, I've got a company refresh coming in May next year but the added RAM would be a big help in the meantime. I run Fusion on top of Mac for certain applications, in particular I've got some very large Excel 2007 spreadsheets that just can't be handled by Excel in Office 2008. I've tried all sorts of various combination's of tools, apps, VM configs and it all boils down to performance challenges. In order to run Excel proficiently, I need to allocate 1GB RAM min but that totally eats up my ability to also run Keynote, Pages, other native Mac apps effectively. 3GB RAM is optimal so long as I don't run anything in the Windows world but when I get real busy with multiple spreadsheets, presentations, documents, email, etc., my Mac comes to a screeching halt.

  • Voltage readings from transducer

    Hi guys, I am currently stuck in here. I am doing a program that can take voltage readings from transducer using three-loop structure.
    I have a layout for that in my front panel. I am not sure if I am on the right track. Can give me your opinions on this?
    Many thanks!!!
    Regards
    Nic Ho
    Attachments:
    Simplified_prog.vi ‏30 KB
    Simplified_prog.vi ‏30 KB

    I get your point. What I am trying to do here is I first select a few channels. When the program is running, the total no of channels and the binary value
    are displayed. By looking at the binary value, I am able to tell which channels are light on. Basically my objective is to get voltage readings from the transducer and save the data. However I like to do an "Initialise" before starting the program. In addition, I am looking on ways how to set timing for scan and data log for eg 0.5 hr, the panel will show this particular channel reading? U guys have any clues on this? Do let me know if you have problems viewing the file. Many thanks!!!
    With Warmest Regards
    Nic ho
    Attachments:
    VI simplified version.vi ‏82 KB
    Shell Main States2.ctl ‏6 KB
    UI Msg Q Functions.ctl ‏5 KB

  • Where can I go to learn about scaling voltage readings from different AI devices?

    Ex. I have a Vaisala HMP 60 RHT sensor. How do I know what to scale the voltage readings to get the correct RH? I have seen values (such as 20 in the linear range for the Vaisala HMT 100), but I don't know where it comes from or why it is chosen. In case it matters, I am using several AI devices (thermocouples, MFC's, RHT's) on an NI-6343 USB board. I'd really like to learn more, but am finding information very tough/convoluted. Thank you for any/all help and direction.
    Solved!
    Go to Solution.

    Thank you for the input/help. I think what I was looking for was that if you have a 5V output (for the Vaisala HMP60), then the slope would be 20 so that the zero voltage reading corresponds to 0% RH and 5V output corresponds to 100% RH. Hopefully this is right and their is no drift.

  • RAM voltage readings with DMM vs. Software on X58 Pro-E

    I almost fell over with shock when HWmonitor and Speedfan both reported my RAM voltage spiking over 3volts when running Prime95. When idling the voltage readings fall to about 0.6v and jump around during use.
    I set my RAM voltage in BIOS to 1.5v but software doesn't report that voltage at all.
    So I grabbed my DMM and measured the voltage on the Mobo directly and found that the voltage is in fact exactly 1.5v
    How is it the software can show variations in voltage from 0.5 to 3.7 volts when it's ALWAYS 1.5v when measured directly from the board with a meter?
    I measure from the silver tab (center leg) of what I'm sure is a kind of transistor or FET, which I know is v output.
    How can I trust any of the other voltage readings then? Especially the CPU v.

    Quote from: Jack on 14-July-11, 21:56:29
    Neither one of these utilities is actually able to correctly monitor the actual memory voltage.  Just ignore those readings.  They are absolutely inaccurate no matter how you look at it (@3.7V you memory modules would probably simply vaporize and @0.6V your system would not be running anymore).  These readings are IMPOSSIBLE readings.
    Don't trust any memory related voltage readings that you get from third party software applications.
    There you go.
    That's what I figured, I wan't suspicious until my RAMv hit over 3.5v nearing 4v when stressing with Prime95, I couldn't understand how it was so high and still working.
    I mean, all the voltage readings on speedfan show what look like normal values when I know full well they're not the ones I manually set in the BIOS. It's frustrating.
    And yes they're all the latest releases and by BIOS is up to date with new firmware but NO my OS is still vista 64 SP1 with absolutely NO updates installed. Though I seriously doubt that'll change any voltage readings I get in speedfan.
    I'm almost tempted to colder connections to all the voltage points on the Mobo for easy DMM connection. But I probably won't cos it's not worth the trouble.

  • Is it possible to measure ac voltage using cFP-AI-100​?

    I have the cFP-AI-100 module.. is it possible to measure ac voltage with this analog input module?
    Is there is any specific module?

    Hi ELUE,
    I will need a little more information to give a good recommendation.  What range of voltages will you be measuring?
    The following link will bring you to all the analog input compact FieldPoint modules we have:
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/115​75 
    Other things we need to consider is what frequency the signal will have, and if we need isolation between the channels.  Any further information would help.  Have a good day.
    Brian K.

  • Im guessing these Voltage readings are incorrect. (K9N2 Platinum)

    First off my system:
    K9N2 Platinum
    AMD Athlon 64 X2 5000+
    Rosewill 500 (Recieving a PC Power and Cooling SILENCER 750W tomorow)
    Anyways, the voltage readings for this board are way low. Though i havent had a single shutdown, or lockup due to low volts, even when oc'd..
    For the most part ill let the screenie do the talking.
    The Vcore reads a bit high and gets higher under load
    The VRAM,Vchipset, and VCC1.5V all read way low.
    everything else seems fine.
    And a stable oc from earlier. http://valid.canardpc.com/show_oc.php?id=498491

    Ok heres another one.
    I set my CPU voltage in the bios for 1.325(the lowest setting)
    And when the pc is idling it shows 1.34. At 100%CPU it shows 1.37...
    Is movement like that normal? Or just a sensor/software/calibration/offset issue?

  • MBM Voltage Readings

    Anyone have an idea as to how accurate MBM voltage readings are in comparison to actual voltage multimeter readings on the K7N2 boards . . .
    Thankees.

    See +12v under idle / load there's a variety here which may help

  • DAQsingleBufExtTrig_Eseries.c returns higher voltage readings each time it is run

    I am useing A pci6024E board running the sample program DAQsingleBufExtTrig_Eseries.c to read an analog signal produced by A FUNCTION GENERATOR
    I thought that things were going well until I
    realized that each time i ran the program ,the voltage readings increased by about 1 volt each run .
    irregardless of the function generators settings
    I tried adding the AI_CLEAR FUNCTION TO THE PROGRAM BUT STILL GOT THE SAME RESULTS.Can someone please explain what I am doing wrong
    [email protected]

    Walter
    Does the program finish on its own, or are you aborting it before it ends? Also, is it that the voltages continue to increase, even above the range of the board?
    Try to do a DAQ_Clear(iDevice) at the very beginning of the program as well as the end.
    Brian

  • Possible routing loop?

    i get these messages from our edge wae device, they have various host ip's not sure what to make of it. there is no routing loop unless waas/wae is doing something that i am not aware of to cause that to happen. wae is in a seperate net from the users and the router. we are running 4.0.17 and wccpV2, the prepositioning and and cifs functions seem to be performing as advertised, print services are being phased out and moved back to core as we cannot seem to find a good driver set for the various printers at the site, but it seems unlikely that would be the issue anyway.
    any ideas appreciated.
    Message #1: [2008-05-23 15:27:10,101][ WARN] - Host 172.84.12.245:139 was not discovered, bypass period: 0 sec, number of events: 76, reason: possible routing loop
    Randy

    172.84.12.245 is indeed a branch host pc, is there a way to make this stop or is it just telling me that an unregistered server at the core is talking to a client at the branch ?
    Thanks
    RR

  • P45 Platinum Voltage Readings in Speedfan & HWMonitor

    I am having some problems reading the voltages (+12v, +5v, etc..) of my P45 Platinum motherboard in Speedfan and HWMonitor.
    Attached are some screenshots.
    I also did a search and found this thread where jack the newbie posted screenshots about his speedfan readings: https://forum-en.msi.com/index.php?topic=121987.msg922325#msg922325
    His voltage readings are also around the same range.
    Is this due to a problem with our motherboard or the reading of voltages by speedfan/hwmonitor?
    Could those who have the P45 Platinum do a test and see whether they get the same strange readings from the voltages too?
    Thanks in advance

    Quote from: Jack the Newbie on 17-December-08, 01:03:00
    Those readings are impossible readings.  No system would be able to function with the +12V level dropping to 1.23V.  It is simply impossible.  Both of the tools show wrong readings, which is not the fault of the board but a problem with those tools.  Check the voltage levels in BIOS, or, even better:  use a multimeter.
    Thanks Jack the newbie. And thank you youeffsee for testing on your board. That shld be proof that I'm not the only one facing this issue and my board is not bad. Phew...
    I knew those were ridiculous readings. The readings in BIOS are perfect. If those tools are bad, are there any that currently read the voltages correctly on the P45 Platinum? Besides MSI's own DualCore Center of course. Being able to monitor voltages in Windows without a multimeter sticking out of the casing would be nice.
    And does anyone know what the other voltages/temperature sensors are reading? Thanks again.

Maybe you are looking for

  • Upgrade to Windows 8.1 keeps failing - error 0xC1900101

    I can't seem to update to windows 8.1 it gives me this error after logging in again: "Couldn't update to Windows 8.1 Sorry, we couldn't complete the update to Windows 8.1. We've restored your previous version of Windows to this PC. 0xC1900101 - 0x400

  • Howto change property of javabeans based data control?

    Hi, I have a swing application which displays a combobox. This combobox is bound to a javabeans based model using ADF. The combobox is enabled/disabled based on a value in another combobox, so sometimes the combobox is enabled, sometimes it's not. We

  • What wireless printer will work with ipad2?

    I am looking for a wireless printer that will work with ipad2?

  • Print the Long text in Smartform

    Hi all, I designed a Work order document using Smartform for the T-Code 'IW32'. I am able to print the Operation short text, but there is one more provision for the user to enter long text also. I am not getting where this text gets stored in the dat

  • Help! My adobe photoshop elements 9 won't work when i open it up!

    Help, please! I have a Adobe Photoshop elements 9 and everytime i save a picture then the next day i try to open my save picture it tells me "This product has encountered a problem which requires that you restart your computer before it can be launch