LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom scaling of DAQmx channels

Hello,

 

I am attempting to set up a triggered acquisition using DAQmx custom scales with 1 virtual channel containing 3 physical channels.  What I am trying to acheive is to have independent scaling applied to each physical channel input.

 

I have attached a snippet of my code - when I examined it in operation, only the last channel in the array is applied to the task with the final array scaling values.

 

Could anyone give me some advice on how to improve this?

 

Regards

Dave

0 Kudos
Message 1 of 5
(2,326 Views)

Hello djroseman,

 

When outputting the Virtual channel data from the For loop you are using the Last Value tunnel mode which will only output the last element in your array, you will want to change this to an auto indexing tunnel so that you can feed out each element with its scale applied.

 

Has this helped, or were you talking about the functionality of your "Linear Scale" subVI tht you have on your code snippet?

Best regards,

Mark W
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 5
(2,264 Views)

I am not sure what is happening in your customscaling.vi as you havent posted it.

 

I would create the custom scales first and apply it while the task is being created as below. You will need to adjust the values as necessary.

daqmx scales.png


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 3 of 5
(2,257 Views)

Hello Mark,

 

That was very helpful, thank you, it's so obvious now that you point it out. 

 

The custom scale VI just has the new Linear scale vi in it, and a channel property node which applies the custom scale to the task.

 

Dave 

0 Kudos
Message 4 of 5
(2,240 Views)

Thanks for that suggestion, it looks like a simpler solution to the one I currently have.  I will give that a test with my code.

 

Dave

0 Kudos
Message 5 of 5
(2,237 Views)