LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LIFA Product Feedback and Suggestions

The Flow Control part of the Initialize Serial VI causes the 5002 error.

I ended up basically making a new Initailize Serial function, based off of the original Initialize Serial function. I tested the Initialize Arduino VI with every addition.  When I added the Flow Control, it gave me the dreaded 5002 error.  I went through every setting of Flow Control, and every one gave the 5002 error.

If I do not set the Flow Control, the VI executes normally without error.

So now we know what causes 5002, but not why.

Try it for yourself.  Either go into the Initialize Serial function, delete the wire going to the Flow Control input of the Instrument Property Node, and remove the Flow Control input by right clicking, and clicking remove element... or better yet, make a new Initialize Serial function that does not include the Flow Control input. 

I'll dig around a bit more before I go to bed to see if I can find anything out of the ordinary.

Message 21 of 82
(3,296 Views)

This guy seems to have found this issue before LIFA came to be...

http://arduino.cc/forum/index.php?action=printpage;topic=50266.0

The behavior he describes is exactly what happens with my board. 

0 Kudos
Message 22 of 82
(3,296 Views)

Interesting.  I'll look into this.  I also posted this on Error 5002 thread to see if this helps anyone else.

-Sam K

LIFA Developer

0 Kudos
Message 23 of 82
(3,296 Views)

I modified some of the LIFA code, but I haven't had a chance to test it yet.  I added event driven serial (based on the Serial Character event type), to the "Wait for bytes" VI, and I removed the Initialize serial and replaced it with my own initialize function, which skips the flow control. 

If it tests well, I can send it in an email or something. 

I only modified 3 files... and the changes were pretty small.

Init

Init.png

Wait for bytes

EDIT: SEE POST BELOW

Close

Close.png

0 Kudos
Message 24 of 82
(3,296 Views)

Oooh, I just noticed a possible bug that can occur, and mess up the program...  In the Wait for Bytes program, it originally had a Wait 1ms block... ,and would kill execution after 100 iteration (or 100ms), but I changed how the program worked and I never changed it.  This could possibly lock up the program for 10 seconds, which is 100x longer than the actual timeout. 

I'll fix this later, I know exactly what needs to happen.  Instead of using the itereation block, grab the time before you enter the while loop, and then subtract the time inside the block with the time outside the block.  If this time is >= 100, then stop execution.

EDIT:

Fixed!

Wait for bytes.png

I take no credit for these files... as most of the word was done by the LIFA team.  This file is unsupported by me, and if it messes anything up, I'm not responsible.  Blah blah blah... Basically I'm not responsible for anything my changes do.  Use at your own risk.  Back up your old files before using mine, because it might not work at all. 

Download All
Message 25 of 82
(3,296 Views)

As mentioned here, the example finder of 2011 does not correctly incorporate the arduino examples. (Works fine with LabVIEW 2010). Obviously, there seems to be some incompatiility that needs to be addressed. What needs to be done so the 2011 example finder shows the arduino examples correctly?

0 Kudos
Message 26 of 82
(3,296 Views)

Altenbach,

We also just noticed this.  We have rebuilt the toolkit for 2011 and should be releaseing the update soon.

-Sam K

LIFA Developer

Message 27 of 82
(3,296 Views)

Sammy_K

Will the rebuilt 2011 toolkit have support for stepper motors?

TurboM

0 Kudos
Message 28 of 82
(3,296 Views)

Turbo,

The next build we publish will not but I expect the one after to include steppers.  We ran into some usability issues with steppers which caused us to delay including it in the toolkit.

-Sam K

LIFA Developer

Message 29 of 82
(3,296 Views)

As well as sophisticated examples more basic building block examples are needed.  For example writing to a digital pin, reading the value of a digital pin, using an ATmegs328 analog comparator, temperature sensor, timers. output compare channels and input capture channel. 

I notice Labview''s main disscusion forum has spell check capability.  I wote for adding spell check capability to this disscussion group.

Howard

0 Kudos
Message 30 of 82
(3,296 Views)