Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

touch sense

Hi Guys,

 

Im having troubles reading a touch from a user.

 

Basically, I have a few touch sensitive potentiometers (these are capacitive),

what I want to do is to read the touch output from a board and show which pot the user has touched.

 

At the moment, I can see the touch output on a scope, but the Software is not fast enough to read it. Is there a way we can use onboard clocks and triggers to see a better output?

 

I am including my code here for your information.

 

any help would be really appreciated

 

thanks,

Labmat

 

Download All
0 Kudos
Message 1 of 6
(6,384 Views)

Hey LAMBAT,

 

What hardware are you using and how fast are the pulses you need to read?  

 

You should be able to speed up your readings significantly by not opening and closing the DAQmx task inside your loop.  Instead outside the loop create a DAQmx task to read N digital channels.  Then inside the loop read from the channels.  Finally after the loop clear / close the DAQtask.  Check out the example finder (Help>>Find Example then Hardware Input and Output>>DAQmx>>Digital Input) for good examples to get you started.

 

Let us know if that helps or if you have more questions.

 

Thanks!

 

-Sam K

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

0 Kudos
Message 2 of 6
(6,373 Views)

HI Sammy,

 

Thanks for getting back to me and I apologize for the telay in replying back.

 

I am planning to use the NI6536 PCI board in my system. But for the prototyping, I am using a MYDAQ.

 

 

what is the best way to write and read data other than doing these inside the loop? Can you please do an example in the code I uploaded so that I can understand it

thanks,

Kind Regards,

Labmat

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

Hey Labmat,

 

There are tons of DAQ example in the LabVIEW Example Finder (Help>>Find Example then Hardware Input and Output>>DAQmx>>Digital Input).  I'd start with the Digital - Continuous Input.vi example.

 

Let us know if you have questions about that.

 

Thanks!

 

-Sam K

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

 

0 Kudos
Message 4 of 6
(6,326 Views)

Hi there,

Are you refering to putting the DAQmx tasks outside the While loop or the For loop?

 

Thanks,

Labmat

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

It depends on your application, but I think you should be able to move all of the task configuration outside your while loop.

 

This about it this way, what needs to be done every time (probably just reading / writing) what needs to be done some times, and what only needs to be done once (probably configuring the task, and then clearing and stopping the task).

 

Try not to do anything more than you have to in the loop.

 

-Sam K

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

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