LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200452 depends on channel order

LV 2010, NI-DAQ 9.2.2, Win Vista, cDAQ 9172 chassis, NI-9211, NI-9219.

 

My client has the same issue with LV 8.6.1, NI-DAQ 9.1.5, Win XP, same hardware.

 

I am getting an error -200452 (Property not applicable) in a case where I don't understand why.

 

I'm assigning the user's channels to tasks in preparation for DAQ.

 

Chan A:  is Device 1, module 1 (NI-9211), channel 1, in TC mode

Chan B is Device 1, module 6( NI-9219), channel 1, in RTD mode.

 

Since these are on the same DEVICE, they are being assigned to the same TASK.

 

I am using the property ADC TIMING MODE to get rid of 60 Hz powerline variations in the signal (even sampling at a multiple of 60 Hz doesn't reject it as well as this property does.

 

The error occurs at the PROPERTY NODE function.

 

The thing is, if I assign chan A to the task -->BEFORE<--- channel B, then the error occurs.

If I assign chan B --> BEFORE<-- chan A, the error does NOT occur, and all seems well.

 

I have never imposed any restrictions on my client about having to configure things in a certain order, I don't want to start now.

 

Why is the order being imposed on me?

 

The error:

cDAQ Error.PNG

 

The TC code on 9211:

cDAQ TC code.PNG

 

The RTD code on 9219:

cDAQ RTD Code.PNG

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 5
(3,372 Views)

The help file simply says: "You must use the same ADC timing mode for all channels on a device, but you can use different ADC timing modes for different devices in the same task."

 

Is that the problem?

 

I thought that the timing mode applied to either the TASK (since I supply it with a TASK ID) or the CHANNEL (since it's a CHANNEL property node).

 

But maybe it applies to the DEVICE.

 

When I do B before A, I set the TIMING MODE to 60Hz for the RTD, and the thermocouple on channel A just follows along.

 

If I do A before B, I am NOT setting the TIMING MODE to 60 Hz (I noticed the noise problem on an RTD), so the TC is using the default.

 

When I later set the RTD with the 60Hz timing mode, NI-DAQ sees that as a CHANGE, and thinks I'm asking for two DIFFERENT timing modes on the same DEVICE.

 

Is that right?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 5
(3,350 Views)

 

Hi Steve,

 

I think the problem stems from the fact that the 9211 does not support the ADC timing property and when you are using that property you are assigning it to all of the channels in the task. Why don't you trying using the 'ActiveChans' property node to specify what channel you need:

 

EX.jpg

 

 

 

 

Message 3 of 5
(3,336 Views)

I think the problem stems from the fact that the 9211 does not support the ADC timing property

 

--- I just found that out when I added the property to the 9211 case, thinking that it was the CHANGE in property value that was triggering the complaint.

 

-------


and when you are using that property you are assigning it to all of the channels in the task.

 

--- I'm not sure I understand that.  If I use the property when the task contains A, then B, I get the error.

If I use the property when the task contains B (9219), and then add channel A (9211), I get no error.

Perhaps a clearer way to state it would be:

when you are using that property you are assigning it to all of the channels ALREADY CONFIGURED in the task.

 

If THAT is the rule, then that would explain it.  If A(9211) is ALREADY in the task when I use the property, then it's trying to apply the property to all channels already in the task, and failing.  If B(9219) is the ONLY one in the task, then the property is legal.  Adding the 9211 later does NOT try to apply the property to it.

 

Does that sound right?

 

--------

 

Why don't you trying using the 'ActiveChans' property node to specify what channel you need:

 

--- I was hoping to be done with each channel as I process it.  (I am processing a list of channels that the user has specified, in no particular order, and I have to configure NI-DAQ from that list).

 

I suppose I can add each non 9211 channel to a list, and then use the ACTIVE CHANS along with ADC TIMING MODE to specify.

 

Or maybe I can use the ACTIVE CHANS list AS I APPLY IT.  That would mean several calls to the TIMING MODE property, one for each non-9211 channel.

 

What's confusing me is the statement "You must use the same ADC timing mode for all channels on a device" from the HELP for ADC TIMING MODE.

 

If one of those channels is a 9211 and another is not, then that statement is obviously not true.

 


Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 5
(3,329 Views)

I haven't checked the signal quality, but the error has disappeared if I use the attached code.

I apply the property to each channel as I process it, but ONLY if it's a 9219 (or 9217, in another case).

 

 

cDAQ Error Fixed.PNG

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 5
(3,324 Views)