08-14-2014 12:38 AM
I don't think you are understanding. I never said that you should modify your "standard" Arduino code. I said to temporarily replace the sketch with the LIFA firmware for debugging purposes.
If you've ruled out the drivers and such, could you please attach the VI that you used to test this?
08-14-2014 01:04 AM
That is what I am saying. In my case *AA$ will read the analog value of ADC0. Driver no issue
08-14-2014 02:44 PM - edited 08-14-2014 02:46 PM
Since that test VI works and it is different than the implementation in your big VI, I would go back and look at those differences. Try it like you do it in your test VI.
Also, something that is very hard to determine from your block diagram (of the big VI) without actually being able to run the code, you should check the parameter that you are writing with VISA and make sure that the bytes that you are reading is correct for that given command. You can easily do this with a probe on the string to the VISA Write VI and a probe on the integer going to the VISA Read VI.
Also, I just noticed that you have a VISA Write to the Arduino but don't read anything for the command "*S$". Because you can't tell us what the code is on the Arduino, you should verify that you don't need to read anything from that command.
08-15-2014 02:12 PM
Ranjeet,
What I mean by the protocol includes a list of all the commands (such as "*AA$") and the responses the Arduino will send after receiving that command. This is in addition to the framing settings like baud, parity, stop bits, and so on. Handshaking (either hardware or software) is another level which must be specified.
Sometimes a misinterpretation of the protocol on what appears to be a very minor issue can completely disrupt communications.
Lynn
08-16-2014 12:26 AM
@Nathan_B. wrote:
Since that test VI works and it is different than the implementation in your big VI, I would go back and look at those differences. Try it like you do it in your test VI.
Also, something that is very hard to determine from your block diagram (of the big VI) without actually being able to run the code, you should check the parameter that you are writing with VISA and make sure that the bytes that you are reading is correct for that given command. You can easily do this with a probe on the string to the VISA Write VI and a probe on the integer going to the VISA Read VI.
Also, I just noticed that you have a VISA Write to the Arduino but don't read anything for the command "*S$". Because you can't tell us what the code is on the Arduino, you should verify that you don't need to read anything from that command.
*S$ is the command which is end of test thats why I am not reading any data afterwards. I crosschecked with VISA write string and also measuring string lenght to verify that proper data is being written. Development PC have WIN7 and application in which application is running have XP SP3, thats why I was checking with strlen and other stuff.
Just curious that same app is working on WIN7 but failing on XP SP3, is this OS issue? Becasue it is failing in such a way that I need to reconnect arduino to make it work
08-16-2014 12:33 AM
@Ranjeet_Singh wrote:
Just curious that same app is working on WIN7 but failing on XP SP3, is this OS issue? Becasue it is failing in such a way that I need to reconnect arduino to make it work
This is your original problem statement again. Throughout this whole thread, people have been trying to help you figure out this exact issue but you don't seem to be taking their advice to debug the situation in order to find the answer to the original question. It feels like we are running in circles.
08-16-2014 12:58 AM
@johnsold wrote:
Ranjeet,
What I mean by the protocol includes a list of all the commands (such as "*AA$") and the responses the Arduino will send after receiving that command. This is in addition to the framing settings like baud, parity, stop bits, and so on. Handshaking (either hardware or software) is another level which must be specified.
Sometimes a misinterpretation of the protocol on what appears to be a very minor issue can completely disrupt communications.
Lynn
Hi Lynn.
I am not sure about handshaking setting. Will ensure about handshaking signal.
08-16-2014 01:02 AM
@Nathan_B. wrote:
This is your original problem statement again. Throughout this whole thread, people have been trying to help you figure out this exact issue but you don't seem to be taking their advice to debug the situation in order to find the answer to the original question. It feels like we are running in circles.
Thats not fair nathan, I tried all suggestion I got becasue I want to solve. I wont let you all rotate in circle. Stupid to ask this question.
08-16-2014 01:34 AM
I mentioned three different things in Post 73 and you only responded to the last one. The first two were actually the more important suggestions.
Could you please try those two suggestions and tell us what you did (post the VI regarding the first suggestion) and the results that you got (What wires did you probe and what were their values?; Were the inputs valid according to your protocol?).
08-16-2014 01:51 AM
1. You should check the parameter that you are writing with VISA and make sure that the bytes that you are reading is correct for that given command: I used string lenght and also string to check whether proper value is being written or not? Fine
2. Using Probe: I used string to check proper value is being written. To be very frank I dont know how to use probe in remote PC in which my EXE is running. thats why I was using string to indicate the value?