Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a list of available DAQmx scales..?

Hello,

 

Is it possible to get the DAQmx scales created in MAX? A list of strings or something..?

 

I would like to make a configuration program for mapping analog input channels to desired signal types and sensors. It would be a big help if we can use MAX for creating the scales for different sensors and read those into this configuration program.

 

Best regards,
Ilkka

0 Kudos
Message 1 of 4
(3,540 Views)

Hi,

you have to work with properties, this is very simple when you use the Class Browser in LabVIEW. In the Block Diagramm Menu go to VIEW --> Class Browser.

There choose Object Library "DAQmx" and as Class "DAQmx System", there you can find Properties regarding Scale, Task, Channel, ...! Just drag and drop from there to the block diagramm! I´m not that familar with .NET, but there this should be the same Property (Perhaps: DAQmx System.Scales)! I can´t try because I don´t have .NET on my system!

Hope this helps!

Alex Rudolph

NI Switzerland

Message Edited by Alex R on 10-19-2007 01:54 PM

Message 2 of 4
(3,528 Views)
Hi,
 
In .NET you could do something similar to the following.
 
This is C# code:
 

string[] scales = DaqSystem.Local.Scales;

foreach (string scale in scales)

{

NationalInstruments.DAQmx.

Scale s = DaqSystem.Local.LoadScale(scale);

}

You can get a list of all scales by calling DaqSystem.Local.Scales and then load the scale(s) by calling the DaqSystem.Local.LoadScale() method.

Message 3 of 4
(3,518 Views)
Good Morning,
 
thank you both very much. It is working now Robot Happy
 
BR,
Ilkka
 
 
0 Kudos
Message 4 of 4
(3,499 Views)