LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 COM port swithching at once!!!


@Dennis_Knutson wrote:
For the arduino, are you using either LIFA, the newer LINX, or a different sketch? Is it always plugged in? What about the other USB connection? Is it always plugged in?

As far as the code, it should not be necessary to always change the timeout. I also don't understand the need to always flush the buffer.

I still think you need to check the Windows drivers for both the arduino and the other device.

I am not using any LIFA or other, I am using simple VISA to communicate like other VISA

Yes arduino is always plugged in but not other USB and hence when I complete my testing I close other USB but not arduino. 

 

If you say I will check the driver but if it was driver issue then it should never worked

--------------------------------------------------------------------------------------------------------
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 41 of 117
(1,573 Views)

Dennis,

 

The BD is 6 screens wide and 3 screens high and full of nested sequence structures, locla variables, nested loops, and other things which undoubtedly would give your Android a headache.

 

Ranjeet,

 

Can you tell us where in this gigantic BD the problem seems to occur?

 

Lynn

0 Kudos
Message 42 of 117
(1,562 Views)

Why not timeout value needs to be changes? 

 

you see when I am working on first COM port then I need to increase other COM port value becasue other may timeout?  Just asking one question?

 

Till when timeout value is valid. After write then read or vice versa or even if I am not doing anything then also it generates an error for timeout?

 

i.e when inside one case structure then for other COM I am not using any read / write so do I need to modify the timeout 

--------------------------------------------------------------------------------------------------------
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 43 of 117
(1,557 Views)
The arduino does require a Windows driver before you can use VISA and it does require a sketch to use the port.

The virtual com port drivers for Windows xp and Windows 7 could very well be different and if you are physically plugging and unplugging USB devices, there could be differences in how the two os's detect the device and load the Windows driver.
0 Kudos
Message 44 of 117
(1,555 Views)

@johnsold wrote:

Dennis,

 

The BD is 6 screens wide and 3 screens high and full of nested sequence structures, locla variables, nested loops, and other things which undoubtedly would give your Android a headache.

 

Ranjeet,

 

Can you tell us where in this gigantic BD the problem seems to occur?

 

Lynn


In my gigantic BD when I write and read from USB then after that when I write and read to arduino then my code says timeout and it fails. hence 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 45 of 117
(1,553 Views)

So do you think I need to run and test on WIN7 only? or anything I  can do 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 46 of 117
(1,551 Views)
Since you haven't checked, how could I know?

Make a simple VI that is not obscenely large that just has an event structure for simple communication to each port. Make sure both devices are plugged in before running the VI. This should help you isolate the problem.

To clarify my comments on setting the timeout and the flush buffer, I have seldom found it necessary to change these after the initial setup.
0 Kudos
Message 47 of 117
(1,539 Views)

@Dennis_Knutson wrote:
Since you haven't checked, how could I know?

Make a simple VI that is not obscenely large that just has an event structure for simple communication to each port. Make sure both devices are plugged in before running the VI. This should help you isolate the problem.

To clarify my comments on setting the timeout and the flush buffer, I have seldom found it necessary to change these after the initial setup.

OK i will do that.My device is always connected before running my application.

 

I am not sure how to use event str in case to choose the COM port etc. Will try to make out. Thanks for the effort.....

 

 

I am still waiting for my answer of my 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 48 of 117
(1,532 Views)
You've been using LabVIEW for quite some time and an event structure shouldn't take more than a few minutes to write. Have two buttons (ie port1 and port2). In the value change event for each, just have a simple write and read. Configuration for each port should be done before the loop with the event structure starts. I'm assuming you get a termination character from both so the bytes to read can just be some large constant.
0 Kudos
Message 49 of 117
(1,526 Views)

What does the Arduino port return from VISA Find Resource? If it returns "USB Serial Port", then the USB loop may close that port.

 

Look at the image below. The last VISA Resource Name value coming from the for loop goes to VISA Close. It also is passed to the property node in the next frame and the VISA Write in the following frame. Although there may be a value on that line which was a valid resource name, that resource was just closed. I am not sure what the property node and the VISA write do with that situation, but it does not seem right.

 

Close VISA.png

 

Does the timeout occur on the Write or the Read? What is the exact source string in the error cluster?

 

Lynn

0 Kudos
Message 50 of 117
(1,516 Views)