Data from a Printing Message

<< Click to Display Table of Contents >>

 

Data from a Printing Message

Ink jet printers support printing characters in ASCII format that range from code 20 to 7F, in hexadecimal. In addition to these characters in ASCII format, users can also insert special characters to format the attributes of a message. Some special codes are used to delimit a region of a message, indicating the starting and ending of that region, which is encapsulated to receive the corresponding attribute. The next table contains the attributes supported by ink jet printers.

Printing attributes

Printer

Attribute

Number of Characters

Hexadecimal Code

Delimiter

SCP or LCP

Hour field

2 (two)

11

No

SCP or LCP

Minute field

2 (two)

12

No

SCP or LCP

second field

2 (two)

13

No

SCP or LCP

Month field

2 (two)

14

No

SCP or LCP

Day field

2 (two)

15

No

SCP or LCP

Year field

2 (two)

16

No

SCP or LCP

Date field in Julian Calendar

2 (two)

17

No

SCP or LCP

sequential counter

Variable

18

Yes

SCP or LCP

Shift code field

1 (one) or 2 (two)

1A

No

SCP or LCP

Default 5x5 font

Variable

1B

Yes

SCP or LCP

Default 7x5 font

Variable

1C

Yes

SCP

Multidot 5x5 font

Variable

1D

Yes

LCP

Default 16x11 font

Variable

1D

Yes

SCP

Multidot 7x5 font

Variable

1E

Yes

SCP

Default 9x7 font

Variable

09

Yes

SCP

Multidot 9x7 font

Variable

0A

Yes

SCP or LCP

Alternative font

Variable

0B

Yes

LCP

Bold 16x11 font

Variable

0C

Yes

SCP or LCP

Date shifting (month)

Variable

0E

Yes

SCP or LCP

Date shifting (day)

Variable

0F

Yes

SCP or LCP

Date shifting (year)

Variable

10

Yes

SCP or LCP

Date shifting in Julian Calendar

Variable

1F

Yes

 

To send a message to an ink jet printer, use the Printing Data from Line 1, Printing Data from Line 2, or Printing Data from Line 3 Tags and a script to build a set of characters that compose this message.

For example, to create a message "EXPIRATION DATE 10/93" with the month and year fields and a default 7x5 font, use one of the next scripts, according to the product used.

Script in Elipse SCADA

tag001 = Chr(1Ch) + "EXPIRATION DATE" + Chr(14h) + "10/" + Chr(16h) + "93" + Chr(1Ch)
tag001.Write()

 

Script in Elipse E3, Elipse Power, or Elipse Water

Application.GetObject("Driver.tag001").Value = Chr(&H1C) & "EXPIRATION DATE" & Chr(&H14) & "10/" & Chr(&H16) & "93" & Chr(&H1C)
Application.GetObject("Driver.tag001").Write(EWriteSyncMode)

 

To create a message "SN# 000" with a sequential counter and a default 5x5 font, use one of the next scripts, according to the product used.

Script in Elipse SCADA

tag001 = Chr(1Bh) + "SN# " + Chr(18h) + "000" + Chr(18h) + Chr(1Bh)
tag001.Write()

 

Script in Elipse E3, Elipse Power ou Elipse Water

Application.GetObject("Driver.tag001").Value = Chr(&H1B) & "SN# " & Chr(&H18) & "000" & Chr(&H18) & Chr(&H1B)
Application.GetObject("Driver.tag001").Write(EWriteSyncMode)

Was this page useful?