Problem with my block diagram: Error 5002 occurred at Init.vi

1

I'm making a heart rate analyze, but I'm having a real problem with that. When I'm press to start the programm doesn't work, so, I've press to stop the running program and it shows me in the section where it's ready to close or finish the connection:

Error 5002 occurred at Init.vi. Unable to establish connection with Arduino. Please ensure that you have selected the correct COM port and that you have flashed the Arduino with the correct firmware.

This error code is undefined. Undefined errors might occur for a number of reasons. For example, no one has provided a description for the code, or you might have wired a number that is not an error code to the error code input.

Additionally, undefined error codes might occur because the error relates to a third-party object, such as the operating system or ActiveX. For these third-party errors, you might be able to obtain a description of the error by searching the Web for the error code (5002) or for its hexadecimal representation (0x0000138A).

This is my VI diagram: Image 1 Image 2

And this is my control panel:

Control panel

And the connections to my arduino: Arduino

So:

  1. how can I solve this problem?
  2. Where can I find more information to get this

Thanks for your help, but I'm new on this world (Arduino and Labview)

arduino
labview
asked on Stack Overflow Nov 23, 2018 by jecorrales

2 Answers

2

Follow the suggestion given in error message. First of all, make sure that you could communicate with Arduino using some simple serial line terminal, like RealTerm, or HTerm. In case if you couldn't send any command using serial line terminal, check out which firmware do you have on Arduino. This is the way, how you could troubleshoot this issue...

answered on Stack Overflow Nov 23, 2018 by kosist
1

You can ignore the second and third paragraphs of that error message; they're generated because the Arduino VI's you're using are generating a custom error code that they haven't registered with the LabVIEW development environment, so its automated error handling doesn't know what they mean. The information you need is in the first paragraph though.

As kosist's answer says, the first thing to check is that you can communicate with the Arduino at all. Before you even start with LabVIEW, have you tried using the Arduino IDE to program your device with a simple program like the 'blink' example?

If that works, then the next step is to make sure you've programmed your Arduino with the firmware it needs to communicate with the LabVIEW VIs you're using (can you link to where you got them from?) and then try a much simpler test program in LabVIEW - again, just get the Arduino to do something simple like turn the buzzer on and off. If you hit a problem with any of those, I suggest asking a new question with details of exactly what you tried and what errors you saw.

answered on Stack Overflow Nov 23, 2018 by nekomatic

User contributions licensed under CC BY-SA 3.0