Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI PCI-6533 (DIO-32HS) counters reading error

Hello,

 

 

I support an application which use NidaqMX drivers API and read PWM inputs from card NI PCI-6533 (DIO-32HS)

 

When I call these functions:

 

 

ErrorCode = DAQmxCreateCIPeriodChan(pChannel->hTaskHandle, "Dev1/ctr0", "PERIOD_IN_1_Dev1_0",0.001, 0.01, DAQmx_Val_Seconds , DAQmx_Val_Rising, DAQmx_Val_LowFreq1Ctr , 0.000100, 4, NULL);

 

ErrorCode = DAQmxCreateCIPulseWidthChan(pChannel->hTaskHandle,"Dev1/ctr0","PERIOD_IN_1_Dev1_0",0.00004,0.04,DAQmx_Val_Seconds,DAQmx_Val_Falling,"");

 

I receive the error :

(Device=Dev1,Gate=0) : Measurements: Physical channel specified does not exist on this device.
Refer to the documentation for channels available on this device.

 

using function:
DAQmxGetErrorString (ErrorCode, ErrorMsg, bufferSize);

 

 

Can you please tell me what is the correct configuration for card NI PCI-6533 (DIO-32HS) to be able to read the counters?

I tried ctr0, ctr1 ... but I still receive the error.

 

Thank you in advance

 

0 Kudos
Message 1 of 2
(3,422 Views)

Daniel,

 

Thanks for posting on the NI Forums. When using the  PCI-6533 you are not going to be using counters on the card like you would with a MultiFunction M-Series or X-Series card. The 6533 does not have counters on the board and this is why you are getting the error indicating that the channel does not exist on the device. However with the PCI-6533 there is hardware timed digital input and output, so for your application you could take advantage of the hardware timed digital input and sample the PWM signal. 

 

There are a couple of resources that will help you get started. First off, you can find the Manuals and Help Files for the 6533 and 6534 here.  The help file is a good place to get the details on the functionality of the 6533. There are also example programs written in C that you can adapt for the 6533 cards. If you have the DAQmx driver installed and Text-based support installed for the DAQmx driver you can go to the Start Menu >> All Programs >> National Instruments >> NI-DAQ >> Text-Based Code Support >> ANSI C Examples >> Digital >> Read Values >> Cont Read Dig Chan - Ext Clk. This example will show you how to acquire digital samples with an external clock, but for your application you would want to use the internal clock on the 6533. 

 

When programming in C it is also a good thing to point out our C Reference Function guide. You can find it at  Start Menu >> All Programs >> National Instruments >> NI-DAQ >> Text-Based Code Support >> NI-DAQmx C Reference Help. Let me know if you have any follow up questions, but this should give you a good place to get started. Thanks!

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 2 of 2
(3,410 Views)