LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 5003 while using NI stepper example

Hello,

I am trying to control a stepper motor using the example "Arduino Stepper Motor.vi". I am using an Easy Driver on pins: DIR-7 STEP-9

I am recieving error 5003 out of the stepper configure vi. While using "highlight excecution", the init vi outputs no error, but then error 5003 comes out of the stepper configure vi. The knowledge base suggests to check for loose cables (Document ID:   5L1EEUYG). This is not the problem, as the NI example "Arduino Analog Read Pin.vi" works just fine.

Using Arduino Uno board, IDE 0020, labview 2011, windows 7

0 Kudos
Message 1 of 3
(5,207 Views)

I get the same error as the original post above.

I currently have an application where I need to control 2 stepper motors using Arduino Uno R3. I was able to successfully get the entire interface working from LabVIEW using the LIFA drivers.

I modified the example LabVIEW code for servo control for Arduino and was able to control the stepper motors. However, I see this error 5003 from the "Arduino Send Receive" function occur sporadically. The strange part is that it happens very intermittently. I am able to control the motor position a couple of  times (triggered by a boolean button push via an LV event structure) and then suddenly the error would throw up, and derail the whole program.

When I turn on "highlight execution" inside the Send-Receive VI, I see that the issue seems to be that no response is obtained from the Arduino via VISA after the VISA write function.

I look forward to your suggestion on how to evaluate and remedy the situation.

Thanks,

Ajay

0 Kudos
Message 2 of 3
(3,134 Views)

Hey Ajay,

I actually didn't write the stepper portion of LIFA (one of the only portions I didn't write) so I'm not sure what the problem is off the top of my head.  The timeout error basically means that LabVIEW hasn't heard back from the Arduino within a given amount of time (100 ms by default).  You could try increasing this timeout which is currently specified as the default value of the Time Out (100 ms) control in the Wait for Bytes VI.  You could also pass this value into the VI so you can control it from a high level for testing.

What modifications did you make to the firmware to get steppers working?

Thanks,

-Sam K

LIFA Developer

0 Kudos
Message 3 of 3
(3,134 Views)