Use virtual channel name as input to DAQmx Write? LV8 and DAQmx

I've created a task for digital output that contains 8 named channels using the DAQmx Create Channel VI in Labview. Is it possible to use the channel name as an input to the DAQmx Write VI to reference the desired channel? I tried wiring a string with the channel name to the "task/channels in" input but I get a -200428 error that says the Value passed to the Task/Channels In control is invalid.
The help "name to assign" input for the DAQmx Create Channel VI says
   If you use this input to provide your own names for the virtual channels, you must use the names when you refer to these channels
   in other NI-DAQmx VIs and Property Nodes
OK, so how do you use the name assigned in other VIs?
George

George,
I think that there may be some confusion here about the difference between local and global virtual channels.  First of all, please take a look at the following knowledge base:
Physical Channels, Virtual Channels, and Tasks in NI-DAQmx
As discussed in this KB, local global channels are created inside a task, and they only apply to that task.  In the help file for the DAQmx Write VI, the "task/channels in" description says "if you provide a list of virtual channels, NI-DAQmx creates a task automatically."  When you wire a string to this input, a new task is being created, and unless the channel name that you wire in is a global virtual channel (listed in MAX), you will get the error 200428 that you mentioned.  This is because that virtual channel that you are specifying is local to another task and is not associated with this new task. 
One solution to this issue is to use the DAQmx Save Global Channel VI to save your local virtual channel as a global virtual channel before calling DAQmx Write.  Once this is done, you can then wire the same string constant to the "task/channels in" input of DAQmx Write or other DAQmx VI's. 
The help text is still correct, but is only applicable in certain situations.  For example, if you create and name an analog input local virtual channel with DAQmx Create Channel, you could then use this channel name as the source input to a DAQmx Trigger VI configured for an analog edge start trigger.  You could also use that channel name as the input to the "ActiveChans" DAQmx Channel Property, which would enable you to modify the properties of that particular channel. 
Hopefully this information is helpful to you.

