03-27-2013 01:00 PM
I modified the Analog Read Pin Example.vi by adding a VISA resource constant (COM6) and baud rate constant (9600). I further added probes as described.
The attached images show the probe report.







03-27-2013 01:03 PM
This is where I added the probes

03-27-2013 04:29 PM
This looks like I expected. This says to me that VISA was able to see the USB-USART and init the port. Did the VI run or did you get the 5002 error?
Can you place a probe on the error cluster after each sub vi it passes thru. This way we may be able to isolate where the error comes from. The 5002 error is generated in one of the cases inside the error/no/error case structure.
JohnCS
03-27-2013 04:51 PM
Thanks for your constant replies & help!
Question 1: Yes, I got the 5002 error again.
Question 2: The vi 'Wait for Bytes' is reporting 0 bytes and the indikator 'Bytes Available?' is constantly set to False. Would this help?
Daniel
-
03-28-2013 01:08 PM
Receiving zero bytes at the port is what triggers the 5002 error. Now we need to see where the bytes went! I don't have a Mini but I think I have a Pro around here somewhere. Its very similar to the Mini and I can try to make it work over the weekend. What device are you using for the USB to UART connection? Are you connecting the RTS?
In the interim, unless you changed it in LIFA, try setting the baud rate to the default baud rate which is 115200 in the LabVIEW VI you are using.
JohnCS
03-28-2013 05:03 PM
I'm using this device:
I have conncted the reset cable as described at the page (to DTR pin).
I changed the baud rate to 115200 yesterday night, but I still received error 5002...
Thanks heaps for your help!!!
Daniel
04-01-2013 03:32 AM
How exactly have you connected this RESET cable? When the VISA Configure Serial Port.vi runs, a reset is asserted by toggling the DTR line. For the Mini to run correctly, a 0.1uf cap should be in series between the DTR pin of the USB-UART and the RESET pin of the Mini on the J1 or J2 header.
04-01-2013 11:49 AM
There is a 100nF cap between the DTR pin of the USB-UART and the RESET pin of the Mini. Does this really matter?
04-02-2013 02:13 AM
A 100nf capacitor is OK. This is in the circuit to keep the RESET pin high and still allow for an auto-reset. When the LabVIEW serial port is initialized by the VI, DSR is forced low and then the Arduino will reboot the app. This also occurs when new Arduino firmware is uploaded. Check out the Arduino web site for a full explanation:
http://www.arduino.cc/en/Guide/ArduinoMini
To see if this is happening as expected, check the voltage at the DSR pin. When the VI starts, the voltage should go from 3.3 to about 0.1 volts. You could also try hitting the RESET button on the Arduino just before you run the VI.
JohnCS
04-02-2013 01:25 PM
No more Init.vi error 5002 when I follow the sequence:
1. start my vi
2. wait for a few seconds (or until timeout of Init.vi)
3. hit the arduino reset button
and the VI performes as expected, awesome! Thanks heaps for your advice JohnCS!
However, using my vi requires manual and user-dependent reset that I'd love to avoid. Uploading arduino sketches does not require manual reset. Voltage at the DSR pin (to arduino / USB-UART ground) seems to measure as expected: 3.4 V before & after, -0.02 V during VI operation. Any ideas regarding auto-reset?
Daniel