Chapter 6 Applied Instructions If S 2 is D100 and S 3 is 10, the instruction sends the values in the low bytes in D100–D109 through the communication port specified by S 1 . 4. No strings are sent if the setting value in S 3 is 0. The maximum number of characters that can be sent is 256 words. 5. D 1 is the length of the data that is received.
D 1 +1– D 1 +n are the devices to store the data that is received If D 1 is D200, the value in D 2 is 3, and the value in D 2 +1 is 16#0D0A, the instruction stores data received in the low bytes in the devices starting from D201 (the high bytes is unchanged) The instruction continues to receive data until it receives the consecutive stop characters 16#0D and 16#0A. The instruction writes the length of the data received to D200 after receiving 16#0D and 16#0A, and sets a completion flag to ON after the receiving data stops. 6. D 2 is the mode for receiving data D 2 +1 is the condition that ends receiving of data D 2 and D 2 +1 are described in the following table.
6_ 6-549 D2 Mode for receiving data Setting value in D2+1 Remark 0 Not receiving communication data Unused After the sending of data is complete, set a completion flag to ON. 1 When the time after the last piece of data received exceeds the time set in D2+1, the receiving of data is complete. The setting value in D2+1 is time. The unit of measurement is 1 millisecond. The setting value in D2+1 is between 5–3000. If the time that you set is greater than 3000 milliseconds, the value in D2+1 is 3000. If the time that you set is less than 5 milliseconds, the value in D2+1 is 5. 2 The data received ends with a specific character. The setting value in D2+1 is a specific character.
If a specific character is 16#0A, the value in D2+1 is 16#000A. 3 The data received ends with two consecutive specific characters. The setting value in D2+1 is two specific characters. If two specific characters are 16#0D and 16#0A, the value in D2+1 is 16#0D0A. 4 The data received starts with a specific character. When the time after the last piece of data is received exceeds the time set in D2+1, the receiving of data is A specific character is stored in the high byte in D2+1, and the time is stored in the low byte in D2+1. The time set in the low byte in D2+1 is in the range of If a start character is 16#3A, and time is 15 milliseconds, the value in D2+1 is 16#3A0F.