The TO instruction is an instruction to write data from the PLC to an additional special unit (such as FX2N-4DA) buffer memory (BFM).

TO, TOP: 16-bit continuous execution and pulse execution type instructions

DTO, DTOP: 32 consecutive execution and pulse execution instructions

Programming format of TO instruction: TO K1 K D0 K2

*K1: Address number of special module, can only use value, range: 0—7

*K: buffer memory start address number of special module, can only use value, range: 0—32767

*D0: source register start address number, can use T, C, D value and bit component combination such as K4X0

*K2: The number of points transmitted can only be used as a value. Range: 1—32767

The function of the TOK1KD0K2 instruction is to write the values ​​of the 16-bit registers D0 and D1 of the PLC to the buffer registers (BFM)#, #13 of the special unit (or module) N0.1.

  1. When the special auxiliary relay M8164 is closed, the data in D8164 is used as the transmission point number.
  2. The special auxiliary relay M8028 is in the off state. When the TO instruction is executed, it automatically enters the interrupt disable state. The input interrupt and timer interrupt cannot be executed. Interrupts that occur during this period can only be executed after the FROM instruction has been executed. The TO instruction can be used in an interrupt program.
  3. The special auxiliary relay M8028 is in the closed state. When the TO instruction is executed, the interrupt program is executed if an interrupt occurs, and the TO command cannot be used in the interrupt program.

The FROM instruction is an instruction to read the contents of a special unit (such as FX2N-4AD) buffer memory (BFM) added to the PLC to the programmable controller.

FROM, FROMP: 16-bit continuous execution and pulse execution type instructions

DFROM, DFROMP: 32-bit continuous execution and pulse execution type instructions

The programming format of the read command FROM: FROMK1K29D0K2

*K1: Address number of special module, can only use value, range: 0—7

*K29: buffer memory start address number of special module, can only use value, range: 0—32767

*D0: Destination register start address number, which can be combined with T, C, D and bit elements other than X, such as K4Y0

*K2: The number of points transmitted can only be used as a value. Range: 1—32767

The function of the FROMK1K29D0K2 instruction is to read 16-bit data from the buffer register (BFM) #29, #30 of the special unit (or module) N0.1 and transfer it to the D0 and D1 registers of the PLC.

  1. When the special auxiliary relay M8164 is closed, the data in D8164 is used as the transmission point number.
  2. The special auxiliary relay M8028 is disconnected. When the FROM instruction is executed, the interrupt is disabled automatically. The input interrupt and timer interrupt cannot be executed. Interrupts that occur during this period can only be executed after the FROM instruction has been executed. The FROM instruction can be used in an interrupt program.
  3. The special auxiliary relay M8028 is in the closed state. When the FROM instruction is executed, the interrupt program is executed if an interrupt occurs, and the FROM instruction cannot be used in the interrupt program.

Leave a Reply

Your email address will not be published. Required fields are marked *