Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Weird behaviour when reading a DAQmx Channel property node (bug?)

When I attempt to use a DAQmx Channel property node to read the properties of a global virtual channel, I get the following error unless I first create a task *and* set the timing for that task to a mode supported by the hardware.  I've attached a screenshot of the VI showing two pieces of code that result in the error, and a third piece of code which works as expected.
 
The specific error I receive is:
 
Property Node DAQmx Channel (arg 1) in DAQmx Channel Read Weird Behaviour.vi <append>
Property: SampTimingType
You Have Requested: On Demand
You Can Select: Sample Clock
Device: cDAQ2
Task Name: Module 7 AI0 Strain
 
I'm using the following:
Windows XP SP2 (32-bit)
LabView 8.5.1
DAQmx 8.7.0f1
cDAQ-9172 chassis (S/N 1346A04)
NI-9237 (S/N 134252A) in the cDAQ chassis' slot 7.
 
Is this behavior "by design", and is there a better work-around to allow me to get the global virtual channel properties without first having to create a task and setup the sample timing?
 
Thanks,
 
Mark Moss
Electrical Validation Engineer
GHSP
0 Kudos
Message 1 of 6
(3,168 Views)
Hi,
 
Is there a specific error code you are getting? It seems like a fairly common problem with channel property nodes after some initial research. This thread answers a similar problem, I hope it is of some assistance to you. I will continue to look into the problem.
 
Regards,
Mike W
Applications Engineer
National Instruments UK&Ireland
0 Kudos
Message 2 of 6
(3,153 Views)
The error code is -200077.
 
From other threads, I gather that this error code means that the property or value isn't supported by the underlying hardware.  The error source string lists the property and unsupported value as "SampTimingType" and "On Demand", respectively.
 
The weird part is that I'm not trying to set "SampTimingType" to "On Demand".  Instead I'm trying to read the "Analog Input:Strain:Strain Gage: Poisson Ratio" property.  Reading the "Analog Input:Strain Gage: Poisson Ratio" property fails unless I explicitly create a task and set the task timing to "Continuous Samples" first.
 
Also, this doesn't appear to be specific to the poisson ratio property.  I get the same error for each of the other channel properties I tried to read.
 
Mark Moss
Electrical Validation Engineer
GHSP
0 Kudos
Message 3 of 6
(3,142 Views)
Have you tried uninstalling and re-installing the software (both Labview and MAX)? This solved the problem on another thread from a poster who was having the same problem. I am still looking into other ways of solving the problem.
 
Let me know how you get on.
 
Regards,
Mike W
Applications Engineer
National Instruments UK&Ireland
0 Kudos
Message 4 of 6
(3,138 Views)
This is expected behavior. When you query a task property DAQmx verifies the task to ensure the settings are correct - which in your case they're not because the 9237 does not support On-Demand timing (which is the default when no timing is specified). This isn't a problem with most devices becuase most devices support On-Demand... in your case I would just set the timing to some value, you can always change it.
Is there a need to query these values before you setup the task or is it just something you noticed?

Thanks,

Andrew S
MIO PSE

Message 5 of 6
(3,099 Views)

stilly32 wrote:
This is expected behavior. When you query a task property DAQmx verifies the task to ensure the settings are correct - which in your case they're not because the 9237 does not support On-Demand timing (which is the default when no timing is specified). This isn't a problem with most devices because most devices support On-Demand... in your case I would just set the timing to some value, you can always change it.
Is there a need to query these values before you setup the task or is it just something you noticed?

Thanks,

Andrew S
MIO PSE


That makes sense.  I didn't realize that LabView/DAQmx had to create a task internally to query global virtual channel properties.

 

In my case, I can't add the global virtual channel to my task directly since I need the first channel in my task to be a physical channel.  Instead, I call the DAQmx Create Virtual Channel VI with all of the setup parameters coplied from the global virtual channel.

 

Mark Moss
Electrical Validation Engineer

GHSP

0 Kudos
Message 6 of 6
(3,075 Views)