04-03-2017 01:38 PM - edited 04-03-2017 01:41 PM
Hi all,
I'm working on a program that I'd like to use as an automated guitar tuner. I'm trying to use a myDAQ to read in a signal from the guitar via the Audio In socket and one of the Analog Outputs to generate a PWM signal to control a servo motor, however when I try to run these simultaneously in a while loop (along with code for pitch identification and subsequent duty cycle adjustments) I get errors like Error -200290, which seems to suggest that the program is unable to write samples fast enough, but I'm not sure how to fix that. This happens before the motor has a chance to move much. I'm currently using DAQ assistants for both input and output at the moment.
So my main thought is that there is a problem with the sampling rates but I haven't been able to fix it with that yet.
Does anyone know what the problem might be, or is there a tutorial on dealing with simultaneous input and output somewhere? I haven't had any luck finding one so far.
Any help would be much appreciated, cheers!
04-05-2017 02:37 AM