Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital in not readable: ContReadDigChan_ExtClk example bugged

Hello everyone,

 

again I need to ask you guys for help as I can't figure out how to continiously read a digital input. I am altering a software which has been running fine for over a year. The software is written in C# using the applicable librarys. The card I am using is USB-6210.

 

What I am already doing (works perfectly well):

 

  • Read two analog in channels
  • Read quadrature encoder via ctr0
  • Synchronize the acquisition of the analog tasts by using a clock task on the freqout pin
  • Get all the data

 

What I am failing to do:

 

In addition to the analog ins, read another digital in. Here is the error message:

 

ni error.PNG

 

What i tried after the ContReadDigChan_ExtClk rebuild in my software didn't work:

 

  • Rebuild my 4 tasks in MAX. The problem: you can't access the /freqout pin in a MAX task. It works perfectly in the device self-test but there is no option to use it in a DAQmx Task
  • Using the example ContReadDigChan_ExtClk. Problem is this crashes with the same error as my application.

I also looked for the error here in the forums. All I could find is a post from 2006: http://forums.ni.com/t5/Digital-I-O/VB-2005-amp-ContReadDigChan-ExtClk-Example-Exception-Error/td-p/...

But the user here was obviously using a wrong card. My card supports generation the clock (demonstrated by my working project) so this can't be the error.

 

I am somewhat disappointed that the given sample is bugged 😞

 

Would really appreciate help on this!

 

Best

nano

0 Kudos
Message 1 of 2
(4,102 Views)

Hello nano,

 

are you using one of the PFI pins as a digital input? They can only be configured to be static in or output, which means, that they are software timed. Hardware or external timing is not possible for those pins.You can check that in the user manual of your 6210. http://www.ni.com/pdf/manuals/371931f.pdf -- page 86

 

Regards,

Elli

0 Kudos
Message 2 of 2
(4,081 Views)