title: How to Display Text and Clear the Text of Partner CD7220-UN Customer Display / Pole Display
body: <p>I have a Partner Tech CD7220-U 1.0 Customer Display and I'm trying to develop a POS system using <code>C#</code>. I need to show the unit price and Total Amount using the customer display. 
  So I have searched the google and found few solutions to show the text on the display.
  here are the links I followed,</p>
  
  <p>1)<a href="http://www.codeproject.com/Questions/67846/How-to-display-text-on-USB-Posiflex-Customer-Displ" rel="nofollow noreferrer">http://www.codeproject.com/Questions/67846/How-to-display-text-on-USB-Posiflex-Customer-Displ</a></p>
  
  <p>2)<a href="http://www.codeproject.com/Tips/658377/PartnerTech-CD-POS-Customer-Display-NET-Class" rel="nofollow noreferrer">http://www.codeproject.com/Tips/658377/PartnerTech-CD-POS-Customer-Display-NET-Class</a></p>
  
  <p>In the example (1) </p>
  
  <pre><code>    using Microsoft.PointOfService;
  
  private const string WelcomeMessage = "Welcome\r\n";
  private PosExplorer posExplorer;
  private LineDisplay posLineDisplay;
  private DeviceInfo posLineDisplaydevice;
  
  public void LineDisplayUnit()
  {
  this.posExplorer = new PosExplorer(this);
  this.posLineDisplaydevice = this.posExplorer.GetDevice("LineDisplay", "POSIFLEX_LINEDISPLAY");
  
  try
  {
  this.posLineDisplay = (LineDisplay)this.posExplorer.CreateInstance(this.posLineDisplaydevice);
  this.posLineDisplay.Open();
  this.posLineDisplay.Claim(1000);
  this.posLineDisplay.DeviceEnabled = true;
  this.posLineDisplay.DisplayText(WelcomeMessage);
  this.posLineDisplay.DisplayTextAt(2, 1, this.LeftAlign("Amount", 7) + this.RightAlign(this.GrandTotalAmount.ToString("0.00"), 12));
  this.posLineDisplay.Close();
  
  }
  catch (Exception)
  {
  
  }
  }
  </code></pre>
  
  <p>I have the following exception 
  <img src="https://i.stack.imgur.com/tbxjR.jpg" alt="enter image description here"></p>
  
  <p>In example to I'm able to send the Text to the Customer Display. but I'm unable to clear the screen. </p>
  
  <p>Here's the code</p>
  
  <pre><code>public void WriteSomethingRedToPrinterThroughDisplay()
      {
          cUSB.OpenPort(); // Open the USB Port
          cUSB.WritePort(Strings.Chr(12));   // Clear pole display
          cUSB.WritePort(Strings.Chr(27) + Strings.Chr(61) + 
          Strings.Chr(1));   // Send print through pole display
          cUSB.WritePort(Strings.Chr(27) + Strings.Chr(64));   // Initialize printer
          cUSB.WritePort(Strings.Chr(27) + Strings.Chr(114) + 
          Strings.Chr(1));   // Select Red color to print
          cUSB.WritePort(string.Format("{0,-10}{1,7:-0.000}
          {2,10:0.00}{3,13:-0.00}", tempitemid, tempunits, 
          tempunitprice, tempsubtotal) + Strings.Chr(10));   // Print text and new line
          cUSB.WritePort(Strings.Chr(27) + Strings.Chr(114) + 
          Strings.Chr(0));   // Set color to default Black
          cUSB.WritePort(Strings.Chr(27) + Strings.Chr(61) + 
          Strings.Chr(2));   // De-select printer and enable pole display
          cUSB.ClosePort();  // Close the USB Port
      }
  </code></pre>
  
  <p>Please send me the correct tutorial or correct method to show text in the display unit. your help will be highly appreciated.</p>