How can I programmatically change the voltage range settings in a DAQ Assistant

Hi,
First post here.  
I need to be able to change the voltage range properties of a daqmx DAQ Assistant based on user input.  My hardware, an SCXI-1102C does not allow changing this property on a running task, so I'd like to either set the analog input voltage range before the DAQ Assistant activates, or pause the DAQ Assistant immediately after it starts, set the values and then resume.
I don't know how to edit the task ahead of time because the DAQ assistant creates the task when it runs, and there is no task before that.
In the attached picture, I have a conditional section, set to run only if the while loop iteration is 0.  I take the task from the Daq assistant, send it to a stop task vi, set the property, and then send the task on to the start task vi. I can watch it run with the debug light on, and everything seems to work correctly, but on the second (and all the other) iteration of the loop, I read out AI.Max and it seems like the DAQ Assistant has re set it back to 5V.  Can anyone see what is going wrong here?
BTW, this is continuous acquisition and the code does not produce error messages when it runs.
I did come across a similar question that someone posted here back in 2006, but his question was specifically aimed at a Labview API (VB, I think), and not an actual G solution.
Attached are the actual vi in question and a png image of the block diagram.
Thanks! 
Ruby K
Solved!
Go to Solution.
Attachments:
Labview_question.PNG ‏14 KB
Sample_AIV.vi ‏91 KB

