08-18-2014 09:14 AM
The attached images are the circuit structure of the hardware, and the revised block diagram, in which there is no error message at running but no voltage output either. I have to solve this probblem very urgently and I appreciate your help wholeheartedly.
08-18-2014 10:09 AM
Where in the circuit are you measuring the voltage (the one which does not change)?
Have you verified with an oscilloscope or logic analyzer that the SPI signals are all correct in level and in timing? This seems like the first place to look considering the error message you were getting. Also try placing Error Out indicators on the error wire at various places in the VI to see which instance of the LIFA VIs first throws the error.
I notice that prior to the loop you write to pins 6,7,10,9 and inside the loop the sequence is 7,9,10,6. I am not familiar with what those pins do, so cannot comment on the correctness of the sequences, but it is something to check.
Lynn
08-18-2014 10:20 AM
Hi Lynn,
The pin assignments are:
piezo_select = 3; //Relay that switches between piezos
go_button = 5; //piezo/wire button
clr = 6;
sync = 10;
ldac = 7;
alarm = 8;
r_sel = 9;
led = 2.
I copied the SPI data set from an online image so it means nothing in this case. As the DAC resolution is 12-bit, I suppose the SPI data has to be converted to 8-bit resolution. Is the SPI data configuration necessary in my case?
The piezo is wired to pin 5, and when I directly digital write pin 5, there is voltage output, but very low and not adjustable; when digital write to other pins, there is no voltage output.
Can you help me on this? It's really urgent.
08-18-2014 10:26 AM
Hi Lynn,
When I modified the vi to the format in the attached image, there is no error but no voltage output at all.
08-18-2014 10:29 AM
This is the circuit structure, attached
08-18-2014 12:42 PM
Hi Dennis,
I have been waiting for your further feedback today but unfortunate. Could you please review my recent posts and see weather you can fix my problem? I have been struggling on it for over one week and really have to solve it in very limited time.
08-18-2014 12:49 PM
08-18-2014 04:47 PM
Since changing the sequence of the calls eliminated the error, it seems that you have made some progress.
In looking at your image I do not see anything which looks like data. How do you tell the Arduino what voltage (or PWM duty cycle) you want?
I suspect that your problem is in not thoroughly understanding the data requirements of the overall system. The version of LIFA I have has several VIs for PWM which you do not appear to be using. You have nothing wired to the SPI Data ports of the SPI VIs. IF you are not sending the Arduino any data, then the output sitting there unchanged is exactly what you told it to do!
Lynn
08-18-2014 05:46 PM
08-18-2014 06:00 PM
You write to pin 5 in two places. Outside the loop the value wired to the Pin Mode (Input) is Input, which converts to 0. Inside the loop the value is always 0. If it never changes, why do you expect the output to change?
Lynn