9117 views|0 replies

1

Posts

0

Resources
The OP
 

PLC communication principle and program design [Copy link]

Communication programming is increasingly used in automation systems, such as data exchange between PLC and operating interface, control of frequency converter through communication, PLC networking, etc.
  
  To realize PLC communication programming, the selected PLC must first have strong communication capabilities, that is, the PLC operating system can support multiple communication formats. Usually, if a brand of PLC can provide users with more programming freedom, then the technical development capabilities of this brand will be stronger. Most brands can only provide fixed communication formats or protocols, which greatly limits the data exchange between PLC and other intelligent devices.
  
  Our PLC products have two free communication ports, RS232 and photoelectrically isolated RS485. The two communication ports can send and receive data at the same time, which can adapt to almost all communication formats and can provide multiple verification methods such as CRC and BCC.
  
  Take a PLC controlling multiple frequency converters of a certain brand through 485 communication as an example:
  if the baud rate of the frequency converter is 9600b/s, 8 data bits, odd parity, and 1 stop bit. Then you must first program a communication port setting statement in the initialization code area of the embedded C window of the plc: Set485Port(9600,o,8,1); just one statement completes the programming of the 485 communication port.
  
  Since the 485 communication must set the master-slave relationship, here the plc controls multiple inverters, so the plc must be set as the master, so you also need to add an address and master-slave setting statement in the initialization code area: SetAddress(1,MASTER); In fact, for the master controller, the address has lost its meaning.
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list