Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple channel measurement

Hey guys, i am relativly new to Labview. I did a lot of the beginners Tutorials but i am stucked with my VI.

 

At the moment i simulate the Signals of the NI USB-6289.

 

Basically i want to measure 24 Voltage Inputs with the NI USB-6289 at the same time on 12 diffrent Positions and write it into Arrays.

Each of the Values must get a diffrent Offset and Factor.

I also want to control when to measure ( with a button " next measurement" or something like that ) and  in which Array the next measurement will be written.

Furthermore i woud like to have a boolean wich on the true case automaticly go to the next postion when i  click on "next measurement" and on the false state it stays on the position i have choose. How coud i implement this function in my VI ?

This is my current VI ( see Attachments).  I`ve been told that this can be done much easier since my Block Diagram is allready so big. And that I have a Race Condition.

 

And now i have no Idea how i can give every single channal diffrent Offsets and Factors with an easier VI and how i can get rid of the Race Condition. 😞

 

 

Can someone help me

 

best Regards

LV_Vladi

0 Kudos
Message 1 of 11
(4,443 Views)

Hey,

 

die Offset and Factor can be set with the custom Scale:

What Are Custom Scales and How Do I Use Them? - National Instruments
http://digital.ni.com/public.nsf/allkb/0464919A11C092E386256D800079C3BB

How Do I Programmatically Create NI-DAQmx Custom Scales in LabVIEW? - National Instruments
http://digital.ni.com/public.nsf/allkb/F7DAE47B4408A86F8625765700767FCD

 

The custom scales can be sored in a array.

 

Check out this:

Community: Create Custom Linear Scale for Each AI Channel in LabVIEW Using DAQmx - National Instruments
https://decibel.ni.com/content/docs/DOC-11136

 

Is it needed to change the position to write?

Otherways you just can write the measured data in a 2-D Array and each column represents one measurement.

 

 

0 Kudos
Message 2 of 11
(4,407 Views)

Hey Jon thanks for your help. I will read your Links and try to implement them.

 


@Jon_15 wrote:

Is it needed to change the position to write?

Otherways you just can write the measured data in a 2-D Array and each column represents one measurement.

 

 


Normaly it is needed to change the Position to write.

 

But for the first Try it woud be enough without this function.

 

Will it work with the DAQ Assistent ? or do i have to start new and build the VI with the DAQ Functions ?

0 Kudos
Message 3 of 11
(4,394 Views)

you can use the DAQ Assistant and set the custom scale for each channel.

 

to get a better view of the tast you can convert the Assistant to DAQmx tasks:

Using the DAQ Assistant to Automatically Generate LabVIEW Code - National Instruments
http://www.ni.com/tutorial/4656/en/#toc8

 

0 Kudos
Message 4 of 11
(4,389 Views)

Hey Guys,

 

Why do i always get this Error if i try to Custom Scale my values ? ( see attachment ) .

 

Do i missunderstand the Custom Scale ?

 

I mean i want to be able to measure volts from -1V to 1V but display them as a Numbers from -1000 to 1000 or  -3000 to 3000 whatever my scaling is.

 

I thought i coud do it with the linear Scale 😞

0 Kudos
Message 5 of 11
(4,356 Views)

The value you use for the Maximum and Minimum when you set up a channel need to be based on the values AFTER the scale has been applied.  It looks to me that your current scale is just a positive offset of 5.  Therefore your max and min need to be within the -5V and +15V.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 11
(4,343 Views)

Hey Crossrulez,

 

Thansk for the help. I Understand the error but it means i cant use the custom scales for my purpose or ?

 

Or How can i dispay my measured values like i want ?

 

For example if i measure 1V  i want to multiply it by 100 and add 15 to it so on the Front Panel i see a 115 value.

 

mfg

Vladi

 

0 Kudos
Message 7 of 11
(4,340 Views)

@LB_Vladi wrote:

Hey Crossrulez,

 

Thansk for the help. I Understand the error but it means i cant use the custom scales for my purpose or ?

 

Or How can i dispay my measured values like i want ?

 

For example if i measure 1V  i want to multiply it by 100 and add 15 to it so on the Front Panel i see a 115 value.


I'm not understanding your problem.  If you apply a DAQmx scale to a channel, then when you do a DAQmx Read, it will return the value after the scale.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 11
(4,333 Views)

Hey Crossrulez,

 

Did you checked my VI on my first post ? I have there 24 Channels. And I add and multiplay a number to each channel so i can display the measured values like i want.

 

But i was told that there is a way to do this much easier and better for example with this custom scales. But i only get Errors if change The Values in the custom scales :/.

 

Sorry i am a beginner ^^.

0 Kudos
Message 9 of 11
(4,328 Views)

LB_Vladi wrote:

But i was told that there is a way to do this much easier and better for example with this custom scales. But i only get Errors if change The Values in the custom scales :/.


Then you should show what you tried and say exactly what your scale is.  In this example, I made a scale that just had a gain of 1000 and offset of 0.  I then had to change my range to match my scale: -10k to 10k.  The value that is then passed out is the value after the scale is applied.  It is that simple.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 11
(4,320 Views)