Recent

Author Topic: How can i send non printble asci carecter?  (Read 4349 times)

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
How can i send non printble asci carecter?
« on: September 02, 2010, 11:45:47 pm »
Hi,

I need send non printible ascii. For example.
if i send 1 (integer) my device conver it 49
what am i send for device understant 1
i looked this table http://easycalculation.com/ascii-hex.php
it write "SOH" 1 but how can i send it?

device has c# example but i can't convert it lazarus.
c# example write
Code: [Select]
                        foreach (string value in values)
                        {
                            int v = Int32.Parse(value);
                            if (v != 0)
                                ms.Write(new byte[] { 1 }, 0, 1);
                            else
                                ms.Write(new byte[] { 0 }, 0, 1);
                        }
                        break;
thanks.

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: How can i send non printble asci carecter?
« Reply #1 on: September 03, 2010, 12:21:36 am »
Code: [Select]
ShowMessage(Chr(1));
ShowMessage(Chr(49));

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
Re: How can i send non printble asci carecter?
« Reply #2 on: September 03, 2010, 02:22:49 pm »
Code: [Select]
ShowMessage(Chr(1));
ShowMessage(Chr(49));

this is working thanks

 

TinyPortal © 2005-2018