FUN 148 (s)

Chapter 5 Instruction Specifications

Item number

 

 

FUN instructions-13

 

Name

 

 

PWM Frequency on-duty changes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ladder format

 

 

 

 

 

 

 

 

Condition code

 

Processing time (s)

 

Remark

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R7F4

 

 

R7F3

 

R7F2

 

R7F1

R7F0

Average

 

Maximum

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FUN 148 (s)

 

 

 

DER

 

 

ERR

 

SD

 

 

V

 

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

z

 

 

z

 

 

z

 

z

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction format

 

 

 

 

 

 

 

 

Number of steps

 

173

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Condition

 

 

 

 

Steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FUN 148 (s)

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bit

 

 

 

 

 

 

 

Word

 

Double word

 

Constant

 

 

 

 

 

Usable I/O

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Other

 

 

 

 

X

Y

 

M

 

 

CU, CT

 

WX

WY

WM

TC

DX

 

DY

 

DM

 

 

 

 

 

 

 

 

 

 

 

 

 

R,

 

 

TD, SS,

 

 

 

 

 

WR,

 

 

 

 

 

DR,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

s

 

Argument (PWM output

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

{

 

 

 

 

 

 

 

 

 

 

 

 

number)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

s+1

 

Argument (Frequency

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

{

 

 

 

 

 

 

 

 

 

 

 

 

value)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

s+2

 

Argument (On-duty

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

{

 

 

 

 

 

 

 

 

 

 

 

 

value)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Function

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15

 

 

 

 

 

 

 

0

 

 

PWM output number:

H01 to H04

 

 

S

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PWM number

 

 

 

 

**

 

 

 

 

 

**: Disable area

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S + 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Frequency: 10 to 2000 (Hz)

 

 

 

 

 

 

 

 

 

 

 

Frequency values

 

 

 

 

 

 

 

*: If the frequency value is set to less than 10 Hz, it is

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

internally changed to 10 Hz. The S parameter is also

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S + 2

 

 

 

On-duty value

 

 

 

 

 

 

 

 

rewritten.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

On-duty value:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

With auto correction – Depends on the frequency used.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Without auto correction – 0 to 100 (%)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Auto correction is executed when the value corresponding to

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

the CPU model is specified in WRF06B.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Caution: There will be a slight error even if correction setting

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

is performed

 

 

 

 

 

 

 

 

Sets the frequency value and on-duty value of the PWM output number specified by the on-duty value and the specified frequency value.

Sets the frequency value in Hz.

Example: To set a frequency of 1 kHz, set 1000 (H3B8) as internal output.

Sets the on-duty value in %.

Example: To set an on-duty of 80 %, set 80 (H50) as internal output.

When the on-duty is set to be auto-corrected, the effective range of the on-duty is calculated using the following expressions. On-duty lower limit value (%) = Hardware delay time (∝s) x Frequency used (Hz) x 10-4

On-duty upper limit value (%) = 100 − Hardware delay time (∝s) x Frequency used (Hz) x 10-4If the CPU model is EH-***DRP and the PWM output is 2 kHz,

On-duty lower limit value = 50 x 2000 x 10-4= 10 % On-duty upper limit value = 100 − (50 x 2000 x 10-4) = 90 %

Thus, the effective range of the on-duty will be 10 % to 90 %.

5-138

Page 188
Image 188
Hitachi NJI-350B manual FUN instructions-13, 173, 138