First, if you want to start getting beyond the basics with DAQ, you are going to have to stop using the DAQ assistant and do it with lower level DAQmx VI's.  There are hundreds of examples in the example finder.  You can even right click on the DAQ assistant and select open front panel.  That will create a subVI that you can open and see what is going on behind the scenes.  Do it.  I think you'll find the DAQ task is being recreated on each (though I'm not 100% of how the settings are established or maintained in each section of that subVI).
The second problem is you have a bit of a race condition on iteration 0.  Those two DAQ property nodes are running at the same time.  So when you read the AI.Max, it may be happening before or after the AI.Max is set in your case structure.
Third, make sure you wire up your error wires.

Similar Messages

  • How can I programmatically change the fill color Settings of the Cwslide ActiveX Controls

    In design mode (Visual Studio 6.0),I want to programmatically change the fill color in properties of  cwslide  ActiveX Controls.what's the command?
    Attachments:
    cwslide.JPG ‏11 KB

    First, if you want to start getting beyond the basics with DAQ, you are going to have to stop using the DAQ assistant and do it with lower level DAQmx VI's.  There are hundreds of examples in the example finder.  You can even right click on the DAQ assistant and select open front panel.  That will create a subVI that you can open and see what is going on behind the scenes.  Do it.  I think you'll find the DAQ task is being recreated on each (though I'm not 100% of how the settings are established or maintained in each section of that subVI).
    The second problem is you have a bit of a race condition on iteration 0.  Those two DAQ property nodes are running at the same time.  So when you read the AI.Max, it may be happening before or after the AI.Max is set in your case structure.
    Third, make sure you wire up your error wires.

  • How can I programmatically change the colour of tab pages? If not, when?

    I have found that in LabVIEW 6.0.2 the "Dialog" tab control cannot be coloured, but the other type of tab control one can be coloured by the paintbrush tool. I cannot find any property node to programmtically set the colour of the enitre tab control or individual pages. When will these properties be available in LabVIEW?

    The dialog controls and indicators are designed
    specifically for use in dialog boxes. These controls inherit their color from the colors you set in Control Panel >> Display. Because of this you will not be able to programmatically change their color.
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • How can I programmatically change the number displayed on a digital control?

    In my application, there are two while loops. The inner loop has a digital control where the user can enter a number. If he enters an invalid number, I want to clear his input.

    One way of doing is see attach..
    need to use property node and case structure.
    When you feel sad, laugh
    Attachments:
    25feb04.vi ‏28 KB

  • How can I programmatically change a label?

    Hi everyone,
    I have a 2-D array that I wish to populate with different sorts of data.  Depending upon the data, the names of the rows and columns may change.  Arrays have to have identical labels and I suppose I could simply populate a string indicator, but frankly, that looks like trash.
    How can I programmatically change a label of a column or a row in a 2-D array?  Should I consider using a table?  I want it to look nice.
    Thanks,
    Jason

    Hi
    I do not think you are able to change the label programatically.
    But you might consider to use Captions instead of labels. You can hide labels and make captions visible programatically, and you can change the text of the caption and size (see enclosed vi).
    take care
    Pawel
    Attachments:
    caption.vi ‏20 KB

  • How can I manually change the height of the "Type ...

    Hi all
    Just got automatically installed the latest 6.22 version of skype few minutes ago and I got a few questions. 
    First and foremost, how can I MANUALLY change the height of the textbox, where I type the messages. I would like to make it larger, like in the previous versions of skype. I don't want to move my mouse cursor through the entire monitor to reach this tiny textbox.
    And second, why you guys are trying constanly to ruin something that is working perfectly ? Going to revert to the previous version until you fix all these nuisances.
    Regards

    There is no way to do this, it is designed to be strictly landscape with keyboard, portrait without - not the best thought-out phone on the market, mainly geared towards compulsive texters and e-mailers.
    There's no way to know whetherNokia will change this with any future updates, perhaps you should make the recommendation to them directly using the 'contact us' link.

  • How can you add/change the currency rate in spro?

    Hi all,
    you can add a new currency code by going to spro --- general settings --- check currency codes
    for example: PERU ---> PEN
    But, how can we add/change the currency rate PEN in spro?
    for example: Peruvian Nuevo Sol     = 4,3567619
    Is it still in customizing? And if so, where can i find it?
    Many thanks in advance.
    Kind regards,
    Pamela.

    Hi Aman,
    I have entered the field to add the new currency rate.
    But the system doesn't want to valid my new rate.
    I get the following error message:
    "Input should be in the form ._,____ "
    Do you know how to override that command?
    Thanks.
    Regards,
    Pamela

  • Can I Programmatically Change the Active Group on a Hypertrend in DSC?

    I would like to know how to programmatically change the active group of a hypertrend in Labview DSC.  I saw a link which said it can be done in Lookout.  But in the DSC module, the active group is read only.
    I know of a hard way to do it.  I could save the hypertrend settings as xmlSettings to a temporary file.  The active group is one of the settings.  I could then change the active group in this text file to point to the new group and then reload the settings.  But this is not a clean way of dong it.
    Anyone know if there is a easy way?
    Solved!
    Go to Solution.

    I found a way to do it but its not very clean.  I dont know why there is not a function to change the current group.
    Here is how I did it.

  • How can I programatically change the slave acquisition mode of my pci-1409?

    In my LabVIEW application I need to be able to programmatically change the slave acquisition mode from standard to external HV lock. I couldn't find this property listed in the property node.

    Nan,
    When you change this property in MAX, you are actually modifying the camera file for the session (*.icd file). These file can be modified just like a text file. You could programtically modify parse and modify the "SlaveAcqMode (STANDARD)" line in the camera file to reflect the mode you want to use. Below is a KB that explains how to parse and modify an *.iid file, you can use the same method on the icd file.
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/ccc5bb5990aa416786256c23006e687c?OpenDocument
    Best Regards,
    Chris Drymalla

  • Can you programmatically change the width of columns in a table control\indicator

    Is it possible to programmatically change the width of columns in a table control\indicator ie to fit to width of the data or in my case the header information.

    Create a property node (or reference) and use the 'Active Cell' property to select which column you want to change and then use the 'Cell size'--> 'Width' property to change the size.
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    table.vi ‏33 KB

  • How do you change the nominal range settings from 0-10v to 0-1v

    Currently using a PCI-6052E with Mac OS, how do you change the resolution accuracy? In other words from say
    0-10V full scale for an AI to 0-1V full scale?

    Here is the information that you should follow when using DAQ with a Macintosh. I'm not sure whether you are using LabVIEW or some other programming language, so the two main references that you should refer to are the NI-DAQ Software Reference Manual for Macintosh and the LabVIEW Data Acquisition VI Reference Manual. Both of these resources are excellent sources of information and will explain to you anything you need to know about programming DAQ on a Macintosh.
    The NI-DAQ Software Reference Manual for Macintosh can tell you how to configure things such as Analog Input Mode (differential, RSE, NRSE), Range, Polarity, Analog Output Range, P
    olarity, Voltage Source, etc. Even reading just the first chapters of either of the above mentioned reference manuals should have you on your way.
    Hope this helps.
    Jared A

  • How do I programmatically set the scale range for the two y-scales of the two plots

    hi,
    I am using labview 8.2
    To programmatically assign a range to the y-scale of a plot I use a Property Node for the plot display and adjust Y.Scale.Range.Minimum.
    How can I assign the ranges of a plot with multiple y-scales?
    miethe

    One of the problems with using two Y scales is that the display can get very messy is you also want grids on the plot. To address this, I created the attached VI. After allowing the right axis to autoscale, it fine tunes the marker locations so the grid lines for the left and right side overlay each other.
    To use it all you have to do is write your data to the graph and then call this VI with a reference to the graph.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    Match Dual Y-Axis.vi ‏25 KB

  • How can I always change the color of certain letters?

    I know that sounds weird. But hear me out.
    I was reading an article about synaesthesia, and it seems that reading with certain letters always displaying in a certain color can do interesting things.
    I'm not trying to do anything too crazy, just a little experiment on myself.
    So I'm wondering if anybody knows how I may change the color of certain letters on my Mac? I realize that'll make some interfaces look screwy, and in some instances it may not be possible - but is there a way?
    Thanks!

    Kliegs wrote:
    I've never heard of anything like this, so I'm just curious if it exists.
    You and me both, let's wait and see what other say.  My guess would be that modifications of that type aren't possible w/o some serious "modifications" i.e. hacks, if even via that method, specifically regarding the operating system.

  • Can I programmatically change the printer paper size from ActionScript?

    Hi,
    I'm a newbie Flash/ActionSript developer and I have been searching for answers for a while with no luck. I wonder if I can get some pointers from this forum.
    I'm trying to programmatically print a movie clip to 8.5" x 11" plain paper regardless of the current paper size setting in the printer. e.g if the user's printer is currently set to use paper size A4, can I change the setting to Letter (8.5" x 11") from ActionScript at runtime? I use PrintJob class for printing the movieclip.
    According to the ActionScript online API spec ( http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context =LiveDocs_Parts&file=00002066.html), I can only READ the paper size setting after the call to PrintJob.start. I can't believe that we are not allowed to change the setting. Maybe I missed something here. Can somebody help me out?
    Thanks in advance!

    check your duplicate thread.
    and, please don't cross-post.

  • How can I permanently change the orientation of an I-Phone MOV file.

    I'm trying to burn DVDs for family members from some wedding videos I  took with my I-Phone.  Because I held the I-Phone in an upright, or  "portrait" position, the normal playback comes through in a "landscape"  orientation with the images laying sideways.  Within QuickTime Pro, I'm  able to rotate the viewing angle by 90 degrees to be viewed properly,  but when I save the adjusted settings, the original file remains  unchanged in its "un-rotated" format.  How can I change the actual,  native file format so that the orientation is correct for a DVD playback  that does not have the benefit of QuickTime functionality?

    The "normal" size of the source video is 1920 pixels wide x 1080 pixels high.  My goal is to crop some of both the top and bottom of the display area so as to reduce the size of the pillar box effect when I export the file in the 90-degree rotated position.  Within Photoshop I made as many as 12 different variations of masks using the same 1920x1080 dimensions.  But when I apply the masks, the resulting views I get are bottom left, bottom right, bottom middle, etc., but none of the masks will display any portion of the top half of my source video?
    Maybe it would be easier to run through the entire strategy here. First of all you have determine your workflow.
    1) First of all you have to decide if you are making a data DVD (one that plays on a computer) or a normal DVD that is to be played on a commercial DVD player. Based on your previous comments, I had assumed you wanted the latter.
    2) The next step is to decide which DVD standard you need for the DVD player. Am assuming you are creating an NTSC DVD here which means your final encode matrix will be 720x480.
    3) The next step is to decide whether you are creating a widescreen or a full screen DVD. I.e., you need to decide whether you need to mask or crop your content to a 16:9 or 4:3 aspect ratio.
    4) At this point I would decide upon a specific workflow strategy—i.e., whether to crop or mask the content. Since you mention the creation of masks, I assume this is your preference.
    5) Having answered the above questions, I would now open the rotated file in QT 7 Pro as a 1080x1920 display file.
    6) At this point I would probably scale the display dimensions as needed to most easily work at your preferred target aspect ratio. By this I mean your maximum width is 1080 which works well at a 4:3 aspect (1080x810) but not so well as 16:9 aspect (1080x607.5) mask. Obviously in the latter case dimensions something like 960x540 would be easier to work with and I would likely "scale" the display width to 960 in the "Keep Aspect" mode and allow QT 7 Pro to scale the verticle dimension as it pleases.
    7) Now is the time to create the white mask background at the same dimensions as your scaled or unscaled display screen as currently open in QT 7 Pro.
    8) To create the actual mask, you now black out the area (e.g., 1080x810 within a 1080x1920 screen or 960x540 within your "scaled" display screen) you want to display in your final DVD. This area can be centered or offset high or low to center the focus of attention in your final DVD.
    9) Once you have finished step 8, you can export your properly oriented and masked content to any compression formats compatible with your DVD authoring application which will properly scale, convert, and author the content for DVD burning according to the proper widescreen or full screen settings selected by you.

Maybe you are looking for