How to Programmatically Set Scale on DAQmx Channel? Possible LabView Bug?

Hi folks.  I have researched this question here on the forums and think I know what I need to do, but it doesn't work.
What I'm Trying to Do
I am creating a DAQmx Analog Out task that will write to a dozen channels.  I would like to set the scale on each of those channels to one of a handful of custom scales that I've already defined in my project.  From reading various posts on this forum, it sounds like I want to pull each channel out of the task using the DAQmx Task property node, then set each scale by writing to the AO.CustomScaleName property within the DAQmx Channel property node.  See the attached screenshots and VI file.
The Problem
I keep getting error 200378 "Custom scale specified does not exist".  The custom scale definitely exists in the project, but the VI won't recognize it.  It sounds similar to the bug described in this thread:  http://forums.ni.com/t5/LabVIEW/Why-do-I-receive-Error-200378-quot-Custom-scale-specified-does/td-p/...  However, I've tried the various workarounds mentioned in that thread (opening VI outside of project, then from within project, etc) and I don't get any different results.  I'm running LV 8.6.1
Questions
Does this VI work for anyone else once you've defined a custom scale with the same name as the one in the VI?
Am I doing something obviously wrong?
Is there a better way to do this?
Thanks for any advice, it is much appreciated.  I've attached screenshots of both the VI and the Project window showing the custom scale exists, and I've attached the VI itself.
Attachments:
custom_scale_screenshot.JPG ‏38 KB
project_explorer.JPG ‏68 KB
daqmx_task_property_nodes.vi ‏64 KB

This workaround isn't exactly what you are trying to do, but I have made a set of VI's that will let you open up the DAQmx Assistants from LabVIEW code programmatically.
Programmatically Call NI DAQmx Assistants
You can call the VI to edit a channel and manually reassign the scale if you want to avoid going straight to MAX.

