串行打印机Serial printer

您好,我在哪里可以找到如何使用串行打印机S7 1200的信息? 如何将字符串发送到打印机?他需要特殊司机吗? 谢谢...

问题描述

您好,我在哪里可以找到如何使用串行打印机S7 1200的信息?

Hello where can I find information on how to use a serial printer S7 1200?

如何将字符串发送到打印机?他需要特殊司机吗?

How do I send a string of characters to the printer? He needs special drivers?

谢谢

Thanks

推荐答案2

你好

Hi,

看看这些示例程序:

take a look at these sample programs:

/tf/WW/en/职位/40617

/tf/WW/en/Posts/40617

如果与超级终端一起工作,应该很容易适应您的情况。。。

If works with a hyper terminal, it should be easy to adapt to your case...

推荐答案3

PC和PLC之间的电缆配置必须为Nullmodem或Fullmodem?

the configuration of the cable between PC and PLC must be Nullmodem or Fullmodem?

谢谢

Thanks

推荐答案4

这取决于您的打印机。只需检查引脚,确保传输到另一个设备上的接收器,反之亦然。

That would depend on your printer. Just check the pin-outs and ensure the transmit goes to the receive on the other device and vice versa.

如果打印机需要硬件握手,您可能需要一个介于PLC和打印机之间的设备来处理。

If your printer needs hardware handshaking, you may need a device in between (PLC and printer)to handle that for you.

推荐答案5

原则上,3线电缆(Rx、Tx和Gnd)。但有时调制解调器的使用和完整性:取决于-将是硬件或软件流控制(打印)

In principle, a 3-wire cable (Rx, Tx and Gnd). But sometimes the use and full modem: it depends on - will be hardware or software flow control (print)

推荐答案6

Hello, I managed to make the connection between the printer and the PLC.
I can send a string of characters, but I have a problem: The press is only if the printer buffer is full. So I have to send 42 characters at a time.

推荐答案7

你好

Hi,

检查打印机供应商,是否有传输结束的特殊字符或类似字符。

check if the printer supplier, if there is some spetial character for end of transmission or some like it.

否则,选项是在字符串末尾用空格“填充”字符串。。。

Else the option is to "fill" the string with spaces at its ends...

推荐答案8

你好

Hello.

我正在尝试使用PTP_send从数据库发送字符串。

I'm trying to send strings from a DB using PTP_SEND.

该问题还发送了2个字节的链起点。

The problem is also sent 2 bytes start of the chain.

“表12-22”中的手册说

The manual in the "Table 12-22," says

“STRING/THENGTH参数包含

"STRING / The LENGTH parameter contains the number of characters to be

变送器。仅传输字符串的字符。最大值

Transmitter. Only the characters of the String are Transmitted. The maximum

不传输字符串的当前字节和长度字节。"

current and length bytes of the string are not Transmitted. "

我怎么能修好它?

How I can fix it?

非常感谢你

thank you very much

推荐答案9

对不起,我的英语不好,也许我误解了你的问题,但发送到串口的数据,Arrey来自哪里?

Excuse my bad English, maybe I misunderstood your question, but the data sent to the serial port, Arrey come from?

推荐答案10

参见示例

see example

推荐答案11

“发送到串口的数据,Arrey来自哪里?”

"the data sent to the serial port, Arrey come from?"

来自数据库中的字符串值。

From A string value in a DB.

在您的示例中,使用char数组的DB是可以的,但我想发送更多的字符。

In your example the DB with array of char is ok, but i want to send much more characters.

ex:string in db:'打印第一行$R$L打印第二行。$R$L’

ex: string in db : 'Print first line.$R$LPrint second line.$R$L'

获取:

Get :

#▲打印第一行。

#▲Print first line.

打印第二行。

Print second line.

