Photocoupler

How to connect the encoder to the plc, today I will use a Siemens S7-200 series PLC to connect the encoder to illustrate the use case.

The program first sets the value of the counter. In this example, the set value is 10. Press the device start button I0.1 to start the device. After the operation, the signal is input through the signal input point I0.0. When the current value is equal to the set value 10 The output point is disconnected and the device stops running. I0.2 is the device stop button. The procedure is as follows:
LD SM0.1
MOVB 16#C8, SMB37
HDEF 0, 0
MOVD +0, SMD38
HSC 0
The above program notes: (1) Initialize the high-number counter HSC0, write the control byte (16#C8 means: the initial value is required to be set; the preset value is not loaded; the counting direction is not required to be changed during operation; The counter type is incremented.) (2) Execute the HDEF instruction to select the high-speed counter operation mode (the counter is HSC0; the mode is 0). (3) Initial value setting: The initial value of the loaded high-number counter is 0 ( 4) Execute the HSC instruction and write the HSC0 setting. LDN M14.0
EU MOVB
16#C8, SMB37
MOVD +0, SMD38
HSC 0
Note to the above program: When the speed value reaches the required value, M14.0 is reset, and the high-speed counter count will be reset to the initial value for use in the next count.
LDD< HC0, +10
= M14.0
Note to the above program: When the counter value is less than 10, M14.0 is always set.
LD I0.1
O Q0.0
AN I0.2
A M14.0
= Q0.0
The above program notes: I0.1 is the device start signal; I0.2 is the device stop signal. When the accumulated value of the high-speed counter reaches 10, the device stops running.

Conecting Terminals Without Screws

Conecting Terminals Without Screws,Cold Pressing Terminals,Low Pressure Cold Shrinkage Terminal,Cold Shrinkage Cable Terminals

Taixing Longyi Terminals Co.,Ltd. , https://www.lycopperterminals.com