LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 COM port swithching at once!!!

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?

0 Kudos
Message 71 of 117
(870 Views)

That is what I am saying. In my case *AA$ will read the analog value of ADC0. Driver no issue

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 72 of 117
(864 Views)

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.

0 Kudos
Message 73 of 117
(845 Views)

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

0 Kudos
Message 74 of 117
(820 Views)

@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

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 75 of 117
(810 Views)

@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.

0 Kudos
Message 76 of 117
(801 Views)

@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.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 77 of 117
(792 Views)

@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.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 78 of 117
(791 Views)

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?).

0 Kudos
Message 79 of 117
(786 Views)

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?

                                

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 80 of 117
(780 Views)