Similar Messages

  • Why can I not use the channel name, which is obtained from the function of DAQmx Task, as the input of the channel name for the function of Get Channel Information of DAQ?

    Why can I not use the channel name, which is obtained from the function of DAQmx Task, as the input of the channel name for the function of Get Channel Information of DAQ?

    Not a lot of details here, but my guess is this isn't working for you because you are wiring in the task to the Active Channels Property and not the actual Channel Name. I have attatched a screenshot of what I believe you are trying to do. The Task has 2 channels in it, so I need to index off one of the channels and wire it into the active channels input of the Channel Property node. Then I can read information about that channel
    Attachments:
    channel_name.JPG ‏69 KB

  • Computer crashes when using virtual channel custom scales.

    I am using a PXI-1045, which is connected to my computer via a MXI-3, to hold 3 PXI-6115 cards as well as several other cards. I have been using virtual channels for the nine input channels I am looking at. When I added custom scaling to one of the virtual channels my LabView application crashed the next time I ran it. If I remove the scaling it goes back to working fine, but when I add it back in it crashes again. The crash causes the computer to automatically restart, but on one of the runs I got a "Fatal Internal Error: 'memory.cpp', line 593" message before the computer restarted. I've tried reinstalling MAX and updating some drivers, but nothing seems to help.
    Thank you.

    Still having the same problem. Ever the optimist, I submit the following info.
    Error window screenshot can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_01.JPG
    Enent log entry can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_02.txt
    Version info can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_03.JPG

  • How to Install an APO Livecache on Windows Using Virtual Host Names

    Hi,
    How to Install Live Cache on windows using Virtual Host names?
    we are using SCM 4.0 with  live cache build 7.4.3 on two differnt servers.
    I have checked the Live cache CD (7.4.3) is with setup.cmd, where as it need use command sapinst.exe SAPINST_USE_HOSTNAME=Virtual hostname.
    Please advise.
    Thanks
    Anil

    a possible workaround (that I have no tested) is to temporarily name your server with the same of the virtual name, install. when completed, rename server to original name.
    This is not a proven method, but it might work.

  • AI Group Config Error 10001 using Virtual Channels

    In my LabVIEW block diagram, I usually enter in numbers, e.g. 0,1,2 for the channel string input of AI Config. When I try to use a virtual channel, I simply type in the virtual channel, e.g. 0,K Thermocouple,2. However, this causes AI Group Config Error 10001, which applies to an invalid channel string. What is the correct way to enter a virtual channel into the channel string?

    Do you have channels with virtual names of "0", and "2"?
    If not you may be confusing MAX by using both naming conventions.
    Try using only Virtual names.
    I generally will use an array of strings where each element is the vitual channel name with no problems.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How can I get an invidivual Virtual Channel name without having to pick through an array of all channels?

    I see "Get DAQ Channel Names.VI" and "Get Channel Information.VI" but I just want to get the name of just channel 0, or just channel 1. Is using an array of all channel names the only way I can do this?
    I have Labview 6.1.
    THANKS!!!
    Lauren

    Lauren,
    Yes, currently that is the best way to go about accomplishing that. I attached a little VI that demonstrates a very basic way of finding the first virtual channel that uses device channel 1.
    Ames
    Applications Engineering
    National Instruments
    Attachments:
    Find_First_Channel_1_Virtual_Channel_Name.vi ‏27 KB

  • Can you use Virtual Channels in a Borland C++ program using the NiDAQ library? It would make configuration of my application much easier.

    I have no idea which category this fits under.
    Could you please CC any replies to [email protected]

    This would be a question for the Multifunction DAQ section of Developer's Exchange. The answer is no, the NI-DAQ C library does not support virtual channels yet.
    Best Regards,
    Chris Matthews
    Measurement Studio Support Manager

  • Can I access the list of virtual channel names in VB

    I have a PXi chassis with about 100 different sensors attached on various SCXI modules, I have created a unique virtaul channel for each.
    I have no problem using these names in my code to access the data.
    I would like to create a diagnostic panel in my application from where I can access any of the channels via a drop down combo.
    Is there a method of getting reading the virtual names that I have created in MAX?
    Graeme

    It sounds like you are probably using the CWDAQ ActiveX control in VB6. In that case, unfortunately, there is not a way to get this information.
    If you are using DAQmx, you could use the C API or LabVIEW or CVI to get this information, but it is not yet supported in the .NET or C++ APIs. If you need more information on calling C functions from .NET or C++, please post a reply to this message.
    Tony H
    Measurement Studio

  • Reading AI and thermocouple reading using virtual channels

    Hi All
    This is the configuration of my apparatus
    SCXI 1102- thermocouple readings
    PCI-MIO-16E-4 card
    i want to read both analog inputs (from a front feedthrough panel) and a thermocouple reading simulataneously. I tried defining the channels as DAQmx global channels and tried to use the specific DAQmx polmorphic VI to read both the AI and the thermocouple reading simultaneously. But it looks like the AI affects the thermocouple reading. When i change the AI, the thermocouple reading also gets erratic(changes to lower values, sometimes even negative). Can anyone help me on this. Im absolutely new to this. Excuse me if the question was pretty trivial. Thanks a million
    sambar

    Sambar,
    To which pins on the feedthrough panel are you connecting your signal? Make sure you are not connecting it to channel 0. All of your SCXI channels are multiplexed to channel 0 on your PCI-MIO-16E-4. If you are unsure of the pinout of your feedthrough panel, the KnowledgeBase linked below provides this information:
    Pinout for the SCXI-1302 50-Pin Terminal Block
    Good luck with your application.
    Spencer S.

  • Using list of names as input for script

    Hi all,
    I've written a script that creates a folder and sets the proper POSIX and ACL permissions based on the name I set (i.e. the username). What I'd like to do is have a list of usernames (possibly in a text file?) and perform the script for each of those users. How might I go about this? I'm including the script below in case that helps.
    Thanks!
    #!/bin/sh
    USERNAME=1234567
    mkdir /Shared Items/SharedFolder/$USERNAME
    chown root:admin /Shared Items/SharedFolder/$USERNAME
    chmod 770 /Shared Items/SharedFolder/$USERNAME
    chmod +a "$USERNAME allow read,write,writeattr,readattr,readextattr,writeextattr,execute,list,search,delete,addfile,add_subdirectory,delete_child,file_inherit,directoryinherit" /Shared Items/SharedFolder/$USERNAME

    I use sed to parse text files for this sort of thing. It filters out comments that begin with # and blank lines:
    <pre style="border: 1px solid #ddd; padding-left: .75ex; padding-top: .25em; padding-bottom: .25em; margin-top: .5em; margin-bottom: .5em; margin-left: 1ex; max-width: 80ex; overflow: auto; font-size: 10px; font-family: Monaco, 'Courier New', Courier, monospace; color: #444; background: #eee; line-height: normal">sed 's/[:blank:]*#.*//; /^$/d' /your/users.conf | \
    while read USERNAME; do
    mkdir /Shared\ Items/SharedFolder/$USERNAME
    chown root:admin /Shared\ Items/SharedFolder/$USERNAME
    chmod 770 /Shared\ Items/SharedFolder/$USERNAME
    chmod +a "$USERNAME allow read,write,writeattr,readattr,readextattr,writeextattr,execute,list,search,dele te,add_file,add_subdirectory,delete_child,file_inherit,directory_inherit" /Shared\ Items/SharedFolder/$USERNAME
    done
    </pre>

  • How do I create a constant current output with FP-AO-200, It uses an array as an input to the write vi for FP

    If i use a single value in the 1x array, I get a random pulse, Im assuming I need to do an infinite population of the array to give me a dc current? Any ideas

    The array input is supposed to contain a number of elements equal to the number of channels being targetted by the command. For example, if you write to "Channel 0" of a FP-AO-200, then you would have a single element in the array. Likewise, writing to the "All" channel means you need to have 8 elements in the array otherwise you will return error code 32800. The probable cause for you to see a pulse, is if you write a value in one interation of the loop, then on the next iteration write a 0.
    Regards,
    Aaron G

  • Why is the input mode greyed out when I try to create a virtual channel for my 1102?

    I have set up a virtual channel for my SCXI-1102, and the input mode is greyed out with it set to "differential". I have already skimmed this forum for answers, and I have checked to verify that the mode slot under the AI tab for my MIO-E series card is set to nonreferenced single-ended mode. I then created a virtual channel with the device slot under the hardware column set to Dev1_SC1_MD1CXI-1102. At this point, as already stated, the input mode goes grey while set to differential. What's going on?

    Hello,
    All outputs from the SCXI module are measured in differential mode. You can still mix differential and single ended measurements (if you use the remaining channels of your daq board).
    The easiest way to mix modes is with virtual channels. All SCXI analog input channels will be differential, while you can make other virtual channels differential or single ended. If you don't want to use virtual channels, you can use AI Hardware Config in LabVIEW to change the mode.
    Hope this helps. Regards,
    John N
    Applications Engineer
    National Instruments

  • About virtual channel in different device and/or different type channel

    Hi all,
      I am looking for a way to write to several analog channels at the same time. In my code, I didnt' pay much attention to that, I just have them placed in the the same frame in the flat sequence such that they might be started to write simultaneously. However, sometimes they might not working perfectly. I am reading something on DAQmx and I found that there is something call virtual channel so I have put more than 1 channel into a unit (called virtual cahnnel), so I can write something to it at the same time. Here are my question
    1) what's the different between virtual channel and channel group? If I write a array of 3 elements to a channel group (consists of dev1/ao1, dev1/ao2 and dev1/ao5),  am I writing to channel group or virtual channel?
    2) can I bind different channels from different devices to form a virtual channel, e.g. dev0/ao0 dev1/ao0 dev2/ao0?
    3) can I bind different type of channel to form a virtual channel, e.g. dev0/ao0, dev0/port0/line0?
    4) last question is about synchronization on writing to a virtual channel (or channel group?) Last say I have a pulse train each pulse is separated in time by 1.2ms and total time is 122.4ms. The pulse train will be sent to dev0/ao3, and at 12ms after start send very first pulse of the train, I need to write two analog signal to dev1/ao1 and dev1/ao5. In my current code, create a flat sequence, start the task for sending the train in the first frame, put delay in second frame and delay for 12ms, write dev1/ao1 and dev1/ao5 in the third frame. For some times, this gives me acceptable timing but not always. I wonder how does it help to use virtual channel?
    In the similar situtation, what about if instead of writing to two analog channel, I write to one analog channel and one digital channel?
    Thanks.

    1) virtual channel is created per task and contains a collection of settings such as a name, a physical channel, input terminal connections, the type of measurement or generation, and can include scaling information.. A virtual group is specific to digital IO and has to deal with the way you read/write data off/to the port
    2) yes you can create a task with physical channels from multiple devices assuming they are comparable writes (ie all analog or all analog read, or all digital) but they will have the same channel characteristics (see answer above)
    3) no you cannot create a task that handle an AO and a DO from with in the same task
    4) if you created a task you are using a virtual channel. The only way to ensure timing is to use hardware timing (ie onboard sample clock of you DAQ card) otherwise the reads/writes are basically interrupts and you are at the mercy of the OS to service the interrupt request
    if you need more information please repost with more questions, include your DAQ hardware, and any code pictures to give us a better idea of what you are trying to accomplish and how you are going about it
    Applications/Systems/Test
    National Instruments | AWR Group

  • Digital waveform channel names are incorrect

    I create a task at runtime where the user selects which physical digital input channels to use and the names for each.  I then sample these digital inputs and write the waveforms to a TDMS file.  The file has the correct data, but only the first channel has the correct name.  Attached is example code that shows the problem.  What am I doing wrong?  I do a similar setup for analog inputs and it works fine.
    Attachments:
    Digital Channel Names.vi ‏89 KB

    How are you entering the names?  Here is text straight from the LabVIEW Help
    name to assign specifies a name to assign to the virtual
    channel this VI creates. If you do not wire a value to this input, NI-DAQmx uses
    the physical channel name as the virtual channel name. If you use this input to
    provide your own names for the virtual channels, you must use the names when you
    refer to these channels in other NI-DAQmx VIs and Property Nodes, such as the
    source input of the DAQmx Trigger
    VI.
    If you create multiple virtual channels with one DAQmx Create
    Virtual Channel VI, you can specify a comma-separated list of names to assign to
    the virtual channels. If you provide fewer names than the number of virtual
    channels you create, NI-DAQmx automatically
    assigns names to the virtual channels. 
    Are you entering multiple names seperated by a comma?
    Regards,
    Jon S.
    National Instruments
    LabVIEW R&D

  • How do I get channel names written into a logged ascii file in Signal Express

    Hi there,
    This maybe a rookie question but I am a relative rookie to this software, and I hope it has an easy fix!
    Background:
    Take a load of analogue inputs from a DAQ device into Signal Express, first thing that hits me is that unlike labVIEW you cannot right click in the channel configuration window and change the name from say... Dev2_ai0 to Air Pressure? I feel that if this was possible then I would overcome my problem? anyway I can't so onwards...
    I goto the DAQmx Acquire window on the top left and can right click and rename the channel, which is great... however this does not translate to the logged data as I get the ai0 channel names across the top of the columns and not the names that I have put in.
    Is there anyway of getting data like the attached snippet?
    Many thanks for your help in advance.
    Neil Barker, Redbull Technology.
    Attachments:
    Channel names.gif ‏4 KB

    Hi Dan,
    Thanks for the reply, that has certainly fixed my issue as I wasn't expanding the channel and selecting the channel that I had renamed.
    One last thing though:
    I now not only get the individual channel name but the prefix for the DAQmx Aquire, for instance I get the Input of Braketest and then the channels under the input data.
    It looks a bit like this....
    Braketest - Front Pres
    Braketest - Rear Pres
    Braketest - FR Temp
    Braketest - FL Temp
    etc etc...
    Now all of the channel names at the top of the columns have this long name. Can this be rectified? can I remove the "Braketest" bit?
    By the way I am saving it as an ASCII so that I can read it in excel.
    Many thanks, Neil.

Maybe you are looking for

  • Vendor Invoice Cancelled...Made Payment

    Dear Gurus, Scenario is as follows:    User posted A invoice with 100 later cancelled through B Document ( these posted and cancelled though MIRO). But Another guy made payment against A document even though that document was cancelled. Pls guide me

  • Applying patch to 10.2.2

    I've inherited a 10g database that has the following listed when I do an opatch lsinventory: 5117016 {Large list of others} 5126700,5238255,5601428 5865568 ...............indicating interim patches(4) I'm now trying to apply 634997 and it is failing

  • Cafeworld. Won't. Load properly

    I want 2 play. My Cafeworld its not loading

  • Error ORA-01722: invalid number

    Hi, I am using Apex 3.2 on Oracle 11g (Enterprise Edition). I am new to Apex and I am using an imported application and editing its features to match my requirements. While uploading a CSV file, I am getting error as :ORA-01722: invalid number" Can s

  • InDesign file crashing and damaging file...even the backup file.

    Of course in times of deadline but I have a lengthy 20 something page document that continually crashes and then gives me a damaged error but attempting to recover just crashes InDesign. I have tried recreating a couple times thinking maybe something