How do I use a CNiDAQmxTask with multiple channels?

My last project from three years ago utilized Visual Studio 6.0.  I am now using VS 2005.and created a "NI MFC DAQmx  DLL".
I used the wizard to create a CNiDAQmxTask class called CDAQmx1124VOutTask  for the 1124 card.  The class now contains six different voltage channels in the Configure function.  How do I write to a single channel? 
Boy, C++ examples for solutions using the DAQmx Assistent are non-existent.  All I find are C# examples, or native DAQmx funtions.
The best I have been able to come up with is this that will compile.
CDAQmx1124VOutTask   m_1124VOut;
m_1124VOut.Start();
CNiDAQmxAnalogSingleChannelWriter* writer = new CNiDAQmxAnalogSingleChannelWriter(m_1124VOut.Stream);
writer->WriteSingleSample(TRUE, 12.);
delete writer;
Which output on the card will end up writing the 12 volts?  Do I need to have the DAQmx Assistant create a new  CNiDAQmxTask
for each output on the card?  Any help or example links would be greatly appreciated.
TIA
Eric 

Hello Eric,
The question of which output on the 1124 card will write the 12 volts depends on how you configured the DAQmx Task.  If you specified all six channels, then you would need to create an array of data that is 6 elements in length.  The first element in that array would be written to AO channel 0. The second element in the data array would be written to AO channel 1, and so on. So this answers the question about needing to create separate tasks for each individual channel.  It would suffice to specify all of the physical channels in one task, and then specify the voltage updates to each channel based on the entries in the array. You can find examples by going to the following (or a similar) location in the directory structure of your computer (Windows OS assumed).
C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\MStudioVC2005\Analog Out\Generate Voltage
Best wishes,
Wallace F.
National Instruments
Applications Engineer

