大家好!我真的需要你的建议!
Hello everyone! I realy need your advices!
我的CPU是313C,带有模块CP 341-RS232C
My CPU is 313C with modul CP 341-RS232C
然后我用专用电缆rj45-db9(母电缆)连接了这两个设备,接线图在我的附件中。
Then i connected both device with special cable rj45-db9 (female), wires diagram are in my attachments.
我使用函数P_SND_RK发送数据,使用函数P_RCV_RK接收数据。但我没有结果。模块cp341上的指示灯始终关闭,当我切换0->1个请求位(P_SND_RK)时,仍然没有任何效果。但当我断开连接时,电缆引导的SF变为红色。如果我向CP341发送一些数据,我一定会看到TX闪烁,不是吗?
I am using functions P_SND_RK to send data and P_RCV_RK for recieving . But i have no result. Leds on the module cp341 always off, when i swith 0->1 request bit (P_SND_RK) nothing still no effect. But when i disconect the cable led SF became RED. If i send some data into CP341 i must see TX blinking, is't it?
我附上了我的模块和pogram在线状态的图片。请注意我的问题。也许我做错了什么。
I attached image of the online status of the my module and pogram. Pls, can you pay attention for my question. MAy be i made something wrong.
谨此致意,德米特里。
With best regards, Dmitry.
Zdravstvuj,
Zdravstvuj,
我可能看到了一些误解,这个Moxa适配器将以太网转换为RS-232/422/485,反之亦然。不明白你为什么要做一些从RJ45到RS232的电缆,这是错误的。Moxa作为终端服务器工作,因此您需要根据需要使用Moxa软件对其进行配置。在一侧,您可以连接CP341 RS-232电缆的串行端口,在Moxa的另一侧是以太网端口,需要连接到以太网设备通信。没什么特别的。但您的基本问题是CP341通信,您在CP341上设置了什么协议以及其他通信设置?我在你的pdf中遗漏了这些信息
probably I see some missunderstanding, this Moxa adapter converts Ethernet to RS-232/422/485 and vice versa. Don't understand why you make some cable from RJ45 to RS232, this is wrong. Moxa working as Terminal Server, so you need configure it with Moxa SW as you need. On one side you have serial ports where you can attach your CP341 RS-232 cable and on another side of Moxa is Ethernet port which need to be connected to Ethernet device communicating. Nothing special. But your base problem is with CP341 communication, what protocol did you set on CP341 and what other communication settings? This info I missing in your pdf.
谢谢你的回复
Thank you for you reply
这个NPORT有两个端口rs232,但它像RJ45形式的端口。所以我连接了
This NPORT has two port rs232 but it mades like RJ45 form port. So i connected
MY_PC(以太网)->Nport(rs232)->CP341,带特殊电缆,来自艾草站点。是的,首先我必须解决CP341的问题,因为我没有;看不到LED在工作
MY_PC (ethernet)->Nport (rs232)->CP341 with special cable from moxa site. Yes, fist i must to solve my problem with CP341, because i don;t see leds working.
你好
Hello,
好的,在我看来,你的CP341配置没有问题。现在了解RS xxx端口的RJ45端口。您将哪个DB(221?)定义为发送和接收缓冲区?建议将结构作为具有足够元素值的字节数组。在这种情况下,需要将您的电缆连接到Moxa(希望连接良好!!),然后您当然可以看到TX/RX闪烁。在良好的cfg并将所有内容下载到CPU的情况下,功能不会出现问题。重要的是检查SEND、DONE或ERROR的DONE、ERROR和STATUS输出是否为TRUE,然后您可以通过简单的位条件重置REQ。例如。如何检查PC侧传入消息,什么SW?请再说一遍,你还需要正确配置Moxa
ok, don't see problem with your cfg of CP341 in my opinion. Understand now with that RJ45 ports for RS-xxx ports. What DB (221?) you have defined as Send and Receive buffer? Recommend structure as Array of Bytes with enough value of elements. In this case is need to have your cable connected to Moxa (hope is good wired!!!), then you can see of course TX/RX flashes. In case of good cfg and download all to CPU, don't see problem for functionality. Important is check DONE, ERROR and STATUS outputs of SEND, DONE or ERROR for TRUE, then you can reset your REQ via simple bit condition f.ex. How you can check PC side incoming message, what SW? Pls again, you need have also Moxa properly configured.
但发光二极管的工作是否取决于MOXA设备的设置?例如,在这一刻,我把艾草的设置也做错了,但这是否应该是来自cp341的传输器的工作?我正在使用MOXA磁盘上的软件。
But is work of leds depend of settings of MOXA device ? For example for this moment i made setting of moxa also wrong, but should be work of transmitton from cp341 or not? I am using SW from disk of MOXA .
为了将硬件配置加载到CP-341中,我必须像普通下载所有站点一样使用,不是吗?
For loading HW-config into CP-341 i must use like ordinary download all station, is't it?
在db221中,我使用了字节的arrray[1.30]
In db221 i used arrray[1..30] of byte
你好
Hello,
同样,如果您的介质是RS-232,您需要将电缆正确连接到接口的两侧。简单地说,如果你从CP341上拔下电缆,你就无法直观地监控LED。因此,我建议这样做。在这种情况下还出现了另一个问题,您已经定义了30个字节的数组,但您使用send指令LEN->50个字节进行发送。这是个问题。您不需要将cfg保存到CP,只需将完整的hw-cfg保存到PLC CPU即可
again, if your medium is RS-232 you need connect correctly cable to both sides of interfaces. Simply if you unplug your cable from CP341 you can't monitor visualy that LEDs. Therefore I've recommended that. Also another problem in this case has arise, you have defined array of 30 bytes but you send with SEND instruction LEN->50 bytes. This is problem. You don't need save cfg to CP, enough is save complete hw cfg to PLC CPU.
此时此刻,我对终端的模拟器进行了设置,以便将数据发送到我的PC的com端口/从其读取数据。如果我将一些东西发送到这个端口-在模块cp341 flash led TX上。这是一小步,但我不能读取数据,而且我在功能上没有错误。如果我试图从PLC发送数据,但没有结果;
At this momemt i made settings of emulators of the terminal for the send/read the data to/from com port of my PC. If i send something into this port - on the module cp341 flash led TX. It is little step , but i can't read data, also i have no error in function. If i try to send data from PLC have no results;
这是一个奇迹。现在(晚饭后)它开始工作了,我在HWconfig中没有任何更改,只有数据长度。所以,亲爱的,Duris_I,非常感谢你的支持!!:)
It is a miracle. Now (after dinner) it is working, i have no changed nothing in HWconfig, only length of data. So, dear, Duris_I, thanks very much for your support!!! :)
我希望这篇文章能对某人有所帮助
I hope this post will be helphul for somebody
...案2你好,geddawy;; Hello geddawy;; 恐怕键盘和PLC不容易连接。 I am afraid that keyboards and PLCs do not interface easily.计算机键盘设计用于使用计算机识别的PC BIOS(基本输入/输出系统)和硬件中断例程;PLC不支持此类外部输入/输出组件...
问题描述你好 Hello这是我第一次在S7(CP341-RS422/485 6ES7 341-1CH02-0AE0)中使用Modbus通信,我很难理解DB编号、基数/偏移量编号和产生的字号的分配。 This is the first time I have used Modbus communications in S7 (CP341-RS422/485 6ES7 341-1CH02-0AE0)and I am ...
...到“hello“和一些奇怪的字母。然而,这不是问题,当我连接打印机时,它会打印“c*****,c***”。我不知道问题出在哪里。有人能帮我解决这个问题吗??????????????????????????????????...
...过通信再次激活C CP443-1,因为A CPU出现故障。B CPU将无法连接到C CP卡。 Well If say for an example the A CPU fails then your B CPU will take over as master, and communicate with D CP card. If your D fails, you can not activate the C CP443-1 again with communication because the A...
问题描述你好 hi,我正在S71214C上使用RS232接口 i am working with a an RS232 interface on a S71214C当我高速接收数据时,我的rcv_ptp函数出现错误状态80E0。 When i receive data at high speed i got an error status 80E0 with my rcv_ptp function.如何知道缓冲区大小...
问题描述配置: Configuration:CPU 317连接到2个远程IO站ET200。profinet运行到一个艾条交换机,然后运行到光纤到远程IO,在那里有另一个艾克,然后是两个ET200。 CPU 317 connected with 2 remote IO station ET200. The profinet is running to a moxa switch then...
问题描述我正在使用CP341 MODBUS RTU从设备工作,但我可以完成工作。IAM令人困惑,因为CD驱动器中包含的示例程序适用于R232,而不是RS485,我的问题是:我只需要设置地址销售、波特率、停止位、配对。操作模式(在我的情况下为...
问题描述有人知道为什么我只能用CP341 RS485 MODBUS从设备读取输入状态或线圈状态功能01和02? SOME BODY KNOW WHY I CAN ONLY READ INPUT STATUS OR COIL STATUS FUNCTION 01 AND 02 WITH A CP341 RS485 MODBUS SLAVE?我有一个CP341 RS485 MODBUS从站和IAM,在我的PG中使...
...t is the procedure with the CP441?我看到了一个ptp网络和带有ID的连接,我需要为这个基本的发送/接收设置一个网络吗。 I see a ptp network and connections with ID's, do I need to set up a network just for this basic send/receive stuff.有人知道一个示例程序(...
问题描述你好 Hi我尝试在连接到S7300的4台电脑(使用wincc)和控制室之间进行通信。4台电脑和控制室的距离为1公里。我正在寻找简单的想法来做这件事,我需要你的帮助。谢谢。 i try to make COMMUNICATION BETWEEN 4 pc ( with wincc ) connect...
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!