views:

28

answers:

1

Hi,

I am using an HP RS232 pole display with the following setting:

  • Char type: USA/Europe (default)
  • Command mode: EPSON (default) Baud
  • rate: 9600, n , 8, 1 (default?)
  • Passthru None (Default)

Here's the code

using System.IO.Ports;

private SerialPort port;
port = new SerialPort("COM2", 9600, Parity.None, 8, StopBits.One);
port.Handshake = Handshake.None;

Port.WriteLine("Welocome to something something");

It has 2 lines consisting of 20 characters each with a total of 40 characters. I have no control how and where the characters get displayed. I would like it to always begin on line 1 position 1 but as I said earlier how would I be able to do that. The same program if I run again and again it moves a character to the left. I have set it to accept ASCII char set and so I am able to type as is visble in the Writeline message

A: 

Check the documentation for the pole display. I bet there are some control characters that you can use.

If you have no documentation, try writing carriage returns (CR, '\r') and newlines ('\n') in various combinations and see what happens.

Go through the first 32 characters in the ASCII chart. See if they do anything.

Daren Thomas
Thanks let me test it out
SA
I have made progess. So when I put a 40 char message. Example "something line1 ...another thing line 2 ...\r\n". This causes the something line1 to be actually in line 1 and another thing line 2 to be in line 2. But when I run it again it switches places
SA