This program is issued after the test on the machine is normal; the intention is to enable the plc beginner to quickly master the basic use of the Siemens S7-200PLC high-speed counter, so the program should be simplified as much as possible for everyone to learn; at the same time, I hope that it can be used as a guide. The effect is more than the guidance of the PLC expert, so that they have more insights and get to know more friends and mentors.
The program first sets the value of the counter. In this example, the set value is 13. Press the device start button I0.1 to start the device. After the operation, it is counted by the signal input point I0.0. When the current value is equal to the set value 13, 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
Annotations above procedure: (1) a high number of counter HSC0 initialization, the write control byte (16 # C8 meaning: initial value setting requirements; not charged with a preset value; operation is not required to change the count direction ; the counter type is incremented.)
(2) Execute the HDEF instruction and set the high-speed counter operation mode (the counter is HSC0; the mode is 0)
(3) Initial value setting: loading the high number counter initial value 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, +13
= M14.0
Note to the above program: When the counter value is less than 13, M14.0 is always set.
LD I0.1
O Q0.0
AN I0.2
A M14.0
= Q0.0
Note to the above program: I0.1 is the device start signal; I0.1 is the device stop signal. When the accumulated value of the high-speed counter reaches 13, the device stops running.
How to use Siemens S7-200PLC high-speed counter (2)
The background of this program design: (interrupt single point control)
The program is designed to perform high-count counters and interrupt commands through a simple design of a sheet-length automatic length-cutting device.
Work requirements: a boot device, feed roller drive motor operating the feed plate material, while the length of the pulse signal is recorded by a counter, when a pulse reaches the preset value, i.e., the length of the sheet is set, an interrupt command signal to stop the feed roller motor operating performing nip, cropping, after the completion of cutting, shear pressure valve and simultaneously resetting feed, feed roll motor operates, for the next crop, again and again.
Program expansion: can be designed according to the actual needs of the steel plate fixed length cutting; or flow control.
Learning through this program can deepen the understanding of the use of high-counter counter instructions and interrupt instructions. I0.0 is the count pulse input point.
Main program:
Network 1 // Call the subroutine to set the parameters of the high number of speedometers
LD SM0.0
CALL SBR0
Network 2 // Feed motor start control
LD I1.1
O T39
S Q0.0, 1
Network 3 // Feed motor stop control
LD I1.0
R Q0.0, 3
Network 4 // Compact time setting
LD Q0.1
TON T37, 15
Network 5
LD T37
S Q0.2, 1
Network 6 // Trimming time settings
LD Q0.2
TON T38, 10
Network 7 // Platen and cutter reset time setting
LD T38
LD M0.0
AN T39
OLD
R Q0.1, 1
TON T39, 20
= M0.0
R Q0.2, 1
Network 8 // Program debug counter run detection; can be deleted in practice.
LD SM0.0
MOVD HC0, VD30
Subroutines and annotations:
The first one is to set the high number counter parameter: 16#E8=11101000. The meaning is: enable counter; update current value is SMD38; allow to update the set value is SMD42; do not change the counting direction.
LD SM0.1
MOVB 16#E8, SMB37 set the high number counter parameters;
MOVD +0, SMD38 set the current value SMD38=0
MOVD +20, SMD42 set pre-installed value SMD42=20;
HDEF 0, 0 selects 0# speeder to connect to interrupt event No. 12
ATCH INT0, 12
ENI open interrupt;
HSC 0 turns on 0# speedometer
Interrupt routine notes:
LD SM0.0
R Q0.0, 1 interrupt execution, Q0.0 lost power rolling stop
A rod lens is a Cylindrical Lens which has the geometrical form of a cylinder and has a polished mantle, while the two flat end surfaces may be ground. It is analogous to a Ball Lens for focusing in both directions.Rod lenses can be used. There are also imaging applications. Note, however, that a rod lens exhibits substantial spherical aberrations when light propagation is not restricted to a small fraction of its cross-section.
Rod Lens,2.77 Rod Lens,Endoscope Lens,Endoscope Rod Lens
Zoolied Inc. , https://www.zoolied.com