使用搜索功能查看 Kepware 的信息库,其中包含 500 多篇知识库文章。缩小搜索结果范围,或在下面的搜索字段中输入您的查询。

或者,如果您无法找到解决方案,我们还有另一个资源:我们的 PTC eSupport Portal。 如果系统提示您登录 eSupport Portal,您可以使用“我的 Kepware”凭据。需要一个“我的 Kepware”帐户吗?在此处创建

搜索解决方案结果:
View All Solutions

Kepware Knowledge Base: Solution


Sending Multiple Pieces of Data to Create a Label on an ASCII Label Printer


Last Update: 2018/11/12

To create a label on an ASCII label printer, use multiple tags to update scratch buffers and a single tag (which is essentially a trigger) to send the information to the printer. For more information, download the ZIP file ASCII Printer Example.

This example prints a simulated product label. It has five tags: four data tags (Prod_Name, Prod_Desc, Prod_Model, and Prod_SN) and a Print Tag. The first three data tags are ASCII string tags, and the last data tag is an ASCII Integer format. The four data tags have the following:

  • A write transaction that writes data to a scratch buffer. Each tag has a different buffer.
  • A read transaction consisting of one Update Tag command that updates from the respective scratch buffer. This allows clients to read back what was last written to each tag.

The Print Tag has the following:

  • A write transaction that combines the other tags' data into one message and then sends that message to the device.
  • A read transaction that updates the tag from a scratch buffer.

Notes:

  1. The write transaction is triggered when a value is written to the Print Tag.
  2. This example uses the Initialize Buffers feature to make the Write Only Print Tag be read as good quality (or value 0). This feature can also be used to make the data tags be read as good quality before they've been written to. It is accessible from the User-Configurable (U-CON) driver's Transaction Editor's toolbar.