Dhsp: High-Speed Counting Table Compare Pulse Output Instruction - INVT IVC2H Programming Manual

Small plc
Table of Contents

Advertisement

Programming manual of IVC series small PLC

6.10.8 DHSP: High-speed counting table compare pulse output instruction

LAD:
IL: DHSP (S1) (S2) (S3)
Operand Type
S1
DINT
S2
INT
Constant
S3
DINT
Operand description
S1: the starting D element for table comparison. The
following three D elements are the comparison data, and the
data to output to SD180&SD181. These four D elements
form a record.
S2: the number of records to be compared. Range: 1~128.
S3: high-speed counter. Range: C236~C255.
Function description
1. A high-speed counter will count in the interrupt mode only
when it is driven by the HCNT instruction and the counting
input changes from OFF to ON.
2. When the counter value equates the comparison data of
the present record, the output data of the present record will
become the values of SD180&SD181.
3. You can use the DHSP instruction when you want to
control the high-speed output or assign values to certain
parameters according to a table. For example, you can set
the SD180&SD181 (double word) as the output frequency of
the PLSY instruction, and the PLSY output frequency will be
adjusted by the table compare result.
Note
1. The DHSP instruction must be used together with the
HCNT instruction, because the DHST instruction cannot be
executed unless the related high-speed counter is driven by
the HCNT instruction.
Example
The table for comparison is shown below:
Comparison data
MSB
D100=0
D104=0
D108=0
D112=0
The following is the user program:
Output data (to SD180&SD181)
LSB
MSB
D101=100
D102=0
D105=200
D106=0
D109=300
D110=0
D113=100
D114=0
Applicable to
Influenced flag bit
Program steps
Applicable elements
D
2. When the DHSP instruction is used together with the
PLSY instruction, the values assigned to SD180 and SD181
must meet the frequency output requirement of the PLSY
instruction. For details, see the description of the PLSY
instruction.
3. To stop the comparison at the last record, set the last
output data of the table as 0. Under this situation, other
DHST and DHSP instructions will be invalid. But at this time,
the DHSP instruction is not regarded as a high-speed
instruction when it comes to the number limit of high-speed
instructions.
4. The DHSP instruction will be validated only by pulse input.
You cannot validate the instruction by changing the counter
value with instructions such as DMOV or MOV.
5. DHSP (DHSCI, DHSCS, DHSCR, DHST, DHSZ) can be
used repeatedly. However, at most the first six such
instructions can be driven at the same time.
6. In a user program, the DHSP and DHST instructions
cannot be valid at the same time. That means a valid DHSP
(or DHST) instruction will make the following DHST (or
DHSP) instructions invalid.
7. The maximum frequency supported by the PLC
high-speed counters will be seriously affected by instructions
like DHSCS, DHSCI, DHSCR, DHSZ, DHSP and DHST. For
details, see 错误!未找到引用源。错误!未找到引用源。 .
LSB
D103=1
D107=2
D111=3
D115=4
Chapter 6 Application instructions
IVC1 IVC1S IVC1L IVC2L IVC2H
10
R
C
Operation flow
1 
2 
3 
4 
Return to 1
147
Indexed
addressing

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the IVC2H and is the answer not in the manual?

This manual is also suitable for:

Ivc seriesIvc1sIvc2lIvc1Ivc1l

Table of Contents