Digilent ADC/DAC shield | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar
Please consider registering
guest
sp_LogInOut Log In sp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Digilent ADC/DAC shield
July 14, 2015
6:08 pm
Avatar
GLeMunyan
Member
Members
Forum Posts: 7
Member Since:
March 24, 2015
sp_UserOfflineSmall Offline

Seeing the new release email for Ver....17 release. I went and ordered the Digilent DA/ADC Shield. I have upgraded LabVIEW but I don't see any thing what so ever about how to use the board. I have looked in the current UM, on VI palettes. The most noticeable thing is there are a few pins not aligning when I plug the shield into my Mega 2560. Do I need a Uno board instead? 

July 14, 2015
9:52 pm
Avatar
filipealtoe
Admin
Forum Posts: 98
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Hello;

The Digilent API VIs set was used an example showcasing the new feature that was added to the compiler, which allows users to port existing Arduino libraries to LabVIEW so they can be used with the compiler. More details of that feature can be found on a separate User Guide we have created showing how to do that, that one can access through the user manual. Therefore, the API VIs are not part of the core product (i.e. palette), they reside on the addon folder (refer to the User Guide above for more information on the full path).

As far as using the shield itself, you should probably refer to Digilent's documentation on it (http://www.digilentinc.com/Pro.....LOG-SHIELD). I actually have developed/tested the APIs by using the shield on an Arduino Mega 2560; so I know for a fact it is compatible with the Mega for sure.

 

Hope this helps

Filipe

Cheers
Filipe

July 26, 2015
6:41 pm
Avatar
GLeMunyan
Member
Members
Forum Posts: 7
Member Since:
March 24, 2015
sp_UserOfflineSmall Offline

Fillipe,

Thanks. Found the VIs just where you said and it is in the UM, which I hadn't read. I have 3 projects, one could become a product and there are 2 others which are speculative now but could easily get turned on. I am excited that that there is continuous work to the compiler. Using the Digilent shield gives me a jump start for the speculative projects.  

Greg

July 26, 2015
6:46 pm
Avatar
filipealtoe
Admin
Forum Posts: 98
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Awesome. I am glad this can give you a head start on things. If you are making to NIWeek this year, stop by our booth (1004) to say hi. Smile

Cheers
Filipe

April 11, 2016
8:14 pm
Avatar
GLeMunyan
Member
Members
Forum Posts: 7
Member Since:
March 24, 2015
sp_UserOfflineSmall Offline

This project was dropped but I am now back to it. Cannot get to work. 

Using an Arduino Mega 2560 R3 and the Digilent Analog shield. Was using a Mega 2560 R2 - didn't work either

1) Using the example AI shield pass through VI. Compiles and downloads.

2) Using a Virtual Bench to provide waveform out and scope in. Trace the analog input to Pin 2 of ADS8343. 

3) But there is no activity on SPI. CS is high and there is no clock. There was no SPI activity with the other Arduino. 

What am I doing wrong?

April 11, 2016
8:21 pm
Avatar
filipealtoe
Admin
Forum Posts: 98
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Were you able to see it working if you run the Shipping Arduino Sketch example by Digilent? I would start there to make sure your HW setup is correct.

Cheers
Filipe

April 11, 2016
8:26 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

If Im not mistaken, the Diligent Analog Shield can only be used with the Uno.  Keep in mind the Uno and Mega have their SPI pins at different locations.  If its this one it says for Uno only.

April 16, 2016
6:53 pm
Avatar
GLeMunyan
Member
Members
Forum Posts: 7
Member Since:
March 24, 2015
sp_UserOfflineSmall Offline

Steffan, You are correct. I connected to a Uno and it worked fine. 

April 17, 2016
8:40 am
Avatar
scottj
Member
Members
Forum Posts: 28
Member Since:
April 17, 2016
sp_UserOfflineSmall Offline

Steffan said
If Im not mistaken, the Diligent Analog Shield can only be used with the Uno.  Keep in mind the Uno and Mega have their SPI pins at different locations.  If its this one it says for Uno only.

