Jump to content
  • 0

LABVIEW ANALOG SHIELD


AVATAR

Question

Hi, Has anyone been successful with using LabView to set analog output on a Digilent analog shield with an Arduino Uno Board??? I had problem running the sketches provided by Digilent thru the upload. Also could load anything but "Pass through" using "tsxpert" upload software. Please let me know if this is possible?? Do i need a Digilent board instead of an Arduino?  Cheers

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Hi Avatar,

I apologize for the long delay. I personally haven't attempted to program a MCU with the Analog Shield on it through LabVIEW, although I have programmed a Digilent board through LabVIEW with NI VISA and with LabVIEW MakerHUB LINX (I haven't used the TSXperts software before). 

In principle, I would think it's entirely possible to program the Arduino to work with the Analog Shield through LabVIEW. If I get the opportunity I'll take a look into what sort of steps you would need to take to program an Arduino directly from LabVIEW, but I don't know when that might happen.

Thanks,
JColvin

Link to comment
Share on other sites

On 10/19/2016 at 3:56 PM, JColvin said:

Hi Avatar,

I apologize for the long delay. I personally haven't attempted to program a MCU with the Analog Shield on it through LabVIEW, although I have programmed a Digilent board through LabVIEW with NI VISA and with LabVIEW MakerHUB LINX (I haven't used the TSXperts software before). 

In principle, I would think it's entirely possible to program the Arduino to work with the Analog Shield through LabVIEW. If I get the opportunity I'll take a look into what sort of steps you would need to take to program an Arduino directly from LabVIEW, but I don't know when that might happen.

Thanks,
JColvin

 

Link to comment
Share on other sites

Hi, 

Apologies for late response, been real busy. I am happy to do the work, if you could send me in the right direction. We are using Arduino boards in multiple programs, including one with 7 Arduino boards simultaneously collecting data and running digital I/Os. I have been playing with the boards we bought and not going far. I also have bought a Digilent wire-fire board,  hoping it would make a difference. I have tried PWM programs, but not successfully. Any help or advise is welcomed and happy to share the end results.

Cheers

AVATAR

Link to comment
Share on other sites

Hi Avatar,

What I ended up doing with Digilent boards to load a sketch onto them was to use the System Exec VI that's available in the Connectivity>Libraries and Executables pallete. All of the Digilent boards can be programmed by pic32prog (link to github on it) which I then used the System Exec VI to call. In terms of parameters for the pic32prog, what I ended up using was -d <COMPORT> and -b <baudrate>, with a baudrate value of 115200.

So what I ended up providing to the command line terminal on the System Exec VI was a string in the following style:

cmd/c <pathfile to pic32prog.exe> -d <COM port being used by MCU> -b 115200 <pathfile to .hex file to upload>

My path files had some spaces in them, so I needed to modify the string values as per this thread: http://forums.ni.com/t5/LabVIEW/Using-System-Exec-VI-to-pass-Dir-Paths-with-spaces-to-Program/m-p/2118566#M688174. The hex file you can by having the Arduino IDE do verbose output; it'll list where the .hex file is stored on your computer at the end of compilation (at least for me). If you are not using a PIC32 chip (which the pic32prog.exe can target) you would instead need to use AVRDUDE, which I personally haven't used, but it's another program that can be called from the command line. It looks like ladyada has a nice tutorial on using it here: http://www.ladyada.net/learn/avr/avrdude.html

I guess the big thing to note here is that you would still need to do the compilation and code testing on the board you're using with the Arduino IDE. This LabVIEW method will then just upload the pre-made program onto the board(s) for you. If you wanted to have a little more customization via LabVIEW to run the Analog Shield, I know LabVIEW MakerHub LINX has SPI functionality where you can have LabVIEW send SPI commands to the Arudino board and essentially mimic what the Analog Shield library does, but through LabVIEW.

Let me know if you have any more questions.

Thanks,
JColvin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...