(#▲ 可能是其他人只是为了解释。)

(#▲ may be others is only for explain.)

字符串的最大长度和实际长度的两个字节被发送到端口。

The two bytes with MAX LENGHT & ACTUAL LENGHT of the string was sent to the port.

但系统手册中另有说明。

But the system manual say otherwise.

(在CPU 1214 DCDCDC v1.0中)

(in CPU 1214 DCDCDC v1.0)

推荐答案12

前两个字符是字符串缓冲区的长度和最大长度。

Those first two characters are the length and max length for the string buffer.

查看常见问题解答,了解指向字符串缓冲区第三个内存位置的指针的方法。这是实际输出的开始。对于包含字符串缓冲区的数据库,需要关闭符号寻址,以便直接指向缓冲区第3个字符的起始字节。

Look at the FAQs for ways to refer to a pointer to the 3rd memory location of the string buffer. That is the start of your actual output. Symbolic addressing needs to be turned off for the DB containing your string buffer so you can point directly to the starting byte of the 3rd character of the buffer.

假设您的数据库只有字符串缓冲区,因此它从字节0开始。第一个可打印字符位于字节2。

Assume your DB only has the string buffer, so it starts at Byte 0. The first printable character is at Byte 2.

我认为它看起来像P#DB1.DBX2.0 BYTE 42

I think it looks like P#DB1.DBX2.0 BYTE 42

它指向DB1,从第2个字节开始,发送42个字节。我将其放入SEND_PTP缓冲区输入,并用于RS485模块。我怀疑它对RS232模块也会起同样的作用。调整DB#、起始偏移量和长度以适合您的应用程序。

It points to DB1, starting at 2nd byte, sending 42 bytes. I put this in the SEND_PTP buffer input and works for RS485 module. I suspect it will work the same for RS232 module. Adjust the DB #, starting offset, and length to suit your application.

发布您的结果!

Post your results!

推荐答案13

它工作得很好。

It works fine.

应注意长度=0

It should be noted LENGTH = 0

非常感谢你。

Thank you very much.

推荐答案14

问题原因:CPU固件V1

Cause of the issue: The CPU with firmware V1

“点对点(PtP)指令

"Point-to-Point (PtP) instructions

·完成输出只对1次扫描打开:在V2CPU中,PtP指令的完成输出现在只对1个扫描打开。

·Done output is turned on for only 1 scan: In a V2CPU, the Done output of a PtP instruction now turns on for only 1 scan.

·字符串数据传输:V2CPU现在只传输字符串数据本身,不传输长度字段。(V1CPU将传输字符串数据和长度字段。)

·Transmission of String data: The V2CPU now transmits only the String data itself and does not transmit the length fields. (A V1CPU would transmit both the String data and the length fields.)

你可能感兴趣的文章

徽标之间的远距离串行链接

问题描述我需要通过串行链接链接两个Logo。然而,当两个设备都在运行时,链接可能会定期断开并重新创建。两个位置之间的接线非常陈旧,有许多接头和终端。我还怀疑它在系统中有很多电容。因此,我怀疑我将需要使用外...

  • 发布于 2022-10-10 17:49
  • 阅读 ( 170 )

徽标到串行标签印机

...数据从徽标0BA6.ES10发送到带有串行端口(Compa II 106/12)的印机。    I would need to send some data to a printer with serial port (Compa II 106/12) from a Logo 0BA6.ES10.有办法吗?(还有一个TD显示屏) Is there a way? (There is also a TD display)推荐答案2如...

  • 发布于 2022-10-10 21:25
  • 阅读 ( 105 )

串行印机

问题描述您好,我在哪里可以找到如何使用串行印机S7 1200的信息? Hello where can I find information on how to use a serial printer S7 1200?如何将字符串发送到印机?他需要特殊司机吗? How do I send a string of characters to the printer? He needs speci...

  • 发布于 2022-10-12 12:28
  • 阅读 ( 153 )

Modbus总线

...0 cpu's?顺致敬意, Best regards推荐答案2你好 Hi,Modbus TCP还是串行? Modbus TCP or serial?Modbus主站还是从站? Modbus Master or Slave?您订购的软件包附带了相应的示例。 Respective examples are coming with thesoftware package you order.如果是Modbus串行,您...

  • 发布于 2022-10-12 12:45
  • 阅读 ( 170 )

s71200-cm1241与印机的rs232通信

...友们,我正在尝试使用s71200 cpu 1212c和rs232通信模块cm1241与印机通信。我还有一根9针串行到25针并行印机端口转换电缆我正在使用sendptp块,当我与超级终端通信时,如果我发送“hello”,我会收到“hello“和一些奇怪的字母。...

  • 发布于 2022-10-12 12:55
  • 阅读 ( 136 )

用于MPI到以太网连接的HMS Anybus串行服务器

...述大家好, Hello all,我想知道是否有论坛成员有使用Anybus串行服务器产品的经验,通过我们的工厂生产网络创建从PLC到编程设备的连接。 I am wondering if any forum members have experience with this Anybus Serial Server product, creating a connection from t...

  • 发布于 2022-10-12 13:36
  • 阅读 ( 138 )

通过串行端口发送短信

...ime中的脚本发送短信我已经开发了使用GSM调制解调器通过串行端口发送SMS的脚本。该脚本在Windows XP中运行良好但不幸的是,我的客户购买了WIndows7 32位操作系统除发送短信脚本外,其他所有任务都工作正常i alkso已在windows7中注册...

  • 发布于 2022-10-12 14:38
  • 阅读 ( 161 )

错误830-ET200S串行接口和Micom 121

...题描述亲爱的各位, Dear all,我使用带有Modbus协议的ET200S串行接口连接20个Areva Micom 121继电器。 I use ET200S Serial Interface with Modbus protocol to connect with 20 Areva Micom 121 relays.我尝试了多种方法来更改参数、接线……在最好的情况下,我...

  • 发布于 2022-10-12 14:51
  • 阅读 ( 129 )

示例程序:-S7-1200与Videojet 1510工业印机通信

...所有人 Dear All我成功地将s7-1200 CPU1214c AC/DC/Rly与Videojet 1510印机进行通信,以便进行消息选择。我在下面附上示例程序。                  I communicate s7-1200 CPU1214c AC/DC/Rly with Videojet 1510 Printer For message Selection successfully. I attach s...

  • 发布于 2022-10-17 08:21
  • 阅读 ( 111 )

CP341 Modbus总线

...rt up tomorrow morning.我可以选择4种协议;3964(R)-RK512-ASCII-印机 There are 4 protocols that I can choose; 3964(R) - RK512 - ASCII - PRINTER现在我必须选择哪一个?这是否必须与控制器相同,或者是特定于电缆,或者您如何选择正确的协议。 Now w...

  • 发布于 2022-10-18 08:19
  • 阅读 ( 108 )