From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino - SPI - DAC converter

Hi friends,

I am completely new in labview coding. I have an arduino nuo chip, connected with a DAC converter, AD5504, Analog Devices, and an operational ampli er (OPA551, Texas Instruments) circuit to generate voltage output for piezoelectric firing. The wanted voltage output ranges in 0 - 60 v. However, under my coded program, there is either no voltage output or very low output, like 1.5 V. In the rare case of low voltage output, the voltage is not changable, by applying either digital write () or PWM write pin (). In the attached vi it gives error 5004 at running. Please look through my coding and help me figure it out.

 

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.

 

This is urgent so a quick favor is needed.

Thanks.

 

 

0 Kudos
Message 1 of 22
(4,085 Views)
Are you saying that you've debugged your sketch and serial communication with the arduino development system and you only have a problem with running it with LabVIEW?
0 Kudos
Message 2 of 22
(4,074 Views)

Actually the hardware connection were made by somebody else and it proved functioning properly under the interface developed in arduino open source platform. I need to code the controll bit in labview for specific uses. 

So the hardware is no problem. But I could not communicate with it in labview properly. 

It's supposed to output upto 60 V voltage, but I could only receive 1.5 V output, and not adjustable under digital write or PWM write pin.

0 Kudos
Message 3 of 22
(4,065 Views)
I'm posting from my phone. Can you attach an image of the block diagram and the complete error message, please?
0 Kudos
Message 4 of 22
(4,059 Views)

Im now working at home and the laptop has no Labview installed. I will send you tomorrow morning. However, there was no error message in the code but no voltage output either. Thanks a lot

0 Kudos
Message 5 of 22
(4,054 Views)
Then you aren't getting error 5004? Help> Explain Errors will work if you forgot the message on the pop-up or error indicator.
0 Kudos
Message 6 of 22
(4,051 Views)

Sorry I forget. Error 5004 did exist. But if I had not configure SPI data, there was no error.

0 Kudos
Message 7 of 22
(4,045 Views)

The error is 5004, occurred at 'SPI data'.

ERR5004: SPI Send Receive.  The word size is invalid for the number of SPI bytes to be sent.  The number of SPI bytes to send must be divisible by the SPI word size.

Please see attached PNG block diagram

0 Kudos
Message 8 of 22
(3,995 Views)

Does any one have solutions for my case?

0 Kudos
Message 9 of 22
(3,971 Views)

i have to complete this coding in very limited time and i appreciate any help here

0 Kudos
Message 10 of 22
(3,964 Views)