hi, there! I am new to Maple World. In the past, I used Arduino UNO in the project. However, it has only 8-bit DAC. So we decided to use Maple. Labview has corresponding interface for Arduino. Is there any hardware to let maple communicate with Labview?Thank you
How to let Maple communicate with Labview
(7 posts) (4 voices)-
Posted 3 years ago #
-
Hello Rocky,
Thanks for the loud shout. Welcome to the world of LeafLabs. Yes, I know about the official LabVIEW interface for Arduino users, but I have not tried it.
I have some experience with LabVIEW and a Maple board (Rev 3). I will try to help you and other Maple users, but let me ask a few direct question:
1) I am not familiar with the UNO specs. Does it have a built-in DAC or did you mean to write "8-bit ADC". If you are interested in ADC and not interested in "very fast" ADC measurements, can you improve on the Arduino 8-bit ADC resolution by taking multiple samplings? I have read a few application papers describing improving the effective number of ADC bits by simply averaging multiple samplings. How many bits do you need?
I seem to remember the Maple RET6 "beta" had built-in DAC, but I may be wrong.
2) I am confused. What do you mean "Is there any hardware to let maple communicate with Labview?" Is there a reason you want to put another hardware layer between LabVIEW and a Maple board? Why not just write a LabVIEW VI to communicate with the Maple board via SerialUSB? It is more clear to my why you might want to place a Maple between another "board" (eg. a simple temperature sensor) and LabVIEW.
3) I assume you are not talking about using LabVIEW to program the Maple. This is outside my experience and ability to help, but I believe it may be possible.
4) Assuming you want to use the Maple to perform 12-bit ADC measurements what speed do you need and how many different ADC values do you need?
5) Have you played with DMA on the Maple?
6) Are you using a real LeafLabs Maple?
7) Are there any deadlines? What is "the project" (where you previously used the UNO)?
If you describe your project and needs in greater detail it is more likely that I and other forum users can help you.
Stephen from NYC (full disclosure: I am not a member of the LeafLabs staff)
Posted 3 years ago # -
Hi, Stephen, thank you so much for explicit reply.
1. Sorry for wrong description. I mean 8-bit PWM output. UNO only supports 8-bit PWM support, but maple supports 12-bit PWM. My project is about using PID algorithm to control the position of micro optical resonator(nano scale), so we have high requirement on control voltage. We use UNO or Maple to set the ideal position(set point in PID). So, I also have use low-pass filter after UNO or maple to get DC signal. It is really painful to design low pass filter. And I posted similar question on Arduino forum. Someone told me that I could use MCP4822 12-bit DAC, controlled by SPI. This is a good idea and I am trying to implement it. Sorry, I have no idea about multiple samples
2. NI developed corresponding Arduino UNO interface VI. It works like this. I could set the parameter of PWM, like time duty. Since I am design a real time system, it is better for me to control the board through laptop, not written code with time duty parameter.
3. Definitely not programming board through LabView. I think VI only works as Interface. So I could control the board input through laptop.
And I just got my board today,lol
BTW, Stephen, could we communicate in email? My email is [email deleted] Coz I believe this forum's function is not so well.Posted 3 years ago # -
Actually the Uno should have 2 timers, one that is 16-bit and the other is 8 bit. The Maple has only 16-bit timers. How high is the requirement for your control voltage? As in how much noise can you tolerate?
For that DAC, you may want to use a high stability reference voltage regulator to increase the effectiveness of the DAC.Posted 3 years ago # -
BTW, Stephen, could we communicate in email? My email is <Email Removed> Coz I believe this forum's function is not so well.
Please try to keep any on-topic discussion in the forum. If Stephen emails you personally, his help won't be available to other users who are having the same problems. You'll also miss out on responses from others, like Crenn's above post.
Posted 3 years ago # -
Rocky-
Yes, I agree that tech forums can be slower than email. However, I agree with mbolivar that encouraging input from multiple users is the best approach to get robust solutions. I usually enjoy reading and thinking about the posts from crenn. I prefer to keep this discussion in the public forum to maximize the benefit for the whole community. I will delete the email address you posted so you do not receive spam.
Rocky, I need some more help from you. I do not know anything about the "PID algorithm". Can you please write a summary or point me to a quick review?
In your last post you mentioned some filters. Do you plan to use the bypass filters built into LabVIEW or are you using LabVIEW for another reason? For example, are you simply planning to use SerialUSB() commands between LabVIEW and your Maple? If I am correct how often (how many Hz) will you be sending commands from LabVIEW and your Maple? If you need bidirectional communication is the data transfer about equal each way?
You never answered the question regarding what board you received. Is it a real LeafLabs board or a clone? With new development projects it may be best if we start with hardware which is identical (or at least close) if possible.
I played around with LabVIEW 2009 and a Maple Rev 3 and a Maple mini using SerialUSB. I do NOT have any experience with SPI.
And to end, you never answered my question about deadlines. Is this project something which we can develop at a leisurely pace or is it already crunch time?
Thanks for your questions and answers.
Stephen from NYC (full disclosure: I am not a member of the LeafLabs staff)
Posted 3 years ago # -
I believe what he means by a PID algorithm is the calculations which determines the response of a system's error. In this case he's measuring the position of a micro optical resonator and knows the position that he wants it, the difference between these is the error. The PID control is made up of 3 components, a proportional component which is usually a fixed gain of the error (e.g. Gp*e), an integral component, so looking at the error over time to determine where the error accumulation will attempt to predict the position when the algorithm is run again (e.g. Gi*dt*e) and the derivative component to look at how fast it's correcting the error (e.g. Gd*(e/dt) ).
Some more information can be found here: http://en.wikipedia.org/wiki/PID_controller
If you need assistance with communicating SPI, I can help if you have issues as I've been using SPI for a few things, including using the Maple as a slave device to another maple for a test.
Posted 3 years ago #
Reply
You must log in to post.