LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My Serial Communication application works only on some Computers

Hi to all,
 
I did a serial communication application that is working only on some PC.  It works perfectly on my labtop and on a desktop but it doesn't work on 2 other desktop that I installed it.  It looks like the communication starts very well and then it stop communicating.  I already add the property node with "Serial End Mode for Reads" set to none on every single VISA READ vi that I used.  I also set the property "Termination Charcter Enable" to false after I initialize the ports on my block diagram.
 
The OS of the PC are as follows:
 
Labtop  -----------------  Windows XP, Service Pack 2  ----------------  working OK
Desktop #1  -----------  Windows XP, Service Pack 2 -----------------  working OK
Desktop #2  -----------  Windows XP, Servoce Pack 2 -----------------  not working
Desktop #3 ------------  Windows 2K, Service Pack 4 -----------------  not working.
 
Visa Drivers are installed, All XP Machines have the COM PORT Driver 5.1.2600.0  and the 2K machine has the 5.0.2183.1 driver.
 
All machines were tested using the same hardware (an interface hardware between the PC and the product under test).
 
0 Kudos
Message 1 of 14
(3,764 Views)
Can you post your code, or a sample of it here so we can test it? I've never used the property node with "Serial End Mode for Reads" so I would look into that first. You say that the communication starts OK but then you lose communication. Can you be more specific?

Hope we can help.

B-)
0 Kudos
Message 2 of 14
(3,748 Views)

How are you configuring the serial port/communication within your vi?  ALso, what is the configuration of the ports on the PC's?

0 Kudos
Message 3 of 14
(3,742 Views)

The Code is big because it is the hole test for a product that we manufacture so I will try to put here some snap shots to be a little bit more specific.  It will be very dificult to replicate for you because some of the communication is being generated by the product that I'm testing, in addition my setup has some custom build interface boards.  Any how here are some images.

Before this sequence step I just turn on a relay to power up my test fixture, then I close the Rx line of the Communication port (with another relay).  As soon as the product see a change of state on the Rx line he goes into communication mode and send me his information.  That is why I'm monitoring the Port for at least 100 bytes of information that is approximately what the product will send me back.  Then I wait 1 second just in case to be sure that all the information that I need is on the buffer.  Then I read the buffer and present the information readed in a string indicator in the control pannel.

On the computers that the application is not working I can see a few additional charaters that I was not specting to see and after those characters I loose the communication with my product.  The additional charcters that I'm seeing are aleatory.  They can be different on each run ut they are always the same amount (2 charcters).  Here are some snapshots of the data on good and bad computers.

This is the information after the read on the Good PC.

Here is the information after the read on a Bad PC

As you can see the communication starts because I can see the products information but after those additional charcters I loose communication with the unit under test.

 

0 Kudos
Message 4 of 14
(3,725 Views)
This is how the ports are being configured on the block Diagram.  Basically it is the default values but I wired them after I start having problems with the application to be sure that the ports were initialized correctly on my application.  I also add a property node with the property "Termination Charcather Enable" set to false. 
 
 
I add the property node because I read on your site that some people had problems with the serial communication because of the termination characters and I wnat to eliminate that variable from my equation.
0 Kudos
Message 5 of 14
(3,724 Views)
Don't point to images that are on your local pc. Only you can see them. Simply attach them using the browse button below the message body.
0 Kudos
Message 6 of 14
(3,719 Views)

Sorry for that this is my forst time on this forum

 

Attached you will find:

1. an image of the sequence that ai think is giving me problems

2.  An image of a good data read

3. An image of a bad data read

 

Download All
0 Kudos
Message 7 of 14
(3,713 Views)
This last one is an image of how I configure the ports on my block diagram.
0 Kudos
Message 8 of 14
(3,713 Views)

Instead of the property nodes, you could have simply wired a false constant to the Enable Termination Character input of the VISA Configure Serial Port. It would do exactly the same thing.

I don't think the termination character setting has anything to do with the characters you are seeing. Are they always the same or are they random? The style of your block diagram coding leaves a bit to be desired with the sequence structure and local variables. Are you writing to the local in any other location?

Have you tried using Hyperterminal to communicate? If you see the same thing there, you will know it's not something in the code.

Message 9 of 14
(3,686 Views)

Further to what Denis mentionned...

Without looking at your code in any details, I've observed one thing.  You are using a global variable for the serial port address.  Have you checked that all PC's have the same serial port configuration? ie: COM1, COM2, etc?  are you using add-on serial boards (ie: LAVA, etc?)?

RayR

Message Edited by JoeLabView on 11-02-2007 03:41 PM

Message 10 of 14
(3,684 Views)