LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 COM port swithching at once!!!

The only suggestion that I can add to the other suggestions is to test using LIFA or LINX.  A simple LIFA VI should help rule out some possible issues.  Make sure that you upload the LIFA firmware to the Arduino (overwritting your custom sketch).  I would simply make one that blinks the LED on pin 13.

0 Kudos
Message 61 of 117
(1,167 Views)

I cant change arduino code as that code is standard for my all application. Its not that labview application is failing. Its working sometime also. From the VI do you fouund any bug?  When it fails then I didnt get reply from arduino causing timeout error and next time when I need to make it work then I need to reconnect the arduino

--------------------------------------------------------------------------------------------------------
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 62 of 117
(1,155 Views)

Changing the Arduino sketch is an easy step but if you are unwilling to try it then I can't help you.

0 Kudos
Message 63 of 117
(1,147 Views)

You have to eliminate possibilities if you are going to narrow down your problem.  Just saying "Find the bug in my code" is not going to work at this point.  So going back to basics with your communications is a great way to troubleshoot.  You will almsot always find something fundamental that you messed up, but is hard to find.  That is what we keep recommending to you, but you just ignore our advice.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 64 of 117
(1,142 Views)

@Nathan_B. wrote:

Changing the Arduino sketch is an easy step but if you are unwilling to try it then I can't help you.


I cant change becasue this is standard and apart from me other programmer using same code for other application. 

--------------------------------------------------------------------------------------------------------
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 65 of 117
(1,136 Views)

@crossrulz wrote:

You have to eliminate possibilities if you are going to narrow down your problem.  Just saying "Find the bug in my code" is not going to work at this point.  So going back to basics with your communications is a great way to troubleshoot.  You will almsot always find something fundamental that you messed up, but is hard to find.  That is what we keep recommending to you, but you just ignore our advice.


I wrote simple VI in which I was writing and reading data from arduino. I  run it for 4000 times and it worked fine. I have worked on mega 2560 in same OS but I never faced this problem before. I know just saying "Find the bug in my code" is not going to work at this point. I never ignored any suggestions. I did but didnt mentioned it here.  Communication  wise it look fine. Some small issue somewhere messing. Difficult to find. Still trying

--------------------------------------------------------------------------------------------------------
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 66 of 117
(1,131 Views)

If that communication from the Arduino is based on some kind of standard within your organization, then a communications protocol document should exist.

 

Get that document and study it until you understand everything the Arduino communication is going to do, including disconnected cables, power failures and restarts, and so on. Once you understand the protocol thoroughly, then you should be able to design a LabVIEW program to communicate with it.

 

Without that protocol anything we suggest here is mostly guesswork.

 

Lynn

Message 67 of 117
(1,110 Views)

@johnsold wrote:

If that communication from the Arduino is based on some kind of standard within your organization, then a communications protocol document should exist.

 

Get that document and study it until you understand everything the Arduino communication is going to do, including disconnected cables, power failures and restarts, and so on. Once you understand the protocol thoroughly, then you should be able to design a LabVIEW program to communicate with it.

 

Without that protocol anything we suggest here is mostly guesswork.

 

Lynn


Hi Lynn,

                     Arduino code is standard and only fixed thing is baud rate. apart from this there no difference. I can communicate in any manner. There is no protocol. Only fixed command and fixed reposnses. Only problem is sometime it works for 2-3 times, sometimes fails for the first time. When fails needs to reconnect to make it work again. 

--------------------------------------------------------------------------------------------------------
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 68 of 117
(1,089 Views)

@Ranjeet_Singh wrote:

Hi Lynn,

                     Arduino code is standard and only fixed thing is baud rate. apart from this there no difference. I can communicate in any manner. There is no protocol. Only fixed command and fixed reposnses. Only problem is sometime it works for 2-3 times, sometimes fails for the first time. When fails needs to reconnect to make it work again. 


 

Saying that the "Arduino code is standard" doesn't mean anything to us when we don't know what "standard" means.  A protocol in laymens terms is a definition of the comunication (so all the commands/inputs and all the results/outputs).

 

It is very easy to upload a sketch to the Arduino.  So, you can easily upload LIFA to it and run the attached VI (Set the COM port to the COM port that your Arduino is registered as shown in the device manager).

 

Run it for a little while and push the 'LED Control' button a few times to make sure that you are able to control the LED on the Arduino.  Then, after you have performed this test, you will be able to re-upload your "standard" sketch that you use for work back onto the Arduino.

 

If you are able to run the program then that will show that the Arduino drivers and USB drivers are likely performing correctly.

0 Kudos
Message 69 of 117
(1,081 Views)

Arduino code is standard means its fixed for all other application and I cant change it. It has normal command and response which is working fine from long time.

I know it is very easy to upload the sketch and I already told that I run read analog value application in which LV application was reading the analog value, it run for 4000 time correctly so it means all drivers are working fine. 

 

There is some issue with the VI I am running eventhough same logic I used for read analog value program. I was thinking of increasing the delay between two consecutive read that might have something.

--------------------------------------------------------------------------------------------------------
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 70 of 117
(1,067 Views)