Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
3 ratings:
 3.66 out of 5   

Can I Read TEDS Information in .NET, C or CVI?



Primary Software: Driver Software>>NI-DAQmx
Primary Software Version: 7.4
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I can find documentation and examples for TEDS in LabVIEW, but I can find no reference to C, CVI, or .NET. Is it possible to read and write TEDS information in a language other than LabVIEW?

Solution:
There is no TEDS library outside of LabVIEW. However, the DAQmx API provides an interface for basic TEDS functionality in all DAQmx-supported programming languages. This includes Visual Basic .NET, C#, ANSI C, and LabWindows/CVI. Below are code excerpts for each of these languages which can be used as an example of how the functions are used.
  • TEDS in VB.NET
    Private myChannel As PhysicalChannel
    ...
    myChannel = DaqSystem.Local.LoadPhysicalChannel(physicalChannelComboBox.Text)
    ...
    myChannel.ConfigureTeds()
    Manufacturer.Text = myChannel.TedsManufacturerID.ToString()
    Model.Text = myChannel.TedsModelNumber.ToString()
    VersionNumber.Text = myChannel.TedsVersionNumber.ToString()
    VersionLetter.Text = myChannel.TedsVersionLetter
    SerialNumber.Text = myChannel.TedsSerialNumber.ToString()
    byte[] byteStream = myChannel.TedsBitStream

  • TEDS in C#
    private Task myTask;
    private PhysicalChannel myChannel;
    ...
    myChannel = DaqSystem.Local.LoadPhysicalChannel(physicalChannelTextBox.Text);
    ...
    myChannel.ConfigureTeds();
    Manufacturer.Text = myChannel.TedsManufacturerID.ToString();
    Model.Text = myChannel.TedsModelNumber.ToString();
    VersionNumber.Text = myChannel.TedsVersionNumber.ToString();
    VersionLetter.Text = myChannel.TedsVersionLetter;
    SerialNumber.Text = myChannel.TedsSerialNumber.ToString();
    byte[] byteStream = myChannel.TedsBitStream;

  • TEDS in ANSI C and LabWindows/CVI
    #define chan "SCC1Mod7/ai0"
    ...
    DAQmxConfigureTEDS (chan, ""));
    DAQmxGetPhysicalChanTEDSMfgID(chan, &manufacturerid);
    DAQmxGetPhysicalChanTEDSModelNum(chan, &modelnumber);
    DAQmxGetPhysicalChanTEDSSerialNum(chan, &serialnumber);
    DAQmxGetPhysicalChanTEDSVersionNum(chan, &versionnumber);
    DAQmxGetPhysicalChanTEDSVersionLetter(chan, versionletter, 5);
    DAQmxGetPhysicalChanTEDSBitStream(chan, byteStream, 495);
Refer to the NI-DAQmx .NET Help, NI-DAQmx C Reference Help, and the LabWindows/CVI DAQmx function panels for more information.

Note: For more advanced TEDS information aside from what is provided in the DAQmx API, you will need to interpret the TEDS Bit Stream. This contains the raw binary data from the TEDS compatible device.

Related Links:
KnowledgeBase 3GT6I2S9: How do I program a DAQmx TEDS Task in LabVIEW?

Attachments:





Report Date: 05/14/2005
Last Updated: 10/05/2017
Document ID: 3LDHSIS9

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit