08-09-2011 10:22 PM
I know this has been answered 100 times and I have read every email in this forum looking for an answer to my 5002 proble.
I have now spent over 8 hrs trying to get this board to talk to Labview 10 with no luck.
I have reloaed my board drivers, set my baud rates from 9600 to 115200 and back on many occassions.
Everything I can think of is at 9600 baud at the moment. Measurement and Automtion Exployer gives me a everything is ok on port4.
I even maually changed all the parameters in the VI to the proper settings and still a get a flashing led but no communication or exceptance of the code.
I have flashed the board with this file LVIFA.pde 5/24/2011 3:40 PM
Does anyone have any ideas what is going on.
Thanks
Hans
08-10-2011 05:38 AM
Hello everyone,
I fired up my laptop again this morning and went through the setups. I deleted the port on the Automation Exploer and setup a new port.
My system is Win7 build 7600 Professional.
After I run the serial program I get the following errors. The first error I received without doing any adjustments. The second error I received after changing my baud rate and the board type in the int VI. For some reason the init never picks up the baud or the proper board connected to my Com port.
Thanks
Hans
08-10-2011 07:40 AM
From what I could tell of my many tests to solve it for me, until you get rid of the exclamation mark for the COM port in MAX, you will get nowhere. To do that, Windows and MAX must read the same COM port default settings. Perhaps a reboot is necessary once you've synched both.
And then, this quick fix (in Init VI) has solved my problems on all versions of LIFA, on 3 separate computers.
Hope it helps.
08-10-2011 05:50 PM
Hans,
What type of Arduino are you using? The title of your post says Mega9250 but I'm not able to find such board.
-Sam
LIFA Developer
08-11-2011 07:26 AM
Sorry that was a misprint.
It is the MEGA 2560 board.
I am trying to get another board to try on my laptop to see if I have the same issues.
Everything I have tried does not work. When running the servo example the init VI does not chanage to the correct board. It always says
I have a UNO attached and the baud rate stays at 115200.
The only thing that keeps comming to mind is that the MAX isn't communicating with the windows system some how.
normandinf the explanation mark on the com port in MAX went away after a reboot but still it is not pulling the parameters from windows com port settings.
Also as a side note I have no problems communicating using the Arduino program. I can upload different programs with no issues.
My quest moves on!!!!!
Thanks everyone for your help.
Hans
08-12-2011 02:39 PM
Ok I hooked up a UNO board with no problems It ran the servo V! per example.
When I first hookedup the UNO i did have to open the VISA Control and then MAX picked up the proper ports.
Don't know if this is the way MAX operates but it worked for me.
Now back to my 2560 board. Still no luck.
My question is does the LIFA program that is flashed into the board hold all the information like the UNO does.
When I try to read the information with the sero vi it never reads the Mega designation. It always says that I still have a UNO insstalled.
My port speed defaults to 115200 in the servo vi. So it seems nothing is being read from the 2560 board into the VI.
I have uploaded the program at least 4 times with no erros.
I go back to the UNO and their are no issues, everything runs fine.
Anybody have any more information or is their another LIFA file around. Or does the LIFA file need changes for my system.
Again thanks for all your help.
Hans
Fleming College
08-12-2011 03:09 PM
Hans,
The Uno and the Mega use the exact same LIFA Firmware.
When you select the board input to the init VI this creates a reference that is passed to all other LIFA VIs. Before you write to a pin the VI checks the pin number to make sure that it exists on the board you specified. The LIFA firmware is never notified of the board type you choose. If you are using a Mega you can set the board type to Uno and will not have any problems since the mega has all the pins that the uno has plus a lot more.
Please try the analog read example on the Mega and let me know if you have the same problem.
I am really curious why people are having trouble getting the MEGA 2560 to work. The one I have works flawlessly. Would you be willing to speak to me on the phone / skype and possible setup a remote desktop session so I can help get to the bottom of this?
Thanks,
-Sam K
LIFA Developer
08-16-2011 08:56 PM
Yes finally.
Well what I had to do to get my board to communicate is manually change the settings to the com port in the send receive VI. Once this was set everything
started working. I dont know if this helps in debugging the intial VI, but I hope it helps.
Hello Sammy, sorry I didn't get back to you sooner but very busy getting ready for September start up at the college. If you want to send me your phone number I will give you a call when I get a chance . List in the email the times you are available and I will try and get a hold of you then.
Thanks again
Hans
Fleming College
Thinking about this a little for some reason the intialization VI is not reading the com ports into your program. When I first started the Servo program I had to manually tell it what com port to use. It listed all 6 com ports that where being used in my system but it coundn't set the proper one so I had to manually tell it my board was using com3. That is when I decided to step throug the int VI and looked where the error was being generated. I changed the send receive port to com3 and everything started working. I do not know why your program is not grabbing these ports and setting them automatically.
Well I spoke to soon. When I stopped the program my 5002 error came back in the send receive VI. I am not sure why it is getting this error again!!!!!
Back to the drawing board.
So if I turn on the Highlight Execution in the INIT Block Diagram it seems to work properly. Maybe their is a timing issue here that the VI needs to pick up all the information at slow speed and then it works. Just my observations, maybe someone else has seen other issues. All I know is the board type still lists UNO and I am using Mega and the baud rate going into the VI syas 115200 and my windows com is set at 9600. So something must be wrong because I am watching my servos run at the moment.
I can recreate the 5002 error just by turning off the Highlight Execute button. This can be done everytime you execute the program. Hopefully this may help debug the intial VI to prevent this problem for the Mega users.
08-17-2011 10:25 PM
Hi Sammy_K,
I wasn't sure if you read my last post on what I found out about the timeing issue when going through the initVI for the Mega Board. I was wondering if you tried it on any of the other Mega boards you had or is this just an issue with my system. As listed in my last post this error can be repeated ever time I plug it into the USB port. I wasn't sure if their was a way of changing the connection speed through the ini loop.
Thanks
Hans
Fleming College
08-11-2012 02:01 AM
here is the answer.