Programmat​ically set NI DAQ physical channels

If I read channel assignment from a configuration file (e.g. 9205 AI0:AI1), how can I create DAQ tasks using corresponding physical channels in labview?
Solved!
Go to Solution.

see attached for a simpler attempt
Randall Pursley
Attachments:
Select Channels.vi ‏14 KB

Similar Messages

  • Programmat​ically setting text justificat​ion in a table

    I am looking for a method to programmatically set text justification in a table. As far as I can tell the attribute is not available at run time. Has anyone had any experience with this? Thanks.

    Of course you could make several identical tables on top of each other, but with different font alignment, then make the desired one visible . It's ugly but will work just fine.
    LabVIEW Champion . Do more with less code and in less time .

  • How do I programmat​ically set chart history length?

    How do I programmatically set chart history length?

    Hi, u could try instead of using a chart, u could use an xy graph with a chart buffer and with the chart buffer defining the length/amount points needed. And this also mimics what happens in a chart.
    Stuart
    Attachments:
    XY_Chart_Buffer.vi ‏54 KB

  • Programmat​ically setting report options.

    Is there a way, either through the TestStand engine interfaces or through writing property variables, to set the TestStand Report options? Specifically I'd like to affect the 'Disable Report Generation' option, and the 'Report Format' option.
    Thanks,
    Aaron Stibich

    Aaron,
    From your sequence file, you can add a callback sequence called ReportOptions. To add it, go to Edit->"Sequence File Callbacks..." and select ReportOptions (with type Callback Type "Model Callback") and click Add. Now you will have a ReportOptions sequence in your sequence file that the process model calls after reading the default report options. If you want to modify, say, the "Report Format" option, then add a statement step to this sequence with a version of the following statement:
    Parameters.ReportOptions.Format = "txt"
    From within this special sequence you can modify the report options as you like. If you want to change them for all of your sequence files, then you can modify the appropriate process model sequences.
    --Peter

  • Programmat​ically set the default of a control

    Hi, I am working on an application where in one part of the program the user can apply a waveform, then in a different subvi is this waveform is applied/not applied the default value of a certain control will be either digital trigger or no trigger. 
    In short I want to know how I can set the default of a control based on the t/f of a boolean control.  I have attached a vi where I set the value, but in this vi, the value is permanent, I want to set the default but still allow the user to change the value if so desired.  Any help would be greatly appreciated. 
    Attachments:
    Programatically set value of control.vi ‏9 KB

    In short I want to know how I can set the default of a control based on the t/f of a boolean control.  I have attached a vi where I set the value, but in this vi, the value is permanent, I want to set the default but still allow the user to change the value if so desired.  Any help would be greatly appreciated. 
    DEFAULT values cannot be set at run time period- the default value is contained in the compiled code so changing a default value forces a re-compile obviously something that the Run Time Engine can't handle.  It is possible to load values from a file and apply those values to the control.  You can even make a decision at run time what value to load based on your boolean.
    Look through the help for the configuration file operation palatte you'll get some ideas.
    Jeff

  • I would like to configure physical channel in the following VI

    i would like to configure Physical channel in the fillowing Vi. when i set 0 as physical channel input i get error 200170(physical channel specified does not exist on thi device. I am using board AT-MIO-16XE-50 for signal generation. if i use other conventional DAQ Ao config, there i can set channel 0 as input. why not here? please explain? i attached my VI. thanks
    Attachments:
    041015_simple.vi ‏41 KB

    The AT-MIO-16XE-50 is not supported with DAQmx. (The PCI version of the card is, but not the AT version.) The AT card is supported with Traditional DAQ however. This is why you got the error using the DAQmx VIs but not with the traditional daq VIs.

  • How to set a pre-trigger when triggering off a physical channel

    I am trying to set a pretrigger when triggering off a physical channel when the voltage is above a threashold. Basically I would like to capture the pretrigger and posttrigger from a channel. I am using Visual C++.NET with Measurement Studio 7.1 with DAQmx 7.4 driver. I used to program this application with Visual C++ 6.0 with traditional NI DAQ with software analog (stop condition). How do I program in the DAQmx ?
    Thanks,
    Yajai

    In NI-DAQmx, the triggering technique you are referring to is called 'Reference Triggering'. In the attached zip folder is an ANSI C example in NI-DAQmx that demonstrates analog input with a digital reference trigger, acquiring pre and post trigger data. You will have to change the reference trigger function to use an analog edge as opposed to a digital edge (use DAQmxCfgAnlgEdgeRefTrig function). Also in the attached zip file is the NI-DAQmx C Reference Help. You can find all the DAQmx functions and properties there. Hope this helps.
    -Alan A.
    Attachments:
    DAQmx_ref_trig_and_HelpFile.zip ‏53 KB

  • How to create multiple physical channels using DAQmx?

    Hi, I am new to Labview.
    Can anyone please help me on how to create multiple physical channels? I am following the LabVIEW examples in the NI example finder but they are only for acquiring signals from one channel.
    Actually, I am using the channels of an SCXI 1520 to measure voltage signals. And one more thing, in the NI Example Finder, they are sample codes there for setting the filter in SCXI 114x.
    Will this example work with an SCXI 1520, too?
    Thanks!

    There are many ways to read multiple channels in LabVIEW. First, if you look at that example that lets you set the filter setting on the 114x and you click on the 'Physical Channel Listbox' then click 'Browse' you can see that you can select multiple channels. After you select the channels and hit 'Ok' it will build a multiple channel string. This is one way to read multiple channels.
    Next, you can create a 'Task' in Measurement and Automation Explorer(MAX). When you create this task select all the channels that you need to read then back in LabVIEW simply select a 'DAQmx Task Name Constant' Select the task you just created and wire that to an Input of your first DAQ VI. If you do this you do not need to have a 'DAQmx Create Physical Channel' VI or create
    Task because it is already created in MAX.
    When looking at example VIs you can tell if a multi-channel read is acceptable by looking at the 'DAQmx Read' and if it says NChan that means it will do a multichannel read. There are tons of example programs that will display the multichannel read capabilities.
    This example may not work for the 1520 because the properties that are set could possibly be specific to the 142x. When using the 1520 though it is very likely that the properties will be very similar if not exact. You will simply put a DAQmx Channel property node on your block diagram and then look for the Lowpass filter settings properties that will most likely be in the same location. Now another way todo this without using a property node would be in MAX when you create a task set the filter settings from the Device tab in the task configure window.
    Let me know if you need anymore help with reguards to this issue! Have a great day!
    Allan S.
    National Instrument
    s
    Applications Engineering

  • Labview is no longer recognizing my physical channels. Corrupt subvi?

    For some reason, whether the subvi has become corrupted or who knows, my mx create channel VI is no longer recognizing my physical channels. When I run the vi I get a -200099 error which says there may be no physical channel specified. I have the channels set up correctly in mx and they Vi ran fine previously, but now all the sudden..nothing. If I use the Daq assistant I can get the readings I want, which is strange. Anyone had something like this happen?
    Tim

    Hello Tim,
    I'm not sure what is causing your physical channel to no longer be recognized by that DAQmx VI but there are several things we can try to figure out what is going on and possibly resolve the issue.
    1) Have you tried using the "DAQmx Create Virtual Channel.vi" in a different program to see if it can properly recognize the physical channel? The DAQ assistant uses this DAQmx VI in its underlying code so I don't suspect that the DAQmx VI itself has become corrupt.
    2) Right-click on the DAQ assistant and select "Convert to task name constant". Close the DAQ assistant wizard (you can make any changes in the wizard that you would like) and you should have a task name constant on your block diagram. Right-click on the task name constant and select "Generate Code >> Configuration". This will create a subVI that shows how the DAQ assitant created the virtual channel for the task. Compare your code the configuration code generated from the task name constant and see if there are any differences.
    3) If you do think it is a corrupt subVI, reinstalling the DAQ driver support for LabVIEW should overwrite the subVI with a new copy from the installer.
    Hopefully we can narrow down what is causing the problem!
    Take care,
    E.Lee
    Eric
    DE For Life!

  • Problem with DAQmx Physical Channel control

    Dear LabVIEW community!
    I have installed LabVIEW, v13.0f02, 32-bit on my PC. The problem, which I face, is that DAQmx Physical Channel controls, which are used in VIs inside the LV projects, sometimes don't show me the list of DAQ devices - I can't expand the list at all. I push the button to expand the list, but nothing helps.
    But when I create VIs outside the project, and put there DAQmx Physical Channel control - everything works well.
    Note: devices are simulated via MAX.
    Is it some kind of bug in 2013 vesrion of LabVIEW? Because while using LV 2012 I didn't have such headache.
    The only thing that helps now - is to restart PC (laptop) several times; b/c restart of LV doesn't help.
    Can anyone suggest, what it can be, and how to fix this problem?
    Thank you very much in advance!

    Thank you for your answer!
    The point is, that this bug is independent from the code. DAQmx Physical Channel controls don't work even when I'm trying to use NI examples - for instance, Strain - Continuous Input.vi; Voltage - Continuous Input.vi, etc.
    I have such simulated via MAX devices: NI USB-9213, NI USB-9201, NI cDAQ-9172 with NI 9217, and 4 NI PXIe-4331 modules.
    Also, what I have noticed - front panel doesn't visualized fully (I send you the screenshot). When I'm moving mouse pointer over it, those part, which were under the mouse pointer, became clearly seen. And when I minimize, and then restor FP, it becomes fully clear visible.
    And also, this story happens when LV project is open. If I close opened projects, and open only single VIs, everything works smooth.
    Thank you very much, I hope, that this information will be useful to solve this problem.
    Attachments:
    Screen 1.PNG ‏87 KB
    Screen 2.PNG ‏107 KB
    Screen 3.PNG ‏129 KB

  • Setting up a physical standby on a server with a different structure

    I am having a few issues trying to set up a physical standby database.
    The primary database has a different naming structure than the standby and they are at different sites.
    Physical is /var/hpsrp/ctrorp03/oradata/u0x/<DB_NAME>/<DB_UNIQUE_NAME> and standby is /var/hpsrp/drforp03/oradata/u0x/<DB_NAME>/<DB_UNIQUE_NAME>.
    I have set db_file_name_convert to '<PRIMARY PATH>', '<STANDBY PATH>' times the number of paths as pairs.
    I have created a blank database for standby and having taken a full backup of primary with control file and standby control file.
    Now I hit the issues:
    The DB incarnation numbers are different.
    When I try and do a normal restore e.g. set dbid, restore controlfile; mount; it fails as it is trying to find files in the primary structure and not standby structure.
    When I try renaming via set newname or auxname it can't find files to restore I guess due to the incarnation id's.
    If I set the incarnation id and try to restore backup it fails as the incarnation id's don't match.
    I have tried looking through various forums and the documentation but can't find a solution, probably can't see the wood for the trees though as there is so much.
    Has anyone done this type of setup before and can give me some advice?

    Thanks for you replies I will try and give more information on both.
    srsatya :- Version is 11.2 the controlfile I tried to restore was the one created by the backup not the standby should I be putting the standby in place then before I do the restore? If so just a replacement for the current controlfile by carefully replace at an OS level or by mimicing the controlfile to be restored from autobackup?
    CKPT:- Think I tried that but I have been going around in so many circles may have mucked something up.
    RMAN> set dbid=2261148474 (The PRIMARY Incarnation number)
    executing command: SET DBID
    RMAN> alter database mount;
    using target database control file instead of recovery catalog
    database mounted
    RMAN> run
    2> { 
    3> allocate channel c1 device type disk;
    4> SET NEWNAME FOR DATAFILE 1 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/system01.dbf';
    5> SET NEWNAME FOR DATAFILE 2 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/sysaux01.dbf';
    6> SET NEWNAME FOR DATAFILE 3 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/undotbs01.dbf';
    7> SET NEWNAME FOR DATAFILE 4 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/users01.dbf';
    8> SET NEWNAME FOR DATAFILE 5 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/IPSCMS01.dbf';
    9> SET NEWNAME FOR DATAFILE 6 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/IPSA01.dbf';
    10> SET NEWNAME FOR DATAFILE 7 TO '/var/hpsrp/drforp03/oradata/u02/SAPDS/DRFSAPDS/DSCR01.dbf';
    11> SET NEWNAME FOR DATAFILE 8 TO '/var/hpsrp/drforp03/oradata/u03/SAPDS/DRFSAPDS/ISCR01.dbf';
    12> SET NEWNAME FOR DATAFILE 9 TO '/var/hpsrp/ctrorp03/oradata/u05/SAPDS/CTRSAPDS/DSLR_DEV01.dbf';
    13> SET NEWNAME FOR DATAFILE 10 TO '/var/hpsrp/ctrorp03/oradata/u05/SAPDS/CTRSAPDS/undotbs02.dbf';
    14>
    15> RESTORE DATABASE;
    16> SWITCH DATAFILE ALL;
    17> RECOVER DATABASE;
    18> }
    allocated channel: c1
    channel c1: SID=165 device type=DISK
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting restore at 28-JUN-12
    released channel: c1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 06/28/2012 10:21:13
    RMAN-06189: current DBID 2261148474 does not match target mounted database (2261834728)
    RMAN> exit
    Recovery Manager complete.
    drfora04 ora_srp3 $ rman
    Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jun 28 10:22:16 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    RMAN> connect target /
    connected to target database: SAPDS (DBID=2261834728, not open)
    RMAN> run
    2> { 
    3> allocate channel c1 device type disk;
    4> SET NEWNAME FOR DATAFILE 1 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/system01.dbf';
    5> SET NEWNAME FOR DATAFILE 2 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/sysaux01.dbf';
    6> SET NEWNAME FOR DATAFILE 3 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/undotbs01.dbf';
    7> SET NEWNAME FOR DATAFILE 4 TO '/var/hpsrp/drforp03/oradata/u01/SAPDS/DRFSAPDS/users01.dbf';
    8> SET NEWNAME FOR DATAFILE 5 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/IPSCMS01.dbf';
    9> SET NEWNAME FOR DATAFILE 6 TO '/var/hpsrp/drforp03/oradata/u04/SAPDS/DRFSAPDS/IPSA01.dbf';
    10> SET NEWNAME FOR DATAFILE 7 TO '/var/hpsrp/drforp03/oradata/u02/SAPDS/DRFSAPDS/DSCR01.dbf';
    11> SET NEWNAME FOR DATAFILE 8 TO '/var/hpsrp/drforp03/oradata/u03/SAPDS/DRFSAPDS/ISCR01.dbf';
    12> SET NEWNAME FOR DATAFILE 9 TO '/var/hpsrp/ctrorp03/oradata/u05/SAPDS/CTRSAPDS/DSLR_DEV01.dbf';
    13> SET NEWNAME FOR DATAFILE 10 TO '/var/hpsrp/ctrorp03/oradata/u05/SAPDS/CTRSAPDS/undotbs02.dbf';
    14>
    15> RESTORE DATABASE;
    16> SWITCH DATAFILE ALL;
    17> RECOVER DATABASE;
    18> }
    using target database control file instead of recovery catalog
    allocated channel: c1
    channel c1: SID=165 device type=DISK
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting restore at 28-JUN-12
    released channel: c1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 06/28/2012 10:22:26
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    RMAN>
    Edited by: gzmzpz on 28-Jun-2012 04:56

  • Deploying VIs to the RT causes the value in the Physical Channels of one of the VIs to change to an incorrect value. Why?

    Hi all.  I've been registered to the forum for a couple of years, but this my first post.  I'll try to give as much info as I can.
    NIPXIe-1082 chassis
    slot 1: PXIe-8133 Embedded Controller
    slot 2-3: PXIe-6363 X-Series Multifunction DAQ
    slot 4: TB-4353 32-Ch. Thermocouple
    slot 5: PXI-4496 Analog Inputs 16-ch
    (The second 6363 in slot 3 is a recent addition causing the others to move to higher slot numbers.)
    Windows 7
    LabVIEW 2011
    This code is still being developed to run a test stand, but its based on code from a previous test stand that is being modified for the new one.  There are three VIs that are opened and then deployed to the RT.  On the Front Panel of one of the VIs is a DAQmx Physical Channel control.  The control points to slot 5, but when I deploy the VIs, the control changes to point to slot 3.  None of the three VIs have been run yet.  I can manually "Reinitialize to Default Value" to get the control to point to slot 5 again, but I shouldn't have to.
    I realize that there is a lot I still don't know about NI hardware and LabVIEW.  This just seems like it should be a really simple solution and I'll probably have one of those DUH moments when I get told the answer.  I'll try to answer whatever questions for more information that I can.  Thanks in advance.
    -Psiber_Space

    Yes, it is defaulted to slot 5.  After it changes I can Reinitialize to Default to bring it back.
    Two things that I've tried during the week.  I've deleted the Physical Channel and then recreated it, but it continued to change upon deployment.  Then I simply disconnected the Physical Channel, moved it to an out-of-the-way location on the Block Diagram and then created a new Physical Channel.  The old Physical Channel is still changing upon deployment, but the new one stays intact.  It seems that as long as the old one isn't deleted, this workaround should work.  Except that the problem now seems to be spreading to the other controls on the same VI.
    Just today I upgraded from 2011 to 2011 SP1, but the problem is still there.  After the upgrade, I tried recreating the LabVIEW project from scratch, but that didn't seem to work either.
    I'm going to try contacting NI directly, but if anyone else has any ideas, feel free to continue posting.

  • Filter the pull down menu of physical channels control

    Hello all,
    I need help, I'm desperate!
    I'm trying to create a software recording data from an accelerometer by using a NI USB-9234 device. So in order to do that, I linked a physical channels control to DAQmx create channel. The thing is, I want to display in the pull down menu, only the physical channels attached to the NI device specified above. And besides, I'd like this to be done automaticaly, meaning that no matter what is the name of the device (dev1, dev2, dev3...), the pull down menu will display the four physical channels attached to the specified device.
    Am I clear ?
    I know that by right-clicking on the physical channels control, I can filter it but I can't manage to figure it out how to filter by specifiying a device. Maybe by using property nodes...I don't know.
    If somebody has a solution, that would be much appreciated.
    Thanks a lot

    You can configure IO Name Filtering by choosing the following option in the context menu:
    But you cannot select a certain device type there, but only certain device names (which is a huge difference).
    So the easiest way to accomplish your task is to define a name for your USB-9234 (like MyDevice) and then limit the selection to "MyDevice".
    You have to make sure, that each PC using the application as aware of "MyDevice". This setting is done in MAX (Measurement and Automation Explorer) and can be distributed with your application using the Application Builder (or manual export/import within MAX).
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Using a menu ring to select DAQ device channel and indicator

    Hi,
    New user here. I am using the DAQ assistant with multiple analog inputs. I would like the front panel to have a menu ring where the user can select which channels are to be active. Also, this corresponds to a single graphical indicator. 
    Currently I have a VI that displays all channels each with its own indicator. I want to simplify the front panel so that a user can simply use a menu ring to select and focus on what he/she is interested in. Is it possible to use the Select Signals Express VI to implement this?
    Thank you!

    Drop the DAQ Assistant or convert it to regular DAQmx functions. The physical channel control does all that. Just look at the shipping examples.

  • How to get available physical channels by DAQmx in VIs?

    I can get available DAQ devices by calling DAQmx System property. What should I do if I want to get all available physical channels in my VI?
    My NI DAQ version is 7.3, and my LabVIEW version is LabVIEW Professional 7.1.
    Thanks!

    There really isn't a great way to do this. I've attached a zip file with a couple of VIs that might give you a an idea or two about how you might want to go about it. Hope one of these helps!
    -Alan A.
    Attachments:
    Chanel Info.zip ‏23 KB

