Main Content

daqchannellist

Create object to store channel information in table

Since R2024b

    Description

    daqchannellistObj = daqchannellist creates a daqchannellist object that is associated with a device interface.

    Note

    • This function works for devices from National Instruments™ only.

    • Use this function to improve performance while adding large number of channels to the same DataAcquisition object.

    example

    Examples

    collapse all

    Create a daqchannellist object.

    channelList = daqchannellist;

    Add channel information to the object.

    channelList = add(channelList,"input","Dev3","port0/line0:7","Digital");
    channelList = add(channelList,"input","PXI1Slot2","0:15","Voltage",TerminalConfig="PseudoDifferential",Range=[-5 5]);
    

    View the added channel information.

    channelList.Channels
    ans =
     
    
    Direction        DevIDs       ChannelIDs      MeasurementType          TerminalConfig       Range   
    ________     ___________    __________       _______________       ____________________    ________   
     
     "input"       "Dev3"      "port0/line0:7"       "Digital"             <missing>          [NaN NaN]
     "input"     "PXI1Slot2"      "0:15"             "Voltage"          "PseudoDifferential"  [ -5   5] 

    Create a DataAcquisition interface object for a device and add the list of channels using the daqchannellist object.

    d = daq("ni",Channels=channelList);

    Output Arguments

    collapse all

    Channel list, specified as a daqchannellist object, which contains the list of channels as a table.

    Example: channelList

    Version History

    Introduced in R2024b

    See Also

    Functions