02-28-2014 09:08 AM
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
02-28-2014 12:51 PM
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
Join / Follow the LabVIEW Hacker Group on google+
03-05-2014 09:01 AM
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
03-05-2014 09:07 AM
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
Join / Follow the LabVIEW Hacker Group on google+
03-11-2014 06:34 AM
Hi there,
Are you refering to putting the DAQmx tasks outside the While loop or the For loop?
Thanks,
Labmat
03-11-2014 09:07 AM
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
Join / Follow the LabVIEW Hacker Group on google+