Hi Steffan,

Good news, some folks have gotten the Analog Shield to work with the Due.  See http://hackingphysics.com/2015.....o-the-due/  ...note the caution about the 3.3V configuration!

I will be spinning this up shortly and will post on how it goes.

May 5, 2016
1:33 am
Avatar
scottj
Member
Members
Forum Posts: 28
Member Since:
April 17, 2016
sp_UserOfflineSmall Offline

Steffan, the Analog Shield is documented on that product's Github entry as compatible with the Due.  See the ramp.ino example at https://github.com/mwingerson/.....mples/ramp

However, there is a note that the SPI library needs special treatment:

For Arduino DUE using Arduino IDE, SPI needs to be included before
analogShield.

I have not gotten my code to work on the Due, though it works fine with the Uno.  Might this include-order detail be the reason?  

Thanks in advance for any guidance or suggestions.

May 5, 2016
11:30 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

I took a look at the Due example and it does appear it is an SPI library linking issue.  If you are using the included Digilent library translator, it looks like analogShield.h is included before SPI.h so you could easily try switching it there as this suggests.  May be best to get it working in the Arduino IDE first and there were some suggestions about making sure the correct SPI library is linked in too.

June 23, 2016
4:48 pm
Avatar
GLeMunyan
Member
Members
Forum Posts: 7
Member Since:
March 24, 2015
sp_UserOfflineSmall Offline

Back to trying to get the Digilent Analog Shield working with the Mega 2560. I found this https://github.com/wespo/analogShield. Installed and tested it in Arduino IDE 1.68.

Trying to import it into into the LabVIEW compiler and can't seem to get it. Using the document "Porting an Arduino Library to LabVIEW.

Installed referring to the help topic "Porting an Arduino Library to LabVIEW" here is what I did.  

Copied to “[LABVIEWDIR]\vi.lib\Aledyne-TSXperts\Arduino Compatible Compiler for LabVIEW\addons\Digilent Analog Shield” Analog shield master.zip from github.

Unzipped  and also copied to the main folder the .CPP and .h file.

Attached is the Error Screen shot I am getting.

Environment stuff

Arduino IDE 1.6.8

LabVIEW 2015 SP1 32 bit

Arduino compatible compiler for LabVIEW V 1.2.2.21

Windows 8.1 Pro

June 24, 2016
6:03 pm
Avatar
scottj
Member
Members
Forum Posts: 28
Member Since:
April 17, 2016
sp_UserOfflineSmall Offline

Steffan said
If Im not mistaken, the Diligent Analog Shield can only be used with the Uno.  Keep in mind the Uno and Mega have their SPI pins at different locations.  If its this one it says for Uno only.

scottj said

Steffan said
If Im not mistaken, the Diligent Analog Shield can only be used with the Uno.  Keep in mind the Uno and Mega have their SPI pins at different locations.  If its this one it says for Uno only.

Hi Steffan,

Good news, some folks have gotten the Analog Shield to work with the Due.  See http://hackingphysics.com/2015.....o-the-due/  ...note the caution about the 3.3V configuration!

I will be spinning this up shortly and will post on how it goes.

 

Steffan, I've been meaning to update this thread with the good news: The Analog Shield does indeed work brilliantly on the Due with your compiler!  I've achieved 100kHz, 16-bit analog I/O updates with this shield and that marvelous little Arduino.  Lots of possibilities here!

Your suggestion to get it working in the Arduino IDE first is a good one.  Simply putting the SPI.h header first was all that's needed.  The correct library is needed of course, and getting that from https://github.com/wespo/analogshield is a simple matter.

Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
9
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
miche91: 33
scottj: 28
scadao: 23
Member Stats:
Guest Posters: 5
Members: 202
Moderators: 0
Admins: 3
Forum Stats:
Groups: 1
Forums: 2
Topics: 266
Posts: 1222
Newest Members:
pujacontrol
Administrators: geadmin: 22, filipealtoe: 96, Steffan: 356