Announcement

Collapse
No announcement yet.

serial com works on one pc, not others

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • serial com works on one pc, not others

    I have a scale indicator that communicates via RS-485.
    I purchased an RS-485/RS-232 converter that plugs into the com
    port on the PC. I wrote a simple program that opens com1, sends
    the appropriate command to prompt the scale indicator for the
    weight, and then reads the weight from the buffer.

    This program has run fine on my PC for a year. Now, I need to
    move the hardware to another PC in our office, but I can't get
    it to work! I've tried two other PC's and had no luck on either
    one. I am using the OPEN "COM1: 9600,N,8,1,RS,CD,CS" AS #1
    command to open the serial port. I have the serial port settings
    under Win2000 set up the same for all three PC's with no flow
    control. The working PC is a Compaq 750MHz Pentium II and the
    two non-working PC's are 350 MHz Pentium Compaq's.

    Does anyone have any ideas that I could try???

  • #2
    Just right off the top of my head:

    If the box(s) you are moving to have internal modems, the modems
    could be set to COM1. That would leave the serial port on the
    back of the box set to COM2. Check the CMOS on boot-up to make
    sure the IRQ's and other stuff are what you expect them to be.

    One other thing: You can try changing
    OPEN "COM1: 9600,N,8,1,RS,CD,CS" AS #1
    to
    OPEN "COM1: 9600,N,8,1,RS,CD,CS,DS" AS #1

    Adding the DS may make a difference, it may not.


    ------------------
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

    Comment


    • #3
      Check the BIOS setup to make sure the comm ports are enabled.

      ------------------
      Tom Hanlin
      PowerBASIC Staff

      Comment


      • #4
        Andy,

        the RS-485 communication is half-duplex: the RS232-RS485 converter switches the communication from TX to RX and vice-versa. The TX/RX switch can be accomplished (from the top of my head) two ways: verifying the RS232 TX activity (RS485 will TX while the RS232 TX is active) or verifying another line status. Some converters I used some years ago used the RTS line (request to send: it is active prior and during the TX activity).

        If Mel and Tom ideas didn't solve the problem, try removing the RS option from the OPEN statement. Furthermore, try removing the CS option - in this case, you must hardware connect the RTS and CTS lines toghether (may be the RS232-RS485 converter connects the two lines itself).

        ------------------


        [This message has been edited by Aldo Cavini (edited July 18, 2002).]
        Rgds, Aldo

        Comment

        Working...
        X