Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6501 C# Event Acquisition

A few years ago, I've develloped an aquisition interface using C#. As new requirements have been identified, I've selected the new 6501 device to replace the old hardware. In the opinion of the communitiy, what would be the best steps to take to minimize the transition since I would like to keep as much of my code as possible.
How to use the NI-DAQ library in the .Net environement ?
What are the steps to take to read an Event. (The expected events are random swicthes)
What are the limitation of the 6501 hardware that I should take into consideration (Aquisition speed, reset of input before reading the next pulse or not...)
What else should anyone be aware before starting a project like this.
 
Thanks to everyone for you valuable info.
 
Terry,
 
0 Kudos
Message 1 of 6
(6,497 Views)
HI Terry,
 
Your questions are very general, so I will try to give you some links to help files and KB's, in which you can find a lot of info's.
 
First of all, I would suggest to install the newest NI-DAQmx driver.
 
And then have a look to the help files, below a KB which explains where to find the help files for .NET 
 
About the 6501, there is user guide
 
I hope this info's will help you to get a good overview.
 
Best Regards,
 
Evrem Yarkin
0 Kudos
Message 2 of 6
(6,492 Views)

Thanks Evrem,

While proceeding through my projet I've checked those links, and my understanding of the whole things seems to have improve a whole bit. After reading the links I realised that I had to install the NI-DAQmx C Reference Help to find the info regarding the NI-DAQmx C# functions. This Reference help is really what I was missing to undertand what fonction to use. All the other help were not precise enought.

So far, the reading and writing of channels is going pretty well. The next step would be to use the triggering on the edge detection in the reading rather than the timer base reading. Any advice ?

Also, does anyone knows what is the limitation of channels in a task if any.

All the best.

Terry

0 Kudos
Message 3 of 6
(6,477 Views)
Hi Terry,
 
The edge detection can't be done in the HW, because all samples of the DI Lines and updates of the DO Lines on the USB 6501 are software-timed.
 
Perhaps it is sufficient for your application to "poll" a line and compare the value with the previous acquired value in the sw, which will detect a change on a DI Line too, but compared to hw timed, this method will be delayed and the delay depends on the performance of your system.
 
I would suggest to use one of our M-Series boards to get the change detection event or boards with triggering capabilities.
Full list of boards with change detection:
 
 
Best Regards,
 
Evrem Yarkin
0 Kudos
Message 4 of 6
(6,473 Views)

Hi Evrem,

This information is a big suprised for me. Of course with USB, I couldn't expect a true real time change detection, but I am really suprised that the edge change detection property is not implemented on this 6501 device. To be certain of this information, I've implemented in my software code the sampletimingtype.changedetection" property and the result is as you've described it. This property is not a supported value for this hardware...

The 6501 would be a perfect product if this was implemented. I looked into the 6509 and so on, but what I am looking for is an affordable device, USB preferably, with 24 DI/O minimum, and preferably wih change detection properties. Nothing that I've reviewed was closer than the 6501.

Implementing a thread to poll the Digital inputs is probably what I would turn up doing, but I still think this is a pity....

All the best,

 

0 Kudos
Message 5 of 6
(6,459 Views)

Hi Terry,

Thanks again for your answer.

I would suggest to contact our sales to determine the best boards which suits your needs.

Have a nice day!

Best Regards,

Evrem Yarkin

NI Switzerland

 

 

 

 

 

0 Kudos
Message 6 of 6
(6,458 Views)