Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Task name with .NET?

Hello,

 

I am using .NET via MATLAB and I want to know the name of the Task. I can't so far find a property or method that does this. 

 

My code is:

 

 

>> nidaqmx.add_DAQmx_Assembly
>> import NationalInstruments.DAQmx.*

>> hT = NationalInstruments.DAQmx.Task

  Task with properties:

  Watchdog: [1×1 NationalInstruments.DAQmx.Watchdog]
  SwitchScan: [1×1 NationalInstruments.DAQmx.SwitchScan]
  ExportSignals: [1×1 NationalInstruments.DAQmx.ExportSignals]
  Stream: [1×1 NationalInstruments.DAQmx.DaqStream]
  Timing: [1×1 NationalInstruments.DAQmx.Timing]
  Triggers: [1×1 NationalInstruments.DAQmx.Triggers]
  COChannels: [1×1 NationalInstruments.DAQmx.COChannelCollection]
  CIChannels: [1×1 NationalInstruments.DAQmx.CIChannelCollection]
  DOChannels: [1×1 NationalInstruments.DAQmx.DOChannelCollection]
  DIChannels: [1×1 NationalInstruments.DAQmx.DIChannelCollection]
  AOChannels: [1×1 NationalInstruments.DAQmx.AOChannelCollection]
  AIChannels: [1×1 NationalInstruments.DAQmx.AIChannelCollection]
  IsDone: 1
  Devices: [1×1 System.String[]]
  SynchronizeCallbacks: 1
  SynchronizingObject: []
  EveryNSamplesWrittenEventInterval: 0
  EveryNSamplesReadEventInterval: 0

 

 

I realise I can specify a name with NationalInstruments.DAQmx.Task('someName'), but that is not my problem. I want to know the name of the Task that is already instantiated. I need to know this because I have a large piece of software and I want to avoid re-creating a task with the same name.

 

0 Kudos
Message 1 of 1
(1,032 Views)