Similar Messages

  • How to programmatically set initial password when a user is created in OID

    We are using the odihragent synchronization process to automatically create users in OID when an employee record is created. We would like to set the initial password for the newly created user to their last name + the last 4 digits of their SSN.
    The odihragent process is successfully creating the user in OID and populates the last name and the last 4 digits of the SSN in OID. According to an open SR I have with Oracle, we cannot use the odihragent process to set the initial password because any time the employee record is updated, the synchronization process will reset the password to last name + SSN. They have recommended that we use a pl/sql plug-in to set the password using the WHEN_ADD plug-in procedure.
    I am new to using OID and plug-ins and the examples provided in the Developer's Guide are limited.
    I would like to know if anyone else is using plug-ins or another process to set initial passwords when a user is created? If you are using plug-ins would you be willing to share a code sample?

    I am surprised that I have not received any responses... Surely there are others who are experienced with programmatically setting passwords when new users are programmatically created. Does anyone have any pointers on how to best accomplish this?

  • How can I set up a Mainstage channel strip to recognize coarse detune?

    Can anyone clue me in on how to get Mainstage 2 to recognize coarse detune?  Right now I have it set up so that a mainstage channel strip recognizes standard pitch bend messages and  I can set the pitch bend range of the associated instrument to 12 (the default for the channel strips appears to be 2), and so standard pitch bend works fine.   But when the pitch bend messages I'm sending are coarse detune, I'm getting zip...nada...nuttin -- even when I have set the pitch bend range for the instrument on the channel strip set to 12.  
    I don't want to just offset the pitch by a set amount; I want to use coarse detune to bend the pitch by semitones during a performance.  If anyone here has any suggestions or knows how to make this happen, I'd really appreciate your help --
    thanks in advance,
    Lipp 

    sblipson wrote:
    (the default for the channel strips appears to be 2), and so standard pitch bend works fine.  
    Hi
    The default bend range is set within the Instrument plugin setting associated with a channel strip.
    sblipson wrote:
    But when the pitch bend messages I'm sending are coarse detune, I'm getting zip...nada...nuttin -- even when I have set the pitch bend range for the instrument on the channel strip set to 12.  
    I don't want to just offset the pitch by a set amount; I want to use coarse detune to bend the pitch by semitones during a performance.
    This could depend on the Instrument plugin (which on eare you referring to?).
    Try making a knob or fader object in Layout mode and MIDI learn it to incoming PitchBend messages, then map that control to the dtune function.
    CCT

  • How to programmatically set the value to current Page layout property?

    Hi,
    How do I set any text value to the current page layout [comment] property and save it.....here my current page is using a custom page layout called spPageLayout1
    To be very much generalized how I can set and save any value to current page property programmatically....on load event I need to set the value.
    It is a publishing page layout.

    Hi,
    According to your post, my understanding is that you want to set the value to current Page layout property.
    To get current page property, you can refer to:
    How to get current Pages details in SharePoint2010 publishing site
    Get Content Field Value in Article Page
    To get current page layout property, you can refer to:
    PublishingPage.Layout Property (Microsoft.SharePoint.Publishing)
    PageLayout.Title Property (Microsoft.SharePoint.Publishing)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to programmatically set the real-time CVI startup DLL?

    Dear NI Support Engineer:
    I'm part of a team of software engineers working on a real-time aerospace app at Honeywell (Coon Rapids, MN campus).  We're using LabWindows/CVI 9.0 and three LabView 8.6 real-time modules.
    Up until now, we've been using the CVI debugger to launch our real-time apps or just copying the app DLL to C:\ni-rt\cvi on the real-time box and setting it as the default startup DLL.
    What we need to do now is create our own directory structure at the root of C: on the real-time box (which, by the way, is using the Reliant file system).
    In fact, we have created directory ug7500 at the root of C: on the realtime box, and two subdirectories (one for data and one for results) directly under directory ug7500.  We'd like to place all of our app DLLs in the ug7500 directory and have the ability to change the default startup DLL programmatically.
    We've been using your LabWindows/CVI Real-time File Copy Utility to set the startup DLL whenever we're not using the debugger.  That was just fine for the first stage of our development.
    At this stage, however, we need be able to set the startup DLL programmatically.  We have not been able to find out how to do this from reading the real-time module documentation.
    Can you either point us at some documentation on programmatically setting the default startup DLL, or e-mail us the instructions, or give us a phone call and explain what steps we must take.
    Thank you very much.
    Vic
    763-957-4168

    Hello All,
    For the reference of anyone else trying to do this, you can modify the INI file to change the startup DLL. Using the INI instrument that ships with CVI (C:\Program Files\National Instruments\CVI90\toolslib\toolbox), you can find the StartupDLLs tag and replace the last value with your startup DLL, such as:
    #include "inifile.h"
    #include <cvirte.h>
    static int status;
    static IniText myINIFile;
    int main (int argc, char *argv[])
     if (InitCVIRTE (0, argv, 0) == 0)
      return -1;    /* out of memory */
     myINIFile = Ini_New (0);
     status = Ini_ReadFromFile (myINIFile, "c:\\ni-rt.ini");
     status = Ini_PutRawString (myINIFile, "LVRT", "StartupDLLs", "c:\\NI-RT\\system\\cvi_lvrt.dll;c:\\ni-rt\\system\\nidevldp.dll;nisysapirpc.dll;niorbp.dll;c:\\ni-rt\\system\\mxsemb.dll;c:\\ni-rt\\system\\nipxism.dll;c:\\NI-RT\\cvi\\myStartup.dll;");
     status = Ini_WriteToFile (myINIFile, "c:\\ni-rt.ini");
     return 0;
    Right now, there are some caveates with using CVI 9.0 to manipulate an INI file to be used on an RT target. The INI functions currently add line breaks automatically for large tag values and adds quotes around the values. For many INI files this is ok (such as TestStand INI files), but it will not work on an RT target. To remove these features, modify the following lines of the inifile.c file located in the same directory as the INI instrument:
    1. On line 38, change the default value of INI_NUM_CHARS_PER_LINE from 80 to a large number such as 8000.
    2. Comment out line 953 (newEntry->addMarkerQuotes = addMarkerQuotes;
    Now you should be able to programmatically change the INI file of your target machine and, therefore, change the startup DLLs.

  • How to Programmatically Set the limit (max, min input) of a control inside a cluster?

    I want to programmatically set the limit (max, min input) of a control inside a cluster. (see attached VI).
    The max, min value will be read from a file. The input of the control must be within the range defined by the max and min value.
    Can anyone tell me how to do it?
    Thanks a lot for your kind help.
    Xiaogang

    Accessing the properties of a cluster (or array) is not a trivial operation until you have done it once. It's a two step (at least) process : first, ask for a reference (array of...) to the objects contained in the cluster, then tell LV what kind of object you are adressing.
    See the attachment.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    How to set limit[1].vi ‏52 KB

  • How to programmatically set the Visibility of an Iview INVISIBLE ?

    Hi ..... I need to programmatically set the visibility of an IView for a user Invisible - In order to achieve that , I am trying the below code....But getting errors-
    Code -
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sapportals.portal.pcd.gl.PcdInitialContextFactory");
                 env.put("com.sap.portal.jndi.requested_aspect","com.sap.portal.pcd.gl.PersistencyAspect");
    env.put("java.naming.factory.object", "__IPcdContext__");
    InitialContext iCtx = null;
    String iViewID = "pcd:portal_content/ABC/1Portal/mywork/iviews/XYA_iViews/adf.ivw_ess_jspdynpage";
                 iCtx = new InitialContext(env);
                 IiView result =(IiView)iCtx.lookup(iViewID);     
                 IiViews iViewSrv = (IiViews)PortalRuntime.getRuntimeResources().getService(IiViews.KEY);
    INewObjectDescriptor IVtoCreate =(INewObjectDescriptor) iViewSrv.instantiateDescriptor(CreateMethod.NEW,"par:/applications/com.sap.km.cm/components/navigation",request.getUser());
    IVtoCreate.putAttribute("com.sap.portal.navigation.invisible", true);
    the above method putAttribute is not apllicablt for (String,Boolean)\
    Please suggest as to how can I programmatically set an Iview Visible/Invisible .

    I think the property is com.sap.portal.navigation.Invisible with a capital I for invisible...
    This blog has an example: Hiding portal role content with a simple iView

  • How to programmatically set formatted javascript dates for validation?

    How does one programmatically set formatted javascript dates for validation?
    "12/31/2011" does not seem to work?

    ourDate.rawValue = "2011-12-31";  // works
    NOTE:  if you have a hierarchy issue you may need something like
    root.body.table.detail.ourDate.rawValue = "2011-12-31";

  • How to programmatically set an error message for a validation rule of an EO

    Hello,
    Is there a way to programmatically set an error message when validating any data on an EO?
    It seems the API of the EO interface does not have any method to be defined for my needs..
    thanks

    The other option is that for the error message you can define a groovy expression to call an EO method.
    I documented this on my blog
    http://blogs.oracle.com/grantronald/entry/dynamic_error_messages_from_a
    Regards
    Grant

  • How to programmatically set item value

    I created button ‘Accept ALL’ within region to set all values of field to ‘Y’ when clicked on and another button ‘Reject ALL’ to set all field values to ‘N’. Values are intialy derived from
    Region Source (partial query only):
    ...DECODE(eval_contract_accepted_ind,'Y',htmldb_item.text(6,'YES',3,3),'N',htmldb_item.text(6,'NO',3,3),NULL,htmldb_item.select_list(6,'Y','Yes;Y,No;N')) accepted,...
    So values in that field are populated conditionally from static lov Yes;Y,No:N
    I created two processes and allocated them to the relevant button, but non of the values get set.
    ACCEPT_ALL process:
    for i in 1..htmldb_application.g_f01.count
    loop
    if htmldb_application.g_f06(i) not in ('YES','NO') then
    htmldb_application.g_f06(i) := 'Y';
    end if;
    end loop;
    REJECT_ALL process:
    for i in 1..htmldb_application.g_f01.count
    loop
    if htmldb_application.g_f06(i) not in ('YES','NO') then
    htmldb_application.g_f06(i) := 'N';
    end if;
    end loop;

    Hi,
    According to your post, my understanding is that you want to set the value to current Page layout property.
    To get current page property, you can refer to:
    How to get current Pages details in SharePoint2010 publishing site
    Get Content Field Value in Article Page
    To get current page layout property, you can refer to:
    PublishingPage.Layout Property (Microsoft.SharePoint.Publishing)
    PageLayout.Title Property (Microsoft.SharePoint.Publishing)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to programmatically set Show Comments?

    Hi,
    I can't find the right method to activate Show Comments on the Review Tab. It isn't recordable either. Word 2013.
    Thanks,
    Peeter

    Thank you,
    at the same moment I received your answer I just found out how to accomplish what I want :-).
    "ActiveWindow.View.ShowComments = True" does show that you have comments in the document, but it doesn't necessarily show the comments themselves.
    That is dependent of another setting: "ActiveWindow.View.RevisionsFilter.Markup = wdRevisionsMarkupAll" which make the comments visible on the side.
    thank you all for your attention,
    Peeter

  • How do I set up a podcast channel?

    I am trying to learn how to make a podcast channel and share it on my web site

    Please start by reading this page, which explains the basics of podcasting:
    http://rfwilmut.net/pc
    and do come back with any queries you have.

  • How can I set the parameters of global channels and tasks previously created inside my applicatio​n?

    Hi everyone !
    Before proceeding to the description below I think it´s important to say that I´m using NI USB-6008 as DAQ device and the driver used is DAQmx 7.5.
    I´m currently developing an application into which I intend to be able to have complete control of the DAQ device being used, i.e, I´ll be able to create, delete and change the configuration of global channels and tasks previously created, among other things.
    To achieve the ends specified above I´ve already developed two vis, one to create global channels and the other to create tasks, and these two are doing a fine job. After this, I thought I came to the easy part ... I think I couldn´t be far for the truth! I thought that everything I should do was to specify which channel or task I´d like to configure and then use a property node to get the results I wanted, but it´s not working ...there are some DAQmx property nodes I thought I could use to do it  but I didn´t find a way to change the configuration of the global channels, and none of these property nodes seemed to work, i.e, although the simple vis used to test them ran the chosen parameters didn´t alter at all, after each execution I used MAX to see if they had changed, and to my chagrin they hadn´t.
    Can anybody lend me a hand with this problem? As always, any help would be deeply appreciated !    

    Hi Giovani,
    There is a developer zone tutorial that discussus some advanced data acquisition features including programmatic saves of NI-DAQmx tasks, global channels, and scales.  This tutorial also includes an example program.
    I wrote a short program that creates tasks in MAX. Whenever I wanted to change a part of the task, I would just change that feature in the example program. Take a look at the examples and please let me know if you have any further questions.
    Regards,
    Hal L.
    Attachments:
    create task example.vi ‏33 KB

  • How do i set the time frame of a waveform chart programmatically to be a 30 sec window or a 24 hour window

    i'm using LV7.0 and what i need to do is to be able to set the time frame or range of a waveform chart programmatically before i start taking and plotting data. sometimes this window needs to be 30s wide and sometimes it needs to be 24 hrs wide. (in the first reference, i need the chart to fill up with 30s of historical data then the whole chart scrolls with each new data point). the data acquisition records data at a rate of once per second. i've tried to use the chart properties of XScale.offset, XScale.Range.Minimum and XScale.Range.Maximum but no matter what i do the time-stamp on the x-axis is always "00:00:00 PM" and "MM/DD/YYYY" even though values are seen being plotted on the right side of the chart as expected.
    Attachments:
    BX0265 ShelfLife DAQmx.vi ‏120 KB

    Okay, there seems to be some confusion here -- the X axis values are of type double, but they can be represented in the HH:MMS MMD:YYYY format if you want in which case it interprets the floating point as the number of seconds since 6pm Dec 31, 1903. 
    You can programmatically set this value using the XScale.Minimum and XScale.Maximum properties, but note that if you wire a waveform to the chart after setting these values the t0 parameter will override what you set using the property node for XScale.Minimum.  If instead you leave the t0 parameter empty you can use the XScale.Offset property and wire the same value in that you wire to XScale.Minimum.  Changing the amount you add to XScale.Minmum to obtain what you wire into XScale.Maximum will determine the time window size.
    Doug M
    Applications Engineer
    National Instruments
    For those unfamiliar with NBC's The Office, my icon is NOT a picture of me

  • How can I set a delay between the measuremen​t of different channels..​.?

    Hello everyone,
    I am using Labview 8.0, and a PCI 6221 card. (windows XP).
    I am using the 8 AI of the card to measure 8 Voltages (diff. mode).
    The problem I have is that I get an offset except on the first channel I measure. If I set the DAQ assistant like this : AI0;AI1;AI1. This is what I measure : 0.320V;0.1695V;0.168V
     I only get the offset  with the first AI1 and not the second AI1 (0.168 is the correct value). I suppose the multiplexer hasn't got the time to change impedance when changing from AI0 to AI1.
    I have attached a simplified version of my program where I am measuring 3 channels, and generating a square wave analog output.
    My idea is to introduce a delay between the change of channels....  Is that a good idea...? and I am sure there is a very simple way to do this based on my program, but I don't know how. How long should the delay be?  Or any other idea...?
    Thanks for your help,
    Marc
    Attachments:
    forum.vi ‏71 KB

    If I choose just one channel ( AI0, AI, AI2,....or AI7) I have no offset. The offset only occurs when I set more than one channel to be measured ( but the first channel in the order of reading is always fine what ever it is). I have explained my problem in a previous post :
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=257677&query.id=32291#M257677
    I have some noise on my measures (roughly +/5 mV), so for the moment I am taking 1000 samples every 1ms on each channel and making an average of the 1000 samples. 
    I will try your solution : taking a look at the first points of my measures to see if the offset goes away quickly or not. However since I have been  making an average on 1000 points at 1Khz, if I get a 2mV offset (after making the average), it means there are many points conerned by the offset.... I will see that anyway when looking at the 1000pts.
    I don't have much experince in this, but I am surprised I have to deal with this kind of multiplex problem on a NI card. What do you think about it...?  Does it surprise you...? What could I be doing wrong ?
    Thanks a lot for your help anyway 
    Marc

Maybe you are looking for

  • EPS Fonts using PrintToPrinter and export to PDF on web server

    Post Author: leighlmorgan CA Forum: .NET I'm trying to print a Crystal10 report from a web server using PrintToPrinter and exporting it to PDF at the same time for audit purposes.  My problem is that the report uses Rotis EPS font which doesn't print

  • Why would I need to use LiveCycle Data Services in a Flex app?

    I cannot figure out what additional functionality is provided by using LiveCycle Data Services in my Flex apps.  I cannot get a clear understanding of how using LiveCycle Data Services would benefit my applications.  Does someone out there use LiveCy

  • Can you lay out books in Pages 09

    I am using an old version of QuarkEXpress and would like to use Pages 09 that I just purchased. Is it possible to layout small books (16-32 pages) with Pages?

  • My alarm doesn't ring

    Can anyone help me on this part of the program my version is using 6i and i wanna make the led light up when the result is all "0" ...i only got the sound but not the light Attachments: alarm.vi ‏29 KB

  • How do I get repeat voicemail alerts

    How do I get repeat voicemails on the Iphone 4.