Description
DSDP150 57160001-GF Communication Programming Instructions
DSDP150 57160001-GF pi protocol is mainly used for programming, ppi networking, hmi interface, etc.; free protocol can be user-defined communication protocols, the cpu and any communication protocols open to the network of devices, such as the upper computer, printers, barcoders and so on. The so-called free protocol, the user can change the baud rate of the 485 port, data format (number of data bits, stop bits, parity) to adapt to different communication protocols by setting the parameters of the special register smb30, smb130 (corresponding to the 226’s 2 # port). 226 has two communication ports, which can be connected to two different peripherals at the same time.
DSDP150 57160001-GF instructions are simple, for example, xmt99, 0 can be completed both up to 255 bytes (the number of bytes set by vb99 within the number of decisions) to send; and receive to be completed by the interrupt procedure, each received a byte of data will generate an interrupt, the received data is stored in the receive buffer (smb2), the interrupt service programme you must The received data is stored in the receive buffer (smb2), and you must process this data immediately in the interrupt service procedure, because the next received byte is also placed in smb2, which means that the size of the receive buffer is only one byte, which is only used for receiving in this example.