LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 COM port swithching at once!!!

Ranjeet , if you say this setup is working fine at one place but not on other then the most common thought of every person would be that there is somthing worng with the setup at other place.

Now there are hundereds of possibilities , few we alreardy told you .

if you want some help you will have  to explain us actual setup and we will be happy to help. 

Message 21 of 117
(919 Views)

it would be easier to help if you can explain your setup.

0 Kudos
Message 22 of 117
(963 Views)

Ok...

 

I have two USB which is as a COM port for me.. One is arduino and other is USB(Say).

 

During testing I need to write and read from these com port based on the intial character of write string to VISA(Hence CASE str in my VI). .This USB com port is dynamicallly allocated but each time I will get same com port. Now this is my seqence of testing

 

1. wrtite and read from arduino - working

2. wrtite and read from arduino - working

3. wrtite and read from arduino - working...After this my USB will be detected and I will write and read succcessfuly.

4. wrtite and read from arduino - Fail.

 

 

After this in next testing

wrtite and read from arduino - fail...

 

 

I need to reconnect my 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 23 of 117
(957 Views)

I understand you are using two cables and it is a serial connect using micro usb and a B type. A loop back test will eliminate any doubt about hardware malfunctions. If you can short the ends of the cables you would also be testing everything but the other device.

 

Are you using All the same hardware for test and production except the PC's? Or do you have an identical setup of cables and controllers? 

 

Can you switch the devices connected to each Com port? This could test the devices. If the timeout follows the device it would give you and indication of a bad device.

0 Kudos
Message 24 of 117
(947 Views)

@Dave_Brandt wrote:

I understand you are using two cables and it is a serial connect using micro usb and a B type. A loop back test will eliminate any doubt about hardware malfunctions. If you can short the ends of the cables you would also be testing everything but the other device.

 

Are you using All the same hardware for test and production except the PC's? Or do you have an identical setup of cables and controllers? 

 

Can you switch the devices connected to each Com port? This could test the devices. If the timeout follows the device it would give you and indication of a bad device.


How can I use loop back?  I am using same setup for production and testing...same cable and all other device is same

--------------------------------------------------------------------------------------------------------
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 25 of 117
(938 Views)

short pin no 2 and 3 of your connector cable , send some character through MAX and you should receive same character.

0 Kudos
Message 26 of 117
(920 Views)

I have USB not RS232. then how can I?

--------------------------------------------------------------------------------------------------------
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 27 of 117
(913 Views)
The idea to do a loopback is just silly. There is obviously no pins 2 and 3 on a usb connection to an arduino.
0 Kudos
Message 28 of 117
(896 Views)

Yes of course it was a silly idea , and missed whole discussion that op is struggling with usb ports not serial.

0 Kudos
Message 29 of 117
(888 Views)

This is my latest code in which I modified the timeout setting each time when I am writing the data and reading it back.

 

Then also it is failing.What I sould do?

--------------------------------------------------------------------------------------------------------
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 30 of 117
(885 Views)