LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically change Signal Input Range of each channel in a Task

Hi,

 

I created a task in MAX which contains 2 channels (see pic attached) : Strength and Displacement. 'Strenght' is linked to a custom scale 'Strength_scale' and 'Displacement' is linked to a custom scale 'Displacement_scale'.

Due to calibration purpose, these scales may change.So the 'Signal Input Range' may vary with the scale change.

 

How to programmatically set these values independently for each channel in my task ? (like it can be done manually in MAX) Smiley Surprised

 

PS : I found a way to change both 'Signal Input Range' at the same time with same value. But my 2 scales are very different so I can't apply the same range for my 2 channels.

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 4
(3,253 Views)

The range is set with the DAQmx Create Channel function. You would simply have one for each channel - wiring the task out of one to the task in of the next.

0 Kudos
Message 2 of 4
(3,251 Views)

Thanks Dennis,

 

But I do not want to create channels as they are already specified in my task. I was hoping that I could do it with a property node upon my task and even store the min and max into MAX (like I do with the scales...cf. pic attached). The purpose here is to use MAX as a 'configuration database' and removing the need to recompile an application (or modify conf files).

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 3 of 4
(3,247 Views)

Maybe using 'Active Channels (if subset)' property over the task ? But I can't really find a way to use it. It generates an eeror each time I'm trying to set it... And if I don't specify it, AI.Max and AI.Min values (that I specify with the same property node) are applied to both channels in my task ... Smiley Indifferent

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 4 of 4
(3,241 Views)