Similar Messages

  • How do I use your iPhone with multiple iTunes libraries

    Hi, I have my music spread out between 3 seperate Itunes libraries on 3 different profiles on my computer. I have the newest generation Ipod Nano, Ipod Shuffle, and Iphone 4s. My Ipod's are both full, so I've decided to start putting music onto my phone. With my Ipod's, I can plug them into one profile on the computer, download the music on the Itunes library that exists on that profile, then do the same with the other profiles with no issue. However when I try to do this with my phone, It asks me to erase the music I have gotten from one Itunes library and sync with the current library, as soon as I plug it in to a different Itunes on one of the other profiles. I have my Iphone configured with the Manually manage music option, and I still haven't found a way to use my Iphone with multiple music libraries. PLEASE HELP

    http://support.apple.com/kb/PH12113 - If you use manual syncing, you can sync items from more than one iTunes library to your iPod. (You can sync iPod touch, iPhone, and iPad with only one iTunes library.)
    http://support.apple.com/kb/HT1202 - When manually managing content, you can add content from multiple libraries to your iPod or iPad. Even when manually managing music, some content may be available from only one library at time. This includes all content on iPhone and video content on iPod and iPad.
    They seem inconsistent as far as the iPad is concerned but in both articles the iPhone appears to only be able to sync to one library at a time.
    Troubleshooting Home Sharing - http://support.apple.com/kb/TS2972

  • How do I use AI Temperature with multiple thermocouple types?

    Hi,
    I am trying to read temperatures from thermocouples. I have the PXI-1112 module. I have 3 thermocouple types. Is there a way to use the AI temperature VI to process all thermocouples with a single wire connection? The VI has an input for thermocouple type, but does not accept arrays. How can I assign a different thermocouple type to each channel?
    Thanks

    Hello Villalro,
    Are you using the DAQmx Create Virtual Channel.vi in your
    application?  Below is a great example of
    how to measure three different types of thermocouples all in the same task.  If you are still not able to create the task
    correctly, you might try building it in a DAQ Assistant.  Once you are able to create the task
    correctly in the DAQ Assistant, you can convert it into DAQmx code.  Right-click on the DAQ Assistant and then select
    Generate NI-DAQmx Code.
    Message Edited by Robert F on 08-08-2007 09:40 PM
    Respectfully,
    Rob F
    Test Engineer
    Condition Measurements
    National Instruments
    Attachments:
    temp_forums.JPG ‏65 KB

  • How do I use setString() method with multiple bind variables

    I have two setString() statements and a select union statement. My class compiles but only displays the data for the first table ignoring the second setString() statement. But When I replace the "where id=?" with "where id=12 or someid", it works and displays all data found in both tables.
    Am I not properly using the setString() method?
    public class LdData{
    private String id;
    public LdData(){
    public void setId(String id)
        this.id = id;
      public String getId()
        return id;
    public Collection getLdData() throws Exception{
                    List rows = new ArrayList();
    //connection statement
    String sql_query="SELECT a,b FROM table1 WHERE id = ? " + " UNION " + "SELECT a,b FROM table2 WHERE id= ?";
    try {
                            conn = ds.getConnection();
    pstmt = conn.prepareStatement( sql_query );
    pstmt.setString(1, this.id);
    pstmt.setString(2, this.id);
    rst = pstmt.executeQuery();
    while (rst.next()) {
    //dataEntry.java - contains my getter and setter
    dataEntry info = new dataEntry(rst.getString("a"), rst.getString("b"), this.id);
    rows.add(info);
    //catch all SQLexceptions, NamingExceptions
    //close all connection
    return rows;
    //dataEntry.java - dataEntry class
    private String a;
    private String b;
    private String id;
    public dataEntry(String a, String b, String id){
    seta(a);
    setb(b);
    setbdate(bcode);
    this.a = a;
    this.b = b;
    this.id = id;
    public String getA(){
    return a;
    public String getB(){
    return b;
    public String getId(){
    return id;
    public void setA(String a){
    this.a = a;
    public void setB(String b){
    this.b = b;
    public void setId(String id){
    this.id = id;
    //index.jsp - displays data
    <jsp:useBean id="test" class="lddata" scope="request">
    <jsp:setProperty name="test" property="id" param="id"/>
    </jsp:useBean>
    <display:table name="${test.lddata}"/>

    This just doesnt make sense to me at all. :( Could it be a naming issue? I mean both tables have the same field names but different data information
    so the union will never sort and choose. And the weirdest thing is that
    //this works -
    ->String sql_query="SELECT a,b FROM table1 WHERE id = TU234 " + " UNION ALL" + "SELECT a,b FROM table2 WHERE id= TU234";
    //I also tried this, but the second statement doesnt work
    ->pstmt.setString(1, "TU234"); //this works.
    ->pstmt.setString(2, "TU234"); //this doesnt
    //It also tried this, it worked for both set statements, but I need it in an list or so.
    while (rst.next()) {
    String a = rst.getString(a);
    String b = rst.getString(b);
    String id = rst.getString(id);
    System.out.println(a+""+b+""+id);
    }Is there anyother way I can collect the data into a jsp page without using javabean?

  • How do I use Aggregate formulas with multiple measures from different tables?

    I have three measures:
    Cash - this sums the £ column in my 'Cash' table.
    Online - this sums the £ column in my 'Online'
    table
    Phone - this sums the £ column in my 'Phone'
    table
    How do I now do aggregate formulas that combine this three measures, for example:
    Find the MIN or MAX of the three measures
    Average the three measures
    I have worked out how to use simple aggregation like add, subtract etc through the CALCULATION formula, but doing the average or MIN/MAX does not work.
    Thanks.

    Hi, thanks for the suggestions.
    Re: Julian
    I had thought about this method, unfortunately it is not always three measures so this doesn't work.
    Re: Tim
    I was not aware of the APPEND formula however I will definitely give it a try and report back - I can see this one working.
    Re: Michael
    Apologies, I have never found a an easy way of simulating some of my issues since it would mean creating a new power model and establishing quite a number of relationships. I definitely see the benefit when posting on the forum since it makes my issue far more
    accessible, unfortunately when I've posted before I've generally been racing against time and not had time to prepare this anonymised data. Is there a quick way of  doing it?

  • How do I use the cloud with multiple iPhones?

    I just got an iphone through work and I accidently added my 'personal' Apple ID on the account.  How do I remove it?  If I choose delete account will it effect my use of icloud for my personal phone?
    thanks

    Settings>iCloud, scroll to bottom of screen and tap Delete Account.  This will only disconnect the device from the account, it won't delete any data on icloud.  Then you can enter a different account ID if you want.

  • How can I use a KeyListener with multiple JTextFields?

    I am creating a program in which i need to read from whichever textfield the user chooses to enter into. reading from these textfields i can tell when enter is pressed i just cant tell where it is pressed. can anybody help me out so i can find out where enter is pressed?

    please, somebody help.

  • How can i create  excel sheet with multiple tabs using utl file?

    how can i create excel sheet with multiple tabs using utl file?
    any one help me?

    Jaggy,
    I gave you the most suitable answer on your own thread yesterday
    Re: How to Generating Excel workbook with multiple worksheets

  • How to use an Applet with multiple-jars

    Hi everybody,
    I would like to use an applet with multiple-jars.
    ex:
    <applet codebase="." archive="main.jar,Addon1.jar,Addon2.jar" code="Appl.class" id="MyTest" width="600" height="30">
         <param name = "MyParam" value = "1;2">
    </applet>
    An applet with :
    -> 1 Main JAR
    -> X Addon JARs (X : a parameter "PRM")
    My main part knows the parameter "PRM" -> knows which addon to use
    My question is, how do I use classes from addons, inside the main part (and vise-versa if possible) ?
    Thanks in advance
    Best regards

    I try what you say :
    === HTML ===
    <applet codebase="." archive="Main.jar,Addon1.jar" code="Test.Appli.class" id="MyTest"  width="600" height="30">
         <param name = "myPrm1" value = "1;2">
    </applet>=== MAIN JAR ===
    package retest;
    interface InterfAddOn1 {
        public void AfficheTest1(String sStrTest);
    public class Ctest {
        public Ctest() {}
        public void unTest(String sClassNameR) {
          String sClassName = "PackTestAddon.TestClass1";
          try {
              Object oObj = Class.forName(sClassName).newInstance();
              ((InterfAddOn1) oObj).AfficheTest1(" Hello World ");
          } catch (ClassNotFoundException ex1) {
              System.out.println("ERR Class not found");
          } catch (IllegalAccessException ex1) {
              System.out.println("ERR Illegal Access");
          } catch (InstantiationException ex1) {
              System.out.println("ERR Instantiation Exception");
    }=== ADDON JAR ===
    package PackTestAddon;
    public interface InterfAddOn1 {
        public void AfficheTest1(String sStrTest);
    package PackTestAddon;
    public class TestClass1 implements InterfAddOn1 {
        public TestClass1() {}
        public void AfficheTest1(String sStrTest) {
          System.out.println("Test :"+sStrTest);
    }I have this error :
    Exception in thread "AWT-EventQueue-2" java.lang.ClassCastException: PackTestAddon.TestClass1
         at retest.Ctest.unTest(Ctest.java:58)
         at retest.Appli.actionPerformed(Appli.java:442)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    I don't really know why ... =;o(
    Helppppp ... Thanks in advance.

  • How can I use an iPad with two itunes accounts?

    How can I use an iPad with two itunes accounts?
    Hi there
    My partner has a works iPad, which has her works Apps on (ones that are specifically made by her company and are NOT available in the App store).
    What I want to be able to do is to ALSO have my itunes account on there so that I can put all the apps I have purchased previously from my iPhone on it.
    This is so I can put on VLC player (thats already in my itunes account) so I can add videos to the iPad.
    How do I do this please?
    I tried it before by connecting it to my mac, but it wiped everything off the iPad completely and also deleted the data settings for using 3G.
    So I want to avoid this happening again the future as it had to be sent back to her head office to be sorted again.
    Any advise please?
    Thanks

    You can't. The iPad is desgined to be a 'one user' device and only really works with one apple ID at a time.
    The only way would be if she, at work and with her work apple id, downloaded your apps (repurchasing them of course).
    It's not meant to be a multiple user/multiple ID device.

  • How do you get a line with MULTIPLE fields to WRAP ?

    How do you get a line with MULTIPLE fields to WRAP ?
    Good afternoon everyone...
    THE PROBLEM: Why doesn’t a line with multiple fields WRAP?
    HYPOTHETICAL EXAMPLE/WHAT I”D LIKE TO SEE
    If I have 2 fields on a line (this is now a hypothetical example and nothing to do with my actual report)….let’s call them field A and field B. And if field A has values of all ‘X’ and field B has values of all ‘Y’…then….the normal case would be (ignore dots – only for spacing):
    A……………………… B
    XXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYY
    But what if A is too long? I would want to see B wrap onto the next line like this:
    A……………………………………………………B
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX YYYYYY
    YYYYYYYYYYYYY
    And similarly….if B is extra long, can the line print as:
    A………………………. B
    XXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYY
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    I don’t want the case where B is long and I get:
    A………………… …B…
    XXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYY
    ………………………..YYYYYYYYYYYYYYYYYYYYY
    I can see how you can wrap an individual field like that…but how can you WRAP a line of[b] fields within the frame so it wraps to the BEGINNING of the frame on next line?
    My SPECIFIC CASE
    I have a report that I have stripped down to a simple structure for the purposes of this explanation.
    My DATA MODEL has the main QUERY (for plant family and species data). The columns of the query are divided into 2 groups. The 1st GROUP contains the family data. Below that is the rest of the species data in a 2nd GROUP.
    Linking from the 2nd species group (above) is a new QUERY to extract REGION data based on the common key field. Under this 2nd query is another group with all the REGION columns.
    The LAYOUT MODEL has a group frame (the main , base one)
    On top of this is a repeating frame based on the 1st group (family data).
    On top of this is another repeating frame for the 2nd group (species data).
    On top of this is 2 Frames on the same line line. The 1st frame contains columns from the species group .
    The 2nd frame on this line is a repeating frame. The PRINT DIRECTION for this frame is ACROSS/DOWN. It repeats details of the REGION where the species is found. These columns come from this group come from the REGION QUERY and GROUP.
    All fields on the report line have variable horizontal elasticity.
    The problem is that when there is too much data on the line, it does NOT WRAP to the 2nd line.. It TRUNCATES.
    Can the line be made to WRAP????..
    In my current report, 1 of 2 things is happening:
    1) All fields print on the line until it hits the page boundary and then it just stops. Truncated!
    2) All fields print on the current line, then Oracle Reports throws a new page to print the REMAINDER of the long, input line
    But I would like a LONG line to continue printing onto the following line of the same page.
    I have tried all combinations of the elasticity fields and the ‘ADVANCED LAYOUT’ properties.
    I have been focussing my attention with this problem on the frames .
    We are using REPORT BUILDER V 6.0.8.26.0
    Thankyou to anyone who may offer assistance.
    Tony Calabrese.

    Steve,
    you gain 1 thing, but you lose something else!
    This thing is SO frustrating!
    Hey Steve! Good afternoon.
    I've done as you suggested....I have a long text boilerplate item - the only 1 on the line...and it has all the column in it.
    So it looks like:
    &col1 &col2 &col3 &col4 &col5 etc etc etc
    And the line expands nicely to each field's requirements.
    And when it gets to the right page boundary...it WRAPS to the next line! Beautiful!!!
    The only thing is that...when I had individual fields across the line I was able to create format triggers for those fields. And in doing so I was able to reduce the font and change the justification. I had to do that because some of the fields had to appear superscripted.
    So I wanted something like (ignore the dots):
    ...................................ppppp
    AAAA BBBB CCCCC DDDD EEEE FFFFFF
    So the field of 'ppppp' appeared slightly higher on the line than the other fields...
    I can't see how I can do this with a single TEXT field containing all the &COL values.
    Have you ever come across anything like this?
    Thankyou again,
    Tony Calabrese 12/4/2007

  • Can bookmarks be protable for multiple computers? Is it an option to log on and use my bookmarks with multiple computers and locations? Thanks

    Can bookmarks be protable for multiple computers? Is it an option to log on and use my bookmarks with multiple computers and locations? Thanks

    Profile is a folder which store all your personal data in a safe place
    * https://support.mozilla.com/en-US/kb/Profiles
    You can use this button to go to the current Firefox profile folder:
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    here explain how to backup profile
    * https://support.mozilla.com/en-US/kb/Backing%20up%20your%20information
    Here explain how to restore it
    *https://support.mozilla.com/en-US/kb/Recovering%20important%20data%20from%20an%20old%20profile

  • How can i use my iphone with more than one itunes

    how can i use my iphone with more than one itunes

    Sync iPod/iPad/iPhone with two computers
    Although it isn't possible to sync an Apple device with two different libraries it is possible to sync with the same logical library from multiple computers. Each library has an internal ID and when iTunes connects to your iPod/iPad/iPhone it compares the local ID with the one the device normally syncs with. If they are the same you can go ahead and sync...
    I have my library cloned to a small 1Tb USB drive which I can take between home & work. At either location I use SyncToy 2.1 to update the local copy with the external drive. Mac users should be able to find similar tools. I can open either of the local libraries or the one on the external drive and update the media content of my iPhone. The slight exception is Photos which normally connects to a specific folder on a specific machine, although that can easily be remapped to the current library if you create a "Photos" folder inside the iTunes Media folder so that syncing the iTunes folders keeps this up to date as well. I periodically sweep my library for new files & orphans with iTunes Folder Watch just in case I make changes at one location but then overwrite the library with a newer copy from the other. Again Mac users should be able to find similar tools.
    As long as your media is organised within an iTunes Music or Tunes Media folder, in turn held inside the main iTunes folder that has your library files (whether or not you let iTunes keep the media folder organised) each library can access items at the same relative path from the library folder so the library can be at different drives/paths on different machines. This solution ensures I always have adequate backups of my library and I can update my devices whenever I can connect to the same build of iTunes.
    When working with an iPhone earlier builds of iTunes would remove any file not physically present in the local library, even if there was an entry for it, making manual management practically redundant on the iPhone. This behaviour has been changed but it will still only permit manual management with a library that has the correct internal ID. If you don't want to sync your library between machines on a regular basis just copy the iTunes Library.itl file from the current "home" machine to any other you want to use, then clean out the library entries and import the local content you have on that box.
    tt2

  • How do I use my ipad with Apple TV?

    How do i use my iPad2 with Apple TV?

    If it's an ATV2 or 3, you can use AirPlay. AirPlay automatically becomes available when the two devices are on the same Wi-Fi network.
    HOWEVER! You should be aware of that AirPlay is, in some circumstances, far inferior to VGA / HDMI-cabled solutions. Please see my posts at https://discussions.apple.com/message/18697551?ac_cid=sa123456#18697551 for more info.

  • How do i take one layer with multiple selections...

    how do i take one layer with multiple selections and make those selections their own layer?

    Yes sir. It w was really hard to explain. It is discontiguous segments that are separated by transparent areas. And I want those non transparent areas to be on their own layer. I have a photo shop file that has a bunch of buttons on them and they are on a transparent background. It is one layer. I want to select all the buttons and put them on their own layers. I can do this manually by selecting a button and cmd Just to a new layer, but when I have 200 buttons it is a daunting task.
    Sent by MailWise<http://www.mail-wise.com/installation/4> – Your emails, with style.

Maybe you are looking for

  • My computer crashed with all my songs, is there any way to retreive all my music I bought from itunes?

    My computer crash a while ago and finally got it back. I bought a bunch of songs and movies from Itunes. I want to know if there is any way I can get those songs and movies back without having to pay for them all over agian?

  • IPhoto 6 and how it should work with edited images

    While iPhoto 6 is an improvement over previous versions in the way images are handled it is still a far cry from being perfect. At last, iPhoto does not create a duplicate within its own library but allows - through the advanced option tab - to work

  • Pass parameters to a report

    Hi all, I would like to know how to pass parameters to a report to filter the data from an external application, for example a Oracle ADF app. Thanks, Jhon BI PUB 11.1.1.7

  • How do you confirm the hard drive speed

    I am trying to confirm my hard drive speed.  I have looked at "about this mac" but can't seem to find it.  New MBP 15 inch running Lion

  • Step Type : Condition

    Hi, I use SAP_WAPI_WRITE_CONTAINER to write data into container variable "ApprovalStatus". It is of type MARC-KZKRI. It can accept 'X' or Space for that variable. I pass the value for container variable ApprovalStatus. To complete the step i use SAP_