Google Groups Home
Help | Sign in
help needed for RS422 Serial Comm
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
fulltime  
View profile
 More options Aug 1 2007, 10:21 am
Newsgroups: comp.sys.ibm.pc.hardware.comm
From: fulltime <PiaoCh...@gmail.com>
Date: Wed, 01 Aug 2007 07:21:49 -0700
Local: Wed, Aug 1 2007 10:21 am
Subject: help needed for RS422 Serial Comm
Hi all,

I installed a PCI bus interface board with 2 RS422 com ports on it. I
am attempting to transfer data between these 2 com ports. (for eg. com
3 send data to com 4)

The pseudo code of my main program is as follows:

1. Configure the 2 ports
2. Open both ports
3. Call sendByte () for com 3 to send data out.
4. Call readByte () for com 4 to read in data.
5. Close both ports

However, the whole program hangs inside the readByte () which is
listed below.

///////////////////////////////////////////////////////
// Function name        : CSerialComm::ReadByte
// Description      : Reads a byte from the selected port
// Return type          : BOOL
// Argument         : BYTE& by
///////////////////////////////////////////////////////
BOOL CSerialComm::ReadByte(BYTE& by)
{
        BYTE byResByte;
        by=0;

        DWORD dwBytesTxD=0;

        if (ReadFile (m_hComm, &byResByte, 1, &dwBytesTxD, 0))
        {
                 if (dwBytesTxD == 1)
                 {
                                 by=byResByte;
                                 return TRUE;
                }
        }
        return FALSE;

}

/
=========================================================================

Can anyone provide me with some advice?

Since the data is first sent out via com3, My intial guess why it
didnt work out is that by
the time the receiver wants to read in the data, no more data exist on
the line
for it to be read in..

Thks alot for whatever advice u may provide.
FT


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fulltime  
View profile
 More options Aug 2 2007, 3:16 am
Newsgroups: comp.sys.ibm.pc.hardware.comm
From: fulltime <PiaoCh...@gmail.com>
Date: Thu, 02 Aug 2007 00:16:48 -0700
Local: Thurs, Aug 2 2007 3:16 am
Subject: Re: help needed for RS422 Serial Comm
I tested my codes using the RS232 interface, i.e COM1 and COM2 on my
PC, it works perfectly fine, can send n recv data. However, when i use
the codes on my RS422 PCI card which has 2 COM ports, com 3 and 4, it
cannot perform send and receive.

anyone knows if the cables needed for RS232 and RS422 transmission are
different?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fulltime  
View profile
 More options Aug 2 2007, 4:39 am
Newsgroups: comp.sys.ibm.pc.hardware.comm
From: fulltime <PiaoCh...@gmail.com>
Date: Thu, 02 Aug 2007 01:39:22 -0700
Local: Thurs, Aug 2 2007 4:39 am
Subject: Re: help needed for RS422 Serial Comm
On Aug 2, 3:16 pm, fulltime <PiaoCh...@gmail.com> wrote:

> I tested my codes using the RS232 interface, i.e COM1 and COM2 on my
> PC, it works perfectly fine, can send n recv data. However, when i use
> the codes on my RS422 PCI card which has 2 COM ports, com 3 and 4, it
> cannot perform send and receive.

> anyone knows if the cables needed for RS232 and RS422 transmission are
> different?

The pin out for RS232 and RS422 are different, hence the cable i used
for RS232 cannot be used on  the 2 COM ports on this RS422 PCI card.

I understand that I can self produce the cable based on the pin
layout, but Does anyone know if there exists a RS422 cable in the
market?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google