just for reference:
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:
LDSM0.1
MOVB16#C8, SMB37
HDEF0,0
MOVD+0, SMD38
HSC0
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. LDNM14.0
EUMOVB
16#C8, SMB37
MOVD+0, SMD38
HSC0
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
Note to the above program: When the counter value is less than 10, M14.0 is always set.
LDI0.1
OQ0.0
ANI0.2
AM14.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.
48V100Ah Home Energy Storage,Deep Cycle 48V Power Wall Battery,48V 100Ah Home Energie Storage Batterie,Wall-Mounted Home Energy Storage
Jiangsu Zhitai New Energy Technology Co.,Ltd , https://www.jszhitaienergy.com