Maybe you are looking for

  • System resume issues for G575

    HELP!!! I have a Lenovo G575 notebook running Windows7. Each time mt system goes into sleep mode or shuts down due to low battery life I keep running into the same issue. Once I press the power button, only when in sleep mode or after auto shutdown d

  • I can't see my screen! What's the deal?

    Oh yeah, hi everyone. I'm new to the forums. So yeah, I have an ibook g4 that I use almost every day. It's fairly new (not quite 7 months) and it's already having problems. I've dealt with Apple and their product service before with my iPod, and i'm

  • "Indicator: GR-Based Invoice Verification" direct input Upld PO LSMW

    Hi, Im using lsmw direct input method. I am uploading the PO. But the GR Based invoice verification field was not checked ON. Im trying this using USER_EXIT in enhancement MM06E005, with EXIT_SAPMM06E_017. Any body can tell me how i can check ON the

  • Please Help - Avoid default name when creating constraints

    Here I am creating two very simple tables: create table supplier      id number not null,      constraint pk_supplier primary key (id) create table product id number not null, supplier_id number not null, constraint pk_product primary key (id), const

  • Inconsistent behaviour of proxy plugin

    Hi We are using WL 7.0 IIS plug-in to proxy to our "weblogic 7.0 servers.It is showing an incosistent behavoiur on two different proxy boxes. We are using following values in our iispoxy.ini file WebLogicHost=148.168.218.36 WebLogicPort=8